joint-generic.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016-2019 CNRS INRIA
3 //
4 
6 
8 
10 
12 
13 #include <iostream>
14 #include <boost/test/unit_test.hpp>
15 #include <boost/utility/binary.hpp>
16 
17 using namespace pinocchio;
18 
19 template<typename JointModel>
22 {
23  typedef typename LieGroup<JointModel>::type LieGroupType;
24  typedef typename JointModel::JointDataDerived JointData;
25 
26  std::cout << "Testing Joint over " << jmodel.shortname() << std::endl;
27 
28  Eigen::VectorXd q1, q2;
29  Eigen::VectorXd armature =
30  Eigen::VectorXd::Random(jdata.S().nv()) + Eigen::VectorXd::Ones(jdata.S().nv());
31 
32  q1 = LieGroupType().random();
33  q2 = LieGroupType().random();
34 
35  Eigen::VectorXd v1(Eigen::VectorXd::Random(jdata.S().nv())),
36  v2(Eigen::VectorXd::Random(jdata.S().nv()));
37 
38  Inertia::Matrix6 Ia(pinocchio::Inertia::Random().matrix()),
39  Ia2(pinocchio::Inertia::Random().matrix());
40  bool update_I = false;
41 
42  jmodel.calc(jdata.derived(), q1, v1);
43  jmodel.calc_aba(jdata.derived(), armature, Ia, update_I);
44 
45  pinocchio::JointModel jma(jmodel);
46  BOOST_CHECK(jmodel == jma);
47  BOOST_CHECK(jma == jmodel);
48  BOOST_CHECK(jma.hasSameIndexes(jmodel));
49 
50  pinocchio::JointData jda(jdata.derived());
51  BOOST_CHECK(jda == jdata);
52  BOOST_CHECK(jdata == jda);
53 
54  jma.calc(jda, q1, v1);
55  jma.calc_aba(jda, armature, Ia, update_I);
56  pinocchio::JointData jda_other(jdata);
57 
58  jma.calc(jda_other, q2, v2);
59  jma.calc_aba(jda_other, armature, Ia2, update_I);
60 
61  BOOST_CHECK(jda_other != jda);
62  BOOST_CHECK(jda != jda_other);
63  BOOST_CHECK(jda_other != jdata);
64  BOOST_CHECK(jdata != jda_other);
65 
66  const std::string error_prefix("JointModel on " + jma.shortname());
67  BOOST_CHECK_MESSAGE(jmodel.nq() == jma.nq(), std::string(error_prefix + " - nq "));
68  BOOST_CHECK_MESSAGE(jmodel.nv() == jma.nv(), std::string(error_prefix + " - nv "));
69 
70  BOOST_CHECK_MESSAGE(jmodel.idx_q() == jma.idx_q(), std::string(error_prefix + " - Idx_q "));
71  BOOST_CHECK_MESSAGE(jmodel.idx_v() == jma.idx_v(), std::string(error_prefix + " - Idx_v "));
72  BOOST_CHECK_MESSAGE(jmodel.id() == jma.id(), std::string(error_prefix + " - JointId "));
73 
74  BOOST_CHECK_MESSAGE(
75  jda.S().matrix().isApprox(jdata.S().matrix()),
76  std::string(error_prefix + " - JointMotionSubspaceXd "));
77  BOOST_CHECK_MESSAGE(
78  (jda.M()).isApprox((jdata.M())),
79  std::string(error_prefix + " - Joint transforms ")); // == or isApprox ?
80  BOOST_CHECK_MESSAGE(
81  (jda.v()).isApprox((pinocchio::Motion(jdata.v()))),
82  std::string(error_prefix + " - Joint motions "));
83  BOOST_CHECK_MESSAGE((jda.c()) == (jdata.c()), std::string(error_prefix + " - Joint bias "));
84 
85  BOOST_CHECK_MESSAGE(
86  (jda.U()).isApprox(jdata.U()),
87  std::string(error_prefix + " - Joint U inertia matrix decomposition "));
88  BOOST_CHECK_MESSAGE(
89  (jda.Dinv()).isApprox(jdata.Dinv()),
90  std::string(error_prefix + " - Joint DInv inertia matrix decomposition "));
91  BOOST_CHECK_MESSAGE(
92  (jda.UDinv()).isApprox(jdata.UDinv()),
93  std::string(error_prefix + " - Joint UDInv inertia matrix decomposition "));
94 
95  // Test vxS
96  typedef typename JointModel::Constraint_t Constraint_t;
97  typedef typename Constraint_t::DenseBase ConstraintDense;
98 
100  ConstraintDense vxS(v.cross(jdata.S()));
101  ConstraintDense vxS_ref = v.toActionMatrix() * jdata.S().matrix();
102 
103  BOOST_CHECK_MESSAGE(vxS.isApprox(vxS_ref), std::string(error_prefix + "- Joint vxS operation "));
104 
105  // Test Y*S
106  const Inertia Isparse(Inertia::Random());
107  const Inertia::Matrix6 Idense(Isparse.matrix());
108 
109  const ConstraintDense IsparseS = Isparse * jdata.S();
110  const ConstraintDense IdenseS = Idense * jdata.S();
111 
112  BOOST_CHECK_MESSAGE(
113  IdenseS.isApprox(IsparseS), std::string(error_prefix + "- Joint YS operation "));
114 
115  // Test calc
116  {
117  JointData jdata1(jdata.derived());
118 
119  jmodel.calc(jdata1.derived(), q1, v1);
120  jmodel.calc(jdata1.derived(), Blank(), v2);
121 
122  JointData jdata_ref(jdata.derived());
123  jmodel.calc(jdata_ref.derived(), q1, v2);
124 
125  BOOST_CHECK_MESSAGE(
126  pinocchio::JointData(jdata1).v() == pinocchio::JointData(jdata_ref).v(),
127  std::string(error_prefix + "- joint.calc(jdata,*,v) "));
128  }
129 }
130 
131 template<typename JointModel_>
132 struct init;
133 
134 template<typename JointModel_>
135 struct init
136 {
137  static JointModel_ run()
138  {
139  JointModel_ jmodel;
140  jmodel.setIndexes(0, 0, 0);
141  return jmodel;
142  }
143 };
144 
145 template<typename Scalar, int Options>
146 struct init<pinocchio::JointModelRevoluteUnalignedTpl<Scalar, Options>>
147 {
149 
150  static JointModel run()
151  {
152  typedef typename JointModel::Vector3 Vector3;
153  JointModel jmodel(Vector3::Random().normalized());
154 
155  jmodel.setIndexes(0, 0, 0);
156  return jmodel;
157  }
158 };
159 
160 template<typename Scalar, int Options>
162 {
164 
165  static JointModel run()
166  {
167  typedef typename JointModel::Vector3 Vector3;
168  JointModel jmodel(Vector3::Random().normalized());
169 
170  jmodel.setIndexes(0, 0, 0);
171  return jmodel;
172  }
173 };
174 
175 template<typename Scalar, int Options>
176 struct init<pinocchio::JointModelPrismaticUnalignedTpl<Scalar, Options>>
177 {
179 
180  static JointModel run()
181  {
182  typedef typename JointModel::Vector3 Vector3;
183  JointModel jmodel(Vector3::Random().normalized());
184 
185  jmodel.setIndexes(0, 0, 0);
186  return jmodel;
187  }
188 };
189 
190 template<typename Scalar, int Options, template<typename, int> class JointCollection>
191 struct init<pinocchio::JointModelTpl<Scalar, Options, JointCollection>>
192 {
194 
195  static JointModel run()
196  {
198  JointModel jmodel((JointModelRX()));
199 
200  jmodel.setIndexes(0, 0, 0);
201  return jmodel;
202  }
203 };
204 
205 template<typename Scalar, int Options, template<typename, int> class JointCollection>
206 struct init<pinocchio::JointModelCompositeTpl<Scalar, Options, JointCollection>>
207 {
209 
210  static JointModel run()
211  {
214  JointModel jmodel((JointModelRX()));
215  jmodel.addJoint(JointModelRY());
216 
217  jmodel.setIndexes(0, 0, 0);
218  return jmodel;
219  }
220 };
221 
222 template<typename JointModel_>
223 struct init<pinocchio::JointModelMimic<JointModel_>>
224 {
226 
227  static JointModel run()
228  {
229  JointModel_ jmodel_ref = init<JointModel_>::run();
230 
231  JointModel jmodel(jmodel_ref, 1., 0.);
232  jmodel.setIndexes(0, 0, 0);
233 
234  return jmodel;
235  }
236 };
237 
238 template<typename Scalar, int Options>
239 struct init<pinocchio::JointModelUniversalTpl<Scalar, Options>>
240 {
242 
243  static JointModel run()
244  {
245  typedef typename JointModel::Vector3 Vector3;
247 
248  jmodel.setIndexes(0, 0, 0);
249  return jmodel;
250  }
251 };
252 
253 template<typename Scalar, int Options, int axis>
254 struct init<pinocchio::JointModelHelicalTpl<Scalar, Options, axis>>
255 {
257 
258  static JointModel run()
259  {
260  JointModel jmodel(static_cast<Scalar>(0.5));
261 
262  jmodel.setIndexes(0, 0, 0);
263  return jmodel;
264  }
265 };
266 
267 template<typename Scalar, int Options>
268 struct init<pinocchio::JointModelHelicalUnalignedTpl<Scalar, Options>>
269 {
271 
272  static JointModel run()
273  {
274  typedef typename JointModel::Vector3 Vector3;
275  JointModel jmodel(Vector3::Random().normalized());
276 
277  jmodel.setIndexes(0, 0, 0);
278  return jmodel;
279  }
280 };
281 
282 struct TestJoint
283 {
284 
285  template<typename JointModel>
287  {
289  jmodel.setIndexes(0, 0, 0);
290  typename JointModel::JointDataDerived jdata = jmodel.createData();
291 
292  test_joint_methods(jmodel, jdata);
293  }
294 
296  {
297  }
298 };
299 
300 namespace pinocchio
301 {
302 
303  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
304  struct JointTest;
305  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
307  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
309 
310  template<typename _Scalar, int _Options, template<typename, int> class JointCollectionTpl>
311  struct traits<JointDataTest<_Scalar, _Options, JointCollectionTpl>>
312  {
314  typedef _Scalar Scalar;
315  };
316 
317  template<typename _Scalar, int _Options, template<typename, int> class JointCollectionTpl>
318  struct traits<JointModelTest<_Scalar, _Options, JointCollectionTpl>>
319  {
321  typedef _Scalar Scalar;
322  };
323 
324  template<typename _Scalar, int _Options, template<typename, int> class JointCollectionTpl>
325  struct traits<JointTest<_Scalar, _Options, JointCollectionTpl>>
326  {
327  enum
328  {
329  Options = _Options,
330  NQ = Eigen::Dynamic, // Dynamic because unknown at compile time
332  };
333  typedef _Scalar Scalar;
334 
341 
342  // [ABA]
343  typedef Eigen::Matrix<Scalar, 6, Eigen::Dynamic, Options> U_t;
344  typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Options> D_t;
345  typedef Eigen::Matrix<Scalar, 6, Eigen::Dynamic, Options> UD_t;
346 
347  typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1, Options> ConfigVector_t;
348  typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1, Options> TangentVector_t;
349  };
350 
351  template<typename _Scalar, int _Options, template<typename, int> class JointCollectionTpl>
352  struct JointModelTest
353  : JointCollectionTpl<_Scalar, _Options>::JointModelVariant
354  , JointModelBase<JointModelTest<_Scalar, _Options, JointCollectionTpl>>
355  {
357  typedef JointCollectionTpl<_Scalar, _Options> JointCollection;
360 
362 
364  : VariantBase(jmodel)
365  {
366  }
367  };
368 
369 } // namespace pinocchio
370 
371 BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE)
372 
373 BOOST_AUTO_TEST_CASE(test_joint_from_joint_composite)
374 {
375  typedef JointCollectionDefault JointCollection;
377 
378  JointModelRX jmodel_revolute_x;
379  JointModel jmodel_generic(jmodel_revolute_x);
380  JointModelVariant jmodel_variant(jmodel_revolute_x);
381 
382  JointModelTest<double, 0, JointCollectionDefaultTpl> jmodel_test(jmodel_revolute_x);
383  std::vector<JointModelTest<double, 0, JointCollectionDefaultTpl>> jmodel_test_vector;
384  jmodel_test_vector.push_back(
386 
387  std::vector<JointModelVariant> jmodel_variant_vector;
388  jmodel_variant_vector.push_back(jmodel_revolute_x);
389 
390  std::vector<JointModel> jmodel_generic_vector;
391  jmodel_generic_vector.push_back((JointModel)jmodel_revolute_x);
392  JointModelComposite jmodel_composite(jmodel_revolute_x);
393 }
394 
395 BOOST_AUTO_TEST_CASE(test_all_joints)
396 {
397  boost::mpl::for_each<JointModelVariant::types>(TestJoint());
398 }
399 
400 BOOST_AUTO_TEST_CASE(test_empty_model)
401 {
402  JointModel jmodel;
403  std::cout << "nq " << jmodel.nq() << std::endl;
404  std::cout << "nv " << jmodel.nv() << std::endl;
405  std::cout << "idx_q " << jmodel.idx_q() << std::endl;
406  std::cout << "idx_v " << jmodel.idx_v() << std::endl;
407  std::cout << "id " << jmodel.id() << std::endl;
408  std::cout << "name " << jmodel.shortname() << std::endl;
409 
410  BOOST_CHECK(jmodel.idx_q() == -1);
411  BOOST_CHECK(jmodel.idx_v() == -1);
412 }
413 
415 {
416  JointModelRX joint_revolutex;
417  JointModelRY joint_revolutey;
418 
419  BOOST_CHECK(joint_revolutex != joint_revolutey);
420 
421  JointModel jmodelx(joint_revolutex);
422  jmodelx.setIndexes(0, 0, 0);
423 
424  JointModel jmodelx_copy = jmodelx;
425  BOOST_CHECK(jmodelx_copy == jmodelx);
426  BOOST_CHECK(jmodelx_copy == jmodelx.derived());
427 
428  JointModel jmodely(joint_revolutey);
429  // TODO: the comparison of two variants is not supported by some old version of BOOST
430  // BOOST_CHECK(jmodely.toVariant() != jmodelx.toVariant());
431  BOOST_CHECK(jmodely != jmodelx);
432 }
433 
435 {
436  JointModelRX joint_revolutex;
437 
438  JointModel jmodelx(joint_revolutex);
439  jmodelx.setIndexes(0, 0, 0);
440 
441  BOOST_CHECK(jmodelx.cast<double>() == jmodelx);
442  BOOST_CHECK(jmodelx.cast<long double>().cast<double>() == jmodelx);
443 }
444 
446 {
447 
448  template<typename JointModel>
450  {
451  JointModel jmodel_init = init<JointModel>::run();
452  typedef typename JointModel::JointDataDerived JointData;
453 
454  Model model;
455  model.addJoint(0, jmodel_init, SE3::Random(), "toto");
456  model.lowerPositionLimit.fill(-1.);
457  model.upperPositionLimit.fill(1.);
458 
459  const JointModel & jmodel = boost::get<JointModel>(model.joints[1]);
460 
461  Eigen::VectorXd q = randomConfiguration(model);
462  Eigen::VectorXd v = Eigen::VectorXd::Random(model.nv);
463 
464  JointData jdata = jmodel.createData();
465 
466  jmodel.calc(jdata, q, v);
467 
468  Eigen::VectorXd armature =
469  Eigen::VectorXd::Random(jmodel.nv()) + Eigen::VectorXd::Ones(jmodel.nv());
470  Inertia::Matrix6 I = Inertia::Matrix6::Identity();
471  jmodel.calc_aba(jdata, armature, I, false);
472  test(jdata);
473  }
474 
475  template<typename JointModel>
477  {
478  }
479 
480  template<typename JointData>
481  static void test(const JointData & jdata)
482  {
483  pinocchio::JointData jdata_generic1(jdata);
484 
485  std::cout << "name: " << jdata_generic1.shortname() << std::endl;
486  BOOST_CHECK(jdata_generic1 == jdata_generic1);
487  }
488 };
489 
490 BOOST_AUTO_TEST_CASE(test_operator_equal)
491 {
492  boost::mpl::for_each<JointModelVariant::types>(TestJointOperatorEqual());
493 }
494 
495 BOOST_AUTO_TEST_SUITE_END()
pinocchio::InertiaTpl< context::Scalar, context::Options >
pinocchio::JointModelUniversalTpl
Definition: multibody/joint/fwd.hpp:102
pinocchio::JointModelRevoluteUnalignedTpl::setIndexes
void setIndexes(JointIndex id, int q, int v)
Definition: joint-model-base.hpp:186
TestJointOperatorEqual::operator()
void operator()(const pinocchio::JointModelMimic< JointModel > &) const
Definition: joint-generic.cpp:476
pinocchio::JointDataBase::v
MotionTypeConstRef v() const
Definition: joint-data-base.hpp:211
TestJointOperatorEqual
Definition: joint-generic.cpp:445
pinocchio::traits< JointTest< _Scalar, _Options, JointCollectionTpl > >::U_t
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > U_t
Definition: joint-generic.cpp:343
init< pinocchio::JointModelPrismaticUnalignedTpl< Scalar, Options > >::JointModel
pinocchio::JointModelPrismaticUnalignedTpl< Scalar, Options > JointModel
Definition: joint-generic.cpp:178
test_joint_methods
void test_joint_methods(JointModelBase< JointModel > &jmodel, JointDataBase< typename JointModel::JointDataDerived > &jdata)
Definition: joint-generic.cpp:20
pinocchio::JointDataTpl::v
Motion_t v() const
Definition: joint-generic.hpp:131
pinocchio::JointModelRevoluteUnboundedUnalignedTpl
Definition: multibody/joint/fwd.hpp:46
pinocchio::JointModelHelicalTpl
Definition: multibody/joint/fwd.hpp:60
test
def test(type SolverType)
init< pinocchio::JointModelCompositeTpl< Scalar, Options, JointCollection > >::JointModel
pinocchio::JointModelCompositeTpl< Scalar, Options, JointCollection > JointModel
Definition: joint-generic.cpp:208
pinocchio::JointModelMimic
Definition: joint-mimic.hpp:307
pinocchio::JointModelRevoluteUnboundedUnalignedTpl::setIndexes
void setIndexes(JointIndex id, int q, int v)
Definition: joint-model-base.hpp:186
pinocchio::JointModelTest::JointModelVariant
JointCollection::JointModelVariant JointModelVariant
Definition: joint-generic.cpp:359
init< pinocchio::JointModelMimic< JointModel_ > >::JointModel
pinocchio::JointModelMimic< JointModel_ > JointModel
Definition: joint-generic.cpp:225
pinocchio::JointModelBase
Definition: joint-model-base.hpp:75
pinocchio::Options
Options
Definition: joint-configuration.hpp:1082
pinocchio::JointTpl< _Scalar, _Options, JointCollectionTpl >
pinocchio::SE3Tpl< Scalar, Options >
pinocchio::JointDataBase
Definition: joint-data-base.hpp:161
pinocchio::JointDataBase::M
TansformTypeConstRef M() const
Definition: joint-data-base.hpp:203
model.hpp
pinocchio::JointModelRX
JointModelRevoluteTpl< context::Scalar, context::Options, 0 > JointModelRX
Definition: joint-revolute.hpp:873
init< pinocchio::JointModelTpl< Scalar, Options, JointCollection > >::run
static JointModel run()
Definition: joint-generic.cpp:195
q2
q2
pinocchio::traits< JointTest< _Scalar, _Options, JointCollectionTpl > >::Transformation_t
SE3Tpl< Scalar, Options > Transformation_t
Definition: joint-generic.cpp:338
pinocchio::python::Scalar
context::Scalar Scalar
Definition: admm-solver.cpp:29
pinocchio::traits< JointTest< _Scalar, _Options, JointCollectionTpl > >::JointModelDerived
JointModelTpl< Scalar, Options, JointCollectionTpl > JointModelDerived
Definition: joint-generic.cpp:336
pinocchio::traits< JointDataTest< _Scalar, _Options, JointCollectionTpl > >::Scalar
_Scalar Scalar
Definition: joint-generic.cpp:314
TestJointOperatorEqual::test
static void test(const JointData &jdata)
Definition: joint-generic.cpp:481
pinocchio::JointDataTpl< context::Scalar >
pinocchio::JointModelUniversalTpl::setIndexes
void setIndexes(JointIndex id, int q, int v)
Definition: joint-model-base.hpp:186
pinocchio::JointDataTest
Definition: joint-generic.cpp:308
pinocchio::JointDataBase::derived
Derived & derived()
Definition: joint-data-base.hpp:168
pinocchio::JointDataTpl::c
Bias_t c() const
Definition: joint-generic.hpp:135
pinocchio::JointTest
Definition: joint-generic.cpp:304
pinocchio::Blank
Blank type.
Definition: fwd.hpp:76
pinocchio::traits< JointTest< _Scalar, _Options, JointCollectionTpl > >::JointDataDerived
JointDataTpl< Scalar, Options, JointCollectionTpl > JointDataDerived
Definition: joint-generic.cpp:335
pinocchio::traits< JointTest< _Scalar, _Options, JointCollectionTpl > >::Bias_t
MotionTpl< Scalar, Options > Bias_t
Definition: joint-generic.cpp:340
pinocchio::cast
NewScalar cast(const Scalar &value)
Definition: utils/cast.hpp:13
pinocchio::randomConfiguration
void randomConfiguration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &lowerLimits, const Eigen::MatrixBase< ConfigVectorIn2 > &upperLimits, const Eigen::MatrixBase< ReturnType > &qout)
Generate a configuration vector uniformly sampled among provided limits.
Definition: joint-configuration.hpp:315
pinocchio::JointModelCompositeTpl::addJoint
JointModelDerived & addJoint(const JointModelBase< JointModel > &jmodel, const SE3 &placement=SE3::Identity())
Add a joint to the vector of joints.
Definition: joint-composite.hpp:278
pinocchio::JointModelBase::calc_aba
void calc_aba(JointDataDerived &data, const Eigen::MatrixBase< VectorLike > &armature, const Eigen::MatrixBase< Matrix6Like > &I, const bool update_I=false) const
Definition: joint-model-base.hpp:131
pinocchio::CartesianAxis::vector
static Eigen::Matrix< Scalar, 3, 1 > vector()
Definition: cartesian-axis.hpp:79
pinocchio::traits< JointTest< _Scalar, _Options, JointCollectionTpl > >::TangentVector_t
Eigen::Matrix< Scalar, Eigen::Dynamic, 1, Options > TangentVector_t
Definition: joint-generic.cpp:348
pinocchio::JointModelTpl::calc_aba
void calc_aba(JointDataDerived &data, const Eigen::MatrixBase< VectorLike > &armature, const Eigen::MatrixBase< Matrix6Like > &I, const bool update_I) const
Definition: joint-generic.hpp:372
init< pinocchio::JointModelMimic< JointModel_ > >::run
static JointModel run()
Definition: joint-generic.cpp:227
pinocchio::JointModelRY
JointModelRevoluteTpl< context::Scalar, context::Options, 1 > JointModelRY
Definition: joint-revolute.hpp:877
pinocchio::traits< JointTest< _Scalar, _Options, JointCollectionTpl > >::Constraint_t
JointMotionSubspaceTpl< Eigen::Dynamic, Scalar, Options > Constraint_t
Definition: joint-generic.cpp:337
pinocchio::JointModelTpl::setIndexes
void setIndexes(JointIndex id, int nq, int nv)
Definition: joint-generic.hpp:414
pinocchio::traits< JointTest< _Scalar, _Options, JointCollectionTpl > >::Scalar
_Scalar Scalar
Definition: joint-generic.cpp:333
init< pinocchio::JointModelRevoluteUnboundedUnalignedTpl< Scalar, Options > >::run
static JointModel run()
Definition: joint-generic.cpp:165
pinocchio::traits< JointTest< _Scalar, _Options, JointCollectionTpl > >::UD_t
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > UD_t
Definition: joint-generic.cpp:345
joint-configuration.hpp
pinocchio::JointModelHelicalTpl::setIndexes
void setIndexes(JointIndex id, int q, int v)
Definition: joint-model-base.hpp:186
init< pinocchio::JointModelHelicalUnalignedTpl< Scalar, Options > >::JointModel
pinocchio::JointModelHelicalUnalignedTpl< Scalar, Options > JointModel
Definition: joint-generic.cpp:270
TestJointOperatorEqual::operator()
void operator()(const JointModelBase< JointModel > &) const
Definition: joint-generic.cpp:449
pinocchio::traits< JointModelTest< _Scalar, _Options, JointCollectionTpl > >::Scalar
_Scalar Scalar
Definition: joint-generic.cpp:321
pinocchio::JointDataBase::S
ConstraintTypeConstRef S() const
Definition: joint-data-base.hpp:195
pinocchio::JointModelTpl::cast
JointModelTpl< NewScalar, Options, JointCollectionTpl > cast() const
Definition: joint-generic.hpp:421
pinocchio::JointData
JointDataTpl< context::Scalar > JointData
Definition: multibody/joint/fwd.hpp:162
init< pinocchio::JointModelHelicalUnalignedTpl< Scalar, Options > >::run
static JointModel run()
Definition: joint-generic.cpp:272
pinocchio::JointModelHelicalUnalignedTpl::Vector3
Eigen::Matrix< Scalar, 3, 1, _Options > Vector3
Definition: joint-helical-unaligned.hpp:635
pinocchio::JointModelTpl::createData
JointDataDerived createData() const
Definition: joint-generic.hpp:317
joint-generic.hpp
pinocchio::Dynamic
const int Dynamic
Definition: fwd.hpp:140
TestJoint
Definition: joint-generic.cpp:282
pinocchio::JointModelVariant
JointCollectionDefault::JointModelVariant JointModelVariant
Definition: joint-collection.hpp:205
pinocchio::JointModelRevoluteUnboundedUnalignedTpl::Vector3
Eigen::Matrix< Scalar, 3, 1, Options > Vector3
Definition: joint-revolute-unbounded-unaligned.hpp:138
pinocchio::JointModelTpl< context::Scalar >
pinocchio::JointModelBase::shortname
std::string shortname() const
Definition: joint-model-base.hpp:214
pinocchio::JointModelHelicalUnalignedTpl
Definition: multibody/joint/fwd.hpp:65
pinocchio::JointDataTpl::U
U_t U() const
Definition: joint-generic.hpp:141
init< pinocchio::JointModelRevoluteUnboundedUnalignedTpl< Scalar, Options > >::JointModel
pinocchio::JointModelRevoluteUnboundedUnalignedTpl< Scalar, Options > JointModel
Definition: joint-generic.cpp:163
pinocchio::JointDataBase::U
UTypeConstRef U() const
Definition: joint-data-base.hpp:228
init< pinocchio::JointModelHelicalTpl< Scalar, Options, axis > >::JointModel
pinocchio::JointModelHelicalTpl< Scalar, Options, axis > JointModel
Definition: joint-generic.cpp:256
pinocchio::JointModelPrismaticUnalignedTpl::Vector3
Eigen::Matrix< Scalar, 3, 1, _Options > Vector3
Definition: joint-prismatic-unaligned.hpp:596
init< pinocchio::JointModelTpl< Scalar, Options, JointCollection > >::JointModel
pinocchio::JointModelTpl< Scalar, Options, JointCollection > JointModel
Definition: joint-generic.cpp:193
pinocchio::traits< JointTest< _Scalar, _Options, JointCollectionTpl > >::Motion_t
MotionTpl< Scalar, Options > Motion_t
Definition: joint-generic.cpp:339
pinocchio::InertiaTpl< context::Scalar, context::Options >::Random
static InertiaTpl Random()
Definition: spatial/inertia.hpp:361
pinocchio::JointModelTest::PINOCCHIO_JOINT_TYPEDEF_TEMPLATE
PINOCCHIO_JOINT_TYPEDEF_TEMPLATE(JointDerived)
pinocchio::JointDataBase::Dinv
DTypeConstRef Dinv() const
Definition: joint-data-base.hpp:236
init< pinocchio::JointModelUniversalTpl< Scalar, Options > >::JointModel
pinocchio::JointModelUniversalTpl< Scalar, Options > JointModel
Definition: joint-generic.cpp:241
pinocchio::context::Vector3
Eigen::Matrix< Scalar, 3, 1, Options > Vector3
Definition: context/generic.hpp:53
pinocchio::traits< JointModelTest< _Scalar, _Options, JointCollectionTpl > >::JointDerived
JointTpl< _Scalar, _Options, JointCollectionTpl > JointDerived
Definition: joint-generic.cpp:320
init< pinocchio::JointModelPrismaticUnalignedTpl< Scalar, Options > >::run
static JointModel run()
Definition: joint-generic.cpp:180
pinocchio::JointDataTpl::UDinv
UD_t UDinv() const
Definition: joint-generic.hpp:149
pinocchio::JointModelBase::nq
int nq() const
Definition: joint-model-base.hpp:145
pinocchio::JointDataTpl::S
Constraint_t S() const
Definition: joint-generic.hpp:123
pinocchio::MotionTpl::Random
static MotionTpl Random()
Definition: motion-tpl.hpp:140
pinocchio::JointModelRevoluteTpl
Definition: multibody/joint/fwd.hpp:33
pinocchio::q
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
Definition: joint-configuration.hpp:1083
init< pinocchio::JointModelRevoluteUnalignedTpl< Scalar, Options > >::JointModel
pinocchio::JointModelRevoluteUnalignedTpl< Scalar, Options > JointModel
Definition: joint-generic.cpp:148
pinocchio::JointModelHelicalUnalignedTpl::setIndexes
void setIndexes(JointIndex id, int q, int v)
Definition: joint-model-base.hpp:186
pinocchio::JointModelBase::idx_v
int idx_v() const
Definition: joint-model-base.hpp:164
pinocchio::v
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
Definition: joint-configuration.hpp:1084
pinocchio::JointModelRevoluteUnalignedTpl
Definition: multibody/joint/fwd.hpp:38
pinocchio::JointModelPrismaticUnalignedTpl
Definition: multibody/joint/fwd.hpp:94
pinocchio::JointModelCompositeTpl
Definition: multibody/joint/fwd.hpp:141
pinocchio::isEqual
bool isEqual(const ConstraintDataTpl< Scalar, Options, ConstraintCollectionTpl > &cdata_generic, const ConstraintDataBase< ConstraintDataDerived > &cdata)
Definition: constraint-model-visitor.hpp:273
TestJoint::operator()
void operator()(const pinocchio::JointModelComposite &) const
Definition: joint-generic.cpp:295
pinocchio::traits< JointTest< _Scalar, _Options, JointCollectionTpl > >::ConfigVector_t
Eigen::Matrix< Scalar, Eigen::Dynamic, 1, Options > ConfigVector_t
Definition: joint-generic.cpp:347
pinocchio::JointModelBase::idx_q
int idx_q() const
Definition: joint-model-base.hpp:160
pinocchio::SE3Tpl::Random
static SE3Tpl Random()
Definition: spatial/se3-tpl.hpp:154
pinocchio::JointModelTpl::hasSameIndexes
bool hasSameIndexes(const JointModelBase< JointModelDerived > &other) const
Definition: joint-generic.hpp:329
pinocchio::JointModelTest::JointCollection
JointCollectionTpl< _Scalar, _Options > JointCollection
Definition: joint-generic.cpp:357
init::run
static JointModel_ run()
Definition: joint-generic.cpp:137
pinocchio::traits< JointDataTest< _Scalar, _Options, JointCollectionTpl > >::JointDerived
JointTpl< _Scalar, _Options, JointCollectionTpl > JointDerived
Definition: joint-generic.cpp:313
pinocchio::JointDataTpl::Dinv
D_t Dinv() const
Definition: joint-generic.hpp:145
liegroup.hpp
pinocchio::JointModelTest
Definition: joint-generic.cpp:306
pinocchio::JointModelRevoluteUnalignedTpl::Vector3
Eigen::Matrix< Scalar, 3, 1, _Options > Vector3
Definition: joint-revolute-unaligned.hpp:614
pinocchio::JointModelBase::calc
void calc(JointDataDerived &data, const Eigen::MatrixBase< ConfigVectorType > &qs) const
Definition: joint-model-base.hpp:107
pinocchio::JointModelPrismaticUnalignedTpl::setIndexes
void setIndexes(JointIndex id, int q, int v)
Definition: joint-model-base.hpp:186
pinocchio::JointDataBase::UDinv
UDTypeConstRef UDinv() const
Definition: joint-data-base.hpp:244
pinocchio::q1
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorIn1 > const Eigen::MatrixBase< ConfigVectorIn2 > & q1
Definition: joint-configuration.hpp:1138
pinocchio::traits
Common traits structure to fully define base classes for CRTP.
Definition: fwd.hpp:71
pinocchio::JointModelTest::VariantBase
JointCollection::JointModelVariant VariantBase
Definition: joint-generic.cpp:358
pinocchio::VectorSpaceOperationTpl
Definition: vector-space.hpp:16
TestJoint::operator()
void operator()(const JointModelBase< JointModel > &) const
Definition: joint-generic.cpp:286
pinocchio::JointModelBase::nv
int nv() const
Definition: joint-model-base.hpp:141
pinocchio::JointCollectionDefaultTpl
Definition: context/generic.hpp:15
pinocchio::MotionTpl
Definition: context/casadi.hpp:27
pinocchio::JointModelTest::JointModelTest
JointModelTest(const JointModelVariant &jmodel)
Definition: joint-generic.cpp:363
pinocchio::JointDataTpl::shortname
std::string shortname() const
Definition: joint-generic.hpp:221
dcrba.NV
NV
Definition: dcrba.py:536
pinocchio::ModelTpl
Definition: context/generic.hpp:20
dpendulum.NQ
int NQ
Definition: dpendulum.py:9
init
Definition: all-joints.cpp:20
pinocchio::JointDataTpl::M
Transformation_t M() const
Definition: joint-generic.hpp:127
pinocchio::JointModelMimic::setIndexes
void setIndexes(JointIndex id, int q, int v)
Definition: joint-model-base.hpp:186
init< pinocchio::JointModelHelicalTpl< Scalar, Options, axis > >::run
static JointModel run()
Definition: joint-generic.cpp:258
pinocchio::JointModelUniversalTpl::Vector3
Eigen::Matrix< Scalar, 3, 1, _Options > Vector3
Definition: joint-universal.hpp:409
pinocchio::JointDataBase::c
BiasTypeConstRef c() const
Definition: joint-data-base.hpp:219
BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(test_joint_from_joint_composite)
Definition: joint-generic.cpp:373
init< pinocchio::JointModelRevoluteUnalignedTpl< Scalar, Options > >::run
static JointModel run()
Definition: joint-generic.cpp:150
pinocchio::JointMotionSubspaceTpl
Definition: joint-motion-subspace-generic.hpp:48
pinocchio::traits< JointTest< _Scalar, _Options, JointCollectionTpl > >::D_t
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options > D_t
Definition: joint-generic.cpp:344
init< pinocchio::JointModelCompositeTpl< Scalar, Options, JointCollection > >::run
static JointModel run()
Definition: joint-generic.cpp:210
init< pinocchio::JointModelUniversalTpl< Scalar, Options > >::run
static JointModel run()
Definition: joint-generic.cpp:243
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:1082
pinocchio::JointModelTest::JointDerived
JointTest< _Scalar, _Options, JointCollectionTpl > JointDerived
Definition: joint-generic.cpp:356
pinocchio::JointModelTpl::shortname
std::string shortname() const
Definition: joint-generic.hpp:382
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27
pinocchio::JointModelTpl::calc
void calc(JointDataDerived &data, const Eigen::MatrixBase< ConfigVector > &q) const
Definition: joint-generic.hpp:350
pinocchio::JointModelBase::id
JointIndex id() const
Definition: joint-model-base.hpp:168


pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:30