@@ -40,7 +40,7 @@ class ContactModel6DLoopTpl : public ContactModelAbstractTpl<_Scalar> {
40
40
typedef typename MathBase::MatrixXs MatrixXs;
41
41
42
42
/* *
43
- * @brief Initialize the 6d contact model from joint and placements
43
+ * @brief Initialize the 6d loop- contact model from joint and placements
44
44
*
45
45
*
46
46
* @param[in] state State of the multibody system
@@ -62,7 +62,7 @@ class ContactModel6DLoopTpl : public ContactModelAbstractTpl<_Scalar> {
62
62
const Vector2s &gains = Vector2s::Zero());
63
63
64
64
/* *
65
- * @brief Initialize the 6d contact model from joint and placements
65
+ * @brief Initialize the 6d loop- contact model from joint and placements
66
66
*
67
67
*
68
68
* @param[in] state State of the multibody system
@@ -84,19 +84,19 @@ class ContactModel6DLoopTpl : public ContactModelAbstractTpl<_Scalar> {
84
84
virtual ~ContactModel6DLoopTpl ();
85
85
86
86
/* *
87
- * @brief Compute the 3d contact Jacobian and drift
87
+ * @brief Compute the 6d loop- contact Jacobian and drift
88
88
*
89
- * @param[in] data 3d contact data
89
+ * @param[in] data 6d loop- contact data
90
90
* @param[in] x State point \f$\mathbf{x}\in\mathbb{R}^{ndx}\f$
91
91
* @param[in] u Control input \f$\mathbf{u}\in\mathbb{R}^{nu}\f$
92
92
*/
93
93
virtual void calc (const boost::shared_ptr<ContactDataAbstract> &data,
94
94
const Eigen::Ref<const VectorXs> &x);
95
95
96
96
/* *
97
- * @brief Compute the derivatives of the 6d contact holonomic constraint
97
+ * @brief Compute the derivatives of the 6d loop- contact holonomic constraint
98
98
*
99
- * @param[in] data 6d contact data
99
+ * @param[in] data 6d loop- contact data
100
100
* @param[in] x State point \f$\mathbf{x}\in\mathbb{R}^{ndx}\f$
101
101
* @param[in] u Control input \f$\mathbf{u}\in\mathbb{R}^{nu}\f$
102
102
*/
@@ -106,7 +106,7 @@ class ContactModel6DLoopTpl : public ContactModelAbstractTpl<_Scalar> {
106
106
/* *
107
107
* @brief Convert the force into a stack of spatial forces
108
108
*
109
- * @param[in] data 6d contact data
109
+ * @param[in] data 6d loop- contact data
110
110
* @param[in] force 6d force
111
111
*/
112
112
virtual void updateForce (const boost::shared_ptr<ContactDataAbstract> &data,
@@ -126,7 +126,7 @@ class ContactModel6DLoopTpl : public ContactModelAbstractTpl<_Scalar> {
126
126
const MatrixXs& df_dx, const MatrixXs& df_du);
127
127
128
128
/* *
129
- * @brief Create the 6d contact data
129
+ * @brief Create the 6d loop- contact data
130
130
*/
131
131
virtual boost::shared_ptr<ContactDataAbstract> createData (
132
132
pinocchio::DataTpl<Scalar> *const data);
@@ -250,7 +250,19 @@ struct ContactData6DLoopTpl : public ContactDataAbstractTpl<_Scalar> {
250
250
f2Jf2(6 , model->get_state ()->get_nv()),
251
251
f1Jf2(6 , model->get_state ()->get_nv()),
252
252
j1Jj1(6 , model->get_state ()->get_nv()),
253
- j2Jj2(6 , model->get_state ()->get_nv()) {
253
+ j2Jj2(6 , model->get_state ()->get_nv()),
254
+ j1Xf1(SE3ActionMatrix::Identity()),
255
+ j2Xf2(SE3ActionMatrix::Identity()),
256
+ f1Mf2(SE3::Identity()),
257
+ f1Xf2(SE3ActionMatrix::Identity()),
258
+ f1vf1(Motion::Zero()),
259
+ f2vf2(Motion::Zero()),
260
+ f1vf2(Motion::Zero()),
261
+ f1af1(Motion::Zero()),
262
+ f2af2(Motion::Zero()),
263
+ f1af2(Motion::Zero()),
264
+ joint1_f(Force::Zero()),
265
+ joint2_f(Force::Zero()) {
254
266
v1_partial_dq.setZero ();
255
267
f1_v1_partial_dq.setZero ();
256
268
a1_partial_dq.setZero ();
@@ -278,22 +290,6 @@ struct ContactData6DLoopTpl : public ContactDataAbstractTpl<_Scalar> {
278
290
j1Jj1.setZero ();
279
291
j2Jj2.setZero ();
280
292
j2Jj1.setZero ();
281
- //
282
- j1Xf1 = SE3ActionMatrix::Identity ();
283
- j2Xf2 = SE3ActionMatrix::Identity ();
284
- f1Mf2 = SE3::Identity ();
285
- f1Xf2 = SE3ActionMatrix::Identity ();
286
- //
287
- f1vf1 = Motion::Zero ();
288
- f2vf2 = Motion::Zero ();
289
- f1vf2 = Motion::Zero ();
290
- //
291
- f1af1 = Motion::Zero ();
292
- f2af2 = Motion::Zero ();
293
- f1af2 = Motion::Zero ();
294
- //
295
- joint1_f = Force::Zero ();
296
- joint2_f = Force::Zero ();
297
293
}
298
294
299
295
using Base::a0;
@@ -353,7 +349,6 @@ struct ContactData6DLoopTpl : public ContactDataAbstractTpl<_Scalar> {
353
349
// Force related data
354
350
Force joint1_f;
355
351
Force joint2_f;
356
- Force f_local;
357
352
};
358
353
359
354
} // namespace crocoddyl
0 commit comments