casadi/joints.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2019-2020 INRIA
3 //
4 
6 
10 
11 #include <iostream>
12 #include <boost/test/unit_test.hpp>
13 #include <boost/utility/binary.hpp>
14 
15 BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE)
16 
17 BOOST_AUTO_TEST_CASE(test_jointRX_motion_space)
18 {
19  typedef casadi::SX AD_double;
20  typedef pinocchio::JointCollectionDefaultTpl<AD_double> JointCollectionAD;
21  typedef pinocchio::JointCollectionDefaultTpl<double> JointCollection;
22 
23  typedef pinocchio::SE3Tpl<AD_double> SE3AD;
24  typedef pinocchio::MotionTpl<AD_double> MotionAD;
28 
29  typedef Eigen::Matrix<AD_double, Eigen::Dynamic, 1> VectorXAD;
30  typedef Eigen::Matrix<AD_double, 6, 1> Vector6AD;
31 
32  typedef JointCollectionAD::JointModelRX JointModelRXAD;
33  typedef JointModelRXAD::ConfigVector_t ConfigVectorAD;
34  // typedef JointModelRXAD::TangentVector_t TangentVectorAD;
35  typedef JointCollectionAD::JointDataRX JointDataRXAD;
36 
38  typedef JointModelRX::ConfigVector_t ConfigVector;
39  typedef JointModelRX::TangentVector_t TangentVector;
41 
42  JointModelRX jmodel;
43  jmodel.setIndexes(0, 0, 0);
44  JointDataRX jdata(jmodel.createData());
45 
46  JointModelRXAD jmodel_ad = jmodel.cast<AD_double>();
47  JointDataRXAD jdata_ad(jmodel_ad.createData());
48 
49  typedef pinocchio::LieGroup<JointModelRX>::type JointOperation;
50  ConfigVector q(jmodel.nq());
51  JointOperation().random(q);
52 
53  casadi::SX cs_q = casadi::SX::sym("q", jmodel.nq());
54  ConfigVectorAD q_ad(jmodel.nq());
55  for (Eigen::DenseIndex k = 0; k < jmodel.nq(); ++k)
56  {
57  q_ad[k] = cs_q(k);
58  }
59 
60  // Zero order
61  jmodel_ad.calc(jdata_ad, q_ad);
62  jmodel.calc(jdata, q);
63 
64  SE3 M1(jdata.M);
65  SE3AD M2(jdata_ad.M);
66 
67  casadi::SX cs_trans(3, 1);
68  for (Eigen::DenseIndex k = 0; k < 3; ++k)
69  {
70  cs_trans(k) = M2.translation()[k];
71  }
72  casadi::SX cs_rot(3, 3);
73  for (Eigen::DenseIndex i = 0; i < 3; ++i)
74  {
75  for (Eigen::DenseIndex j = 0; j < 3; ++j)
76  {
77  cs_rot(i, j) = M2.rotation()(i, j);
78  }
79  }
80 
81  casadi::Function eval_placement(
82  "eval_placement", casadi::SXVector{cs_q}, casadi::SXVector{cs_trans, cs_rot});
83  std::cout << "Joint Placement = " << eval_placement << std::endl;
84 
85  std::vector<double> q_vec((size_t)jmodel.nq());
86  Eigen::Map<ConfigVector>(q_vec.data(), jmodel.nq(), 1) = q;
87  casadi::DMVector res = eval_placement(casadi::DMVector{q_vec});
88  std::cout << "M(q)=" << res << std::endl;
89 
90  BOOST_CHECK(M1.translation().isApprox(Eigen::Map<SE3::Vector3>(res[0]->data())));
91  BOOST_CHECK(M1.rotation().isApprox(Eigen::Map<SE3::Matrix3>(res[1]->data())));
92 
93  // First order
94  casadi::SX cs_v = casadi::SX::sym("v", jmodel.nv());
95  TangentVector v(TangentVector::Random(jmodel.nv()));
96  VectorXAD v_ad(jmodel_ad.nv());
97 
98  std::vector<double> v_vec((size_t)jmodel.nv());
99  Eigen::Map<TangentVector>(v_vec.data(), jmodel.nv(), 1) = v;
100 
101  for (Eigen::DenseIndex k = 0; k < jmodel.nv(); ++k)
102  {
103  v_ad[k] = cs_v(k);
104  }
105 
106  jmodel.calc(jdata, q, v);
107  Motion m(jdata.v);
108  JointMotionSubspaceXd Sref(jdata.S.matrix());
109 
110  jmodel_ad.calc(jdata_ad, q_ad, v_ad);
111  Vector6AD Y;
112  MotionAD m_ad(jdata_ad.v);
113 
114  casadi::SX cs_vel(6, 1);
115  for (Eigen::DenseIndex k = 0; k < 6; ++k)
116  {
117  cs_vel(k) = m_ad.toVector()[k];
118  }
119  casadi::Function eval_velocity(
120  "eval_velocity", casadi::SXVector{cs_q, cs_v}, casadi::SXVector{cs_vel});
121  std::cout << "Joint Velocity = " << eval_velocity << std::endl;
122 
123  casadi::DMVector res_vel = eval_velocity(casadi::DMVector{q_vec, v_vec});
124  std::cout << "v(q,v)=" << res_vel << std::endl;
125 
126  BOOST_CHECK(m.linear().isApprox(Eigen::Map<Motion::Vector3>(res_vel[0]->data())));
127  BOOST_CHECK(m.angular().isApprox(Eigen::Map<Motion::Vector3>(res_vel[0]->data() + 3)));
128 
129  casadi::SX dvel_dv = jacobian(cs_vel, cs_v);
130  casadi::Function eval_S("eval_S", casadi::SXVector{cs_q, cs_v}, casadi::SXVector{dvel_dv});
131  std::cout << "S = " << eval_S << std::endl;
132 
133  casadi::DMVector res_S = eval_S(casadi::DMVector{q_vec, v_vec});
134  std::cout << "res_S:" << res_S << std::endl;
135  JointMotionSubspaceXd::DenseBase Sref_mat = Sref.matrix();
136 
137  for (Eigen::DenseIndex i = 0; i < 6; ++i)
138  {
139  for (Eigen::DenseIndex j = 0; i < Sref.nv(); ++i)
140  BOOST_CHECK(
141  std::fabs(Sref_mat(i, j) - (double)res_S[0](i, j))
142  <= Eigen::NumTraits<double>::dummy_precision());
143  }
144 }
145 
146 template<typename JointModel_>
147 struct init;
148 
149 template<typename JointModel_>
150 struct init
151 {
152  static JointModel_ run()
153  {
154  JointModel_ jmodel;
155  jmodel.setIndexes(0, 0, 0);
156  return jmodel;
157  }
158 
159  static std::string name()
160  {
161  return "default " + JointModel_::classname();
162  }
163 };
164 
165 template<typename Scalar, int Options>
166 struct init<pinocchio::JointModelRevoluteUnalignedTpl<Scalar, Options>>
167 {
169 
170  static JointModel run()
171  {
172  typedef typename JointModel::Vector3 Vector3;
173  JointModel jmodel(Vector3::Random().normalized());
174 
175  jmodel.setIndexes(0, 0, 0);
176  return jmodel;
177  }
178 
179  static std::string name()
180  {
181  return JointModel::classname();
182  }
183 };
184 
185 template<typename Scalar, int Options>
186 struct init<pinocchio::JointModelRevoluteUnboundedUnalignedTpl<Scalar, Options>>
187 {
189 
190  static JointModel run()
191  {
192  typedef typename JointModel::Vector3 Vector3;
193  JointModel jmodel(Vector3::Random().normalized());
194 
195  jmodel.setIndexes(0, 0, 0);
196  return jmodel;
197  }
198 
199  static std::string name()
200  {
201  return JointModel::classname();
202  }
203 };
204 
205 template<typename Scalar, int Options>
206 struct init<pinocchio::JointModelPrismaticUnalignedTpl<Scalar, Options>>
207 {
209 
210  static JointModel run()
211  {
212  typedef typename JointModel::Vector3 Vector3;
213  JointModel jmodel(Vector3::Random().normalized());
214 
215  jmodel.setIndexes(0, 0, 0);
216  return jmodel;
217  }
218 
219  static std::string name()
220  {
221  return JointModel::classname();
222  }
223 };
224 
225 template<typename Scalar, int Options, template<typename, int> class JointCollection>
226 struct init<pinocchio::JointModelTpl<Scalar, Options, JointCollection>>
227 {
229 
230  static JointModel run()
231  {
233  JointModel jmodel((JointModelRX()));
234 
235  jmodel.setIndexes(0, 0, 0);
236  return jmodel;
237  }
238 
239  static std::string name()
240  {
241  return JointModel::classname();
242  }
243 };
244 
245 template<typename Scalar, int Options, template<typename, int> class JointCollection>
246 struct init<pinocchio::JointModelCompositeTpl<Scalar, Options, JointCollection>>
247 {
249 
250  static JointModel run()
251  {
254  JointModel jmodel((JointModelRX()));
255  jmodel.addJoint(JointModelRY());
256 
257  jmodel.setIndexes(0, 0, 0);
258  return jmodel;
259  }
260 
261  static std::string name()
262  {
263  return JointModel::classname();
264  }
265 };
266 
267 template<typename JointModel_>
268 struct init<pinocchio::JointModelMimic<JointModel_>>
269 {
271 
272  static JointModel run()
273  {
274  JointModel_ jmodel_ref = init<JointModel_>::run();
275 
276  JointModel jmodel(jmodel_ref, 1., 0.);
277 
278  return jmodel;
279  }
280 
281  static std::string name()
282  {
283  return JointModel::classname();
284  }
285 };
286 
288 {
289  template<typename JointModel_>
291  {
292  JointModel_ jmodel = init<JointModel_>::run();
293  jmodel.setIndexes(0, 0, 0);
294  test(jmodel);
295  }
296 
297  template<typename Scalar, int Options, int axis>
299  {
301  JointModel jmodel(Scalar(0.4));
302  jmodel.setIndexes(0, 0, 0);
303 
304  test(jmodel);
305  }
306 
307  template<typename Scalar, int Options>
309  {
311  typedef typename JointModel::Vector3 Vector3;
312  JointModel jmodel(Vector3::UnitX(), Vector3::UnitY());
313  jmodel.setIndexes(0, 0, 0);
314 
315  test(jmodel);
316  }
317 
318  template<typename Scalar, int Options>
320  {
322  typedef typename JointModel::Vector3 Vector3;
323  JointModel jmodel(Vector3::Random().normalized());
324  jmodel.setIndexes(0, 0, 0);
325 
326  test(jmodel);
327  }
328 
329  template<typename Scalar, int Options>
331  {
333  typedef typename JointModel::Vector3 Vector3;
334  JointModel jmodel(Vector3::Random().normalized());
335  jmodel.setIndexes(0, 0, 0);
336 
337  test(jmodel);
338  }
339 
340  template<typename Scalar, int Options>
342  {
344  typedef typename JointModel::Vector3 Vector3;
345  JointModel jmodel(Vector3::Random().normalized());
346  jmodel.setIndexes(0, 0, 0);
347 
348  test(jmodel);
349  }
350 
351  template<typename Scalar, int Options>
353  {
355  typedef typename JointModel::Vector3 Vector3;
356  JointModel jmodel(Vector3::Random().normalized());
357  jmodel.setIndexes(0, 0, 0);
358 
359  test(jmodel);
360  }
361 
362  template<typename Scalar, int Options, template<typename, int> class JointCollection>
364  {
367  JointModel jmodel((JointModelRX()));
368  jmodel.setIndexes(0, 0, 0);
369 
370  test(jmodel);
371  }
372 
373  template<typename Scalar, int Options, template<typename, int> class JointCollection>
375  {
379  JointModel jmodel((JointModelRX()));
380  jmodel.addJoint(JointModelRY());
381  jmodel.setIndexes(0, 0, 0);
382 
383  test(jmodel);
384  }
385 
386  // TODO: get the nq and nv quantity from LieGroups
387  template<typename JointModel_>
388  static void test(const pinocchio::JointModelMimic<JointModel_> & /*jmodel*/)
389  { /* do nothing */
390  }
391 
392  template<typename JointModel>
393  static void test(const pinocchio::JointModelBase<JointModel> & jmodel)
394  {
395  std::cout << "--" << std::endl;
396  std::cout << "jmodel: " << jmodel.shortname() << std::endl;
397 
398  typedef casadi::SX AD_double;
399 
400  typedef pinocchio::SE3Tpl<AD_double> SE3AD;
401  typedef pinocchio::MotionTpl<AD_double> MotionAD;
405 
406  typedef Eigen::Matrix<AD_double, Eigen::Dynamic, 1> VectorXAD;
407  typedef Eigen::Matrix<AD_double, 6, 1> Vector6AD;
408 
409  typedef typename pinocchio::CastType<AD_double, JointModel>::type JointModelAD;
410  typedef typename JointModelAD::JointDataDerived JointDataAD;
411 
412  typedef typename JointModelAD::ConfigVector_t ConfigVectorAD;
413 
414  typedef typename JointModel::JointDataDerived JointData;
415  typedef typename JointModel::ConfigVector_t ConfigVector;
416  typedef typename JointModel::TangentVector_t TangentVector;
417 
418  JointData jdata(jmodel.createData());
419  pinocchio::JointDataBase<JointData> & jdata_base = jdata;
420 
421  JointModelAD jmodel_ad = jmodel.template cast<AD_double>();
422  JointDataAD jdata_ad(jmodel_ad.createData());
423  pinocchio::JointDataBase<JointDataAD> & jdata_ad_base = jdata_ad;
424 
425  ConfigVector q(jmodel.nq());
426 
427  ConfigVector lb(ConfigVector::Constant(jmodel.nq(), -1.));
428  ConfigVector ub(ConfigVector::Constant(jmodel.nq(), 1.));
429 
430  typedef pinocchio::RandomConfigurationStep<
431  pinocchio::LieGroupMap, ConfigVector, ConfigVector, ConfigVector>
432  RandomConfigAlgo;
433  RandomConfigAlgo::run(jmodel.derived(), typename RandomConfigAlgo::ArgsType(q, lb, ub));
434 
435  casadi::SX cs_q = casadi::SX::sym("q", jmodel.nq());
436  ConfigVectorAD q_ad(jmodel.nq());
437  for (Eigen::DenseIndex k = 0; k < jmodel.nq(); ++k)
438  {
439  q_ad[k] = cs_q(k);
440  }
441 
442  // Zero order
443  jmodel_ad.calc(jdata_ad, q_ad);
444  jmodel.calc(jdata, q);
445 
446  SE3 M1(jdata_base.M());
447  SE3AD M2(jdata_ad_base.M());
448 
449  casadi::SX cs_trans(3, 1);
450  for (Eigen::DenseIndex k = 0; k < 3; ++k)
451  {
452  cs_trans(k) = M2.translation()[k];
453  }
454  casadi::SX cs_rot(3, 3);
455  for (Eigen::DenseIndex i = 0; i < 3; ++i)
456  {
457  for (Eigen::DenseIndex j = 0; j < 3; ++j)
458  {
459  cs_rot(i, j) = M2.rotation()(i, j);
460  }
461  }
462 
463  casadi::Function eval_placement(
464  "eval_placement", casadi::SXVector{cs_q}, casadi::SXVector{cs_trans, cs_rot});
465  std::cout << "Joint Placement = " << eval_placement << std::endl;
466 
467  std::vector<double> q_vec((size_t)jmodel.nq());
468  Eigen::Map<ConfigVector>(q_vec.data(), jmodel.nq(), 1) = q;
469  casadi::DMVector res = eval_placement(casadi::DMVector{q_vec});
470  std::cout << "M(q)=" << res << std::endl;
471 
472  BOOST_CHECK(M1.translation().isApprox(Eigen::Map<SE3::Vector3>(res[0]->data())));
473  BOOST_CHECK(M1.rotation().isApprox(Eigen::Map<SE3::Matrix3>(res[1]->data())));
474 
475  // First order
476  casadi::SX cs_v = casadi::SX::sym("v", jmodel.nv());
477  TangentVector v(TangentVector::Random(jmodel.nv()));
478  VectorXAD v_ad(jmodel_ad.nv());
479 
480  std::vector<double> v_vec((size_t)jmodel.nv());
481  Eigen::Map<TangentVector>(v_vec.data(), jmodel.nv(), 1) = v;
482 
483  for (Eigen::DenseIndex k = 0; k < jmodel.nv(); ++k)
484  {
485  v_ad[k] = cs_v(k);
486  }
487 
488  jmodel.calc(jdata, q, v);
489  Motion m(jdata_base.v());
490  JointMotionSubspaceXd Sref(jdata_base.S().matrix());
491 
492  jmodel_ad.calc(jdata_ad, q_ad, v_ad);
493  Vector6AD Y;
494  MotionAD m_ad(jdata_ad_base.v());
495 
496  casadi::SX cs_vel(6, 1);
497  for (Eigen::DenseIndex k = 0; k < 6; ++k)
498  {
499  cs_vel(k) = m_ad.toVector()[k];
500  }
501  casadi::Function eval_velocity(
502  "eval_velocity", casadi::SXVector{cs_q, cs_v}, casadi::SXVector{cs_vel});
503  std::cout << "Joint Velocity = " << eval_velocity << std::endl;
504 
505  casadi::DMVector res_vel = eval_velocity(casadi::DMVector{q_vec, v_vec});
506  std::cout << "v(q,v)=" << res_vel << std::endl;
507 
508  BOOST_CHECK(m.linear().isApprox(Eigen::Map<Motion::Vector3>(res_vel[0]->data())));
509  BOOST_CHECK(m.angular().isApprox(Eigen::Map<Motion::Vector3>(res_vel[0]->data() + 3)));
510 
511  casadi::SX dvel_dv = jacobian(cs_vel, cs_v);
512  casadi::Function eval_S("eval_S", casadi::SXVector{cs_q, cs_v}, casadi::SXVector{dvel_dv});
513  std::cout << "S = " << eval_S << std::endl;
514 
515  casadi::DMVector res_S = eval_S(casadi::DMVector{q_vec, v_vec});
516  std::cout << "res_S:" << res_S << std::endl;
517  JointMotionSubspaceXd::DenseBase Sref_mat = Sref.matrix();
518 
519  for (Eigen::DenseIndex i = 0; i < 6; ++i)
520  {
521  for (Eigen::DenseIndex j = 0; i < Sref.nv(); ++i)
522  BOOST_CHECK(
523  std::fabs(Sref_mat(i, j) - (double)res_S[0](i, j))
524  <= Eigen::NumTraits<double>::dummy_precision());
525  }
526 
527  std::cout << "--" << std::endl << std::endl;
528  }
529 };
530 
531 BOOST_AUTO_TEST_CASE(test_all_joints)
532 {
534  boost::mpl::for_each<JointModelVariant::types>(TestADOnJoints());
535 
537 }
538 
539 BOOST_AUTO_TEST_SUITE_END()
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
pinocchio::JointModelBase::createData
JointDataDerived createData() const
Definition: joint-model-base.hpp:91
init< pinocchio::JointModelRevoluteUnalignedTpl< Scalar, Options > >::name
static std::string name()
Definition: casadi/joints.cpp:179
pinocchio::JointDataBase::v
MotionTypeConstRef v() const
Definition: joint-data-base.hpp:211
init< pinocchio::JointModelPrismaticUnalignedTpl< Scalar, Options > >::JointModel
pinocchio::JointModelPrismaticUnalignedTpl< Scalar, Options > JointModel
Definition: casadi/joints.cpp:208
pinocchio::JointModelRevoluteUnboundedUnalignedTpl
Definition: multibody/joint/fwd.hpp:46
test-cpp2pybind11.m
m
Definition: test-cpp2pybind11.py:25
TestADOnJoints::operator()
void operator()(const pinocchio::JointModelRevoluteUnalignedTpl< Scalar, Options > &) const
Definition: casadi/joints.cpp:330
pinocchio::JointModelHelicalTpl
Definition: multibody/joint/fwd.hpp:60
init< pinocchio::JointModelCompositeTpl< Scalar, Options, JointCollection > >::JointModel
pinocchio::JointModelCompositeTpl< Scalar, Options, JointCollection > JointModel
Definition: casadi/joints.cpp:248
pinocchio::JointModelMimic
Definition: joint-mimic.hpp:307
pinocchio::JointModelRevoluteUnboundedUnalignedTpl::setIndexes
void setIndexes(JointIndex id, int q, int v)
Definition: joint-model-base.hpp:186
TestADOnJoints::operator()
void operator()(const pinocchio::JointModelBase< JointModel_ > &) const
Definition: casadi/joints.cpp:290
pinocchio::python::context::JointDataRX
JointDataRevoluteTpl< Scalar, Options, 0 > JointDataRX
Definition: bindings/python/context/generic.hpp:72
omniidl_be_python_with_docstring.run
def run(tree, args)
Definition: cmake/hpp/idl/omniidl_be_python_with_docstring.py:140
init< pinocchio::JointModelMimic< JointModel_ > >::JointModel
pinocchio::JointModelMimic< JointModel_ > JointModel
Definition: casadi/joints.cpp:270
pinocchio::JointModelBase
Definition: joint-model-base.hpp:75
pinocchio.casadi::sym
void sym(const Eigen::MatrixBase< MatrixDerived > &eig_mat, std::string const &name)
Definition: autodiff/casadi.hpp:230
pinocchio::SE3Tpl
Definition: context/casadi.hpp:29
pinocchio::JointDataBase
Definition: joint-data-base.hpp:161
inverse-kinematics.i
int i
Definition: inverse-kinematics.py:17
TestADOnJoints::operator()
void operator()(const pinocchio::JointModelCompositeTpl< Scalar, Options, JointCollection > &) const
Definition: casadi/joints.cpp:374
pinocchio::JointDataBase::M
TansformTypeConstRef M() const
Definition: joint-data-base.hpp:203
init< pinocchio::JointModelMimic< JointModel_ > >::name
static std::string name()
Definition: casadi/joints.cpp:281
init< pinocchio::JointModelTpl< Scalar, Options, JointCollection > >::run
static JointModel run()
Definition: casadi/joints.cpp:230
pinocchio::python::Scalar
context::Scalar Scalar
Definition: admm-solver.cpp:29
pinocchio::python::context::Motion
MotionTpl< Scalar, Options > Motion
Definition: bindings/python/context/generic.hpp:54
liegroup-algo.hpp
init< pinocchio::JointModelRevoluteUnboundedUnalignedTpl< Scalar, Options > >::name
static std::string name()
Definition: casadi/joints.cpp:199
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
init< pinocchio::JointModelPrismaticUnalignedTpl< Scalar, Options > >::name
static std::string name()
Definition: casadi/joints.cpp:219
TestADOnJoints::operator()
void operator()(const pinocchio::JointModelHelicalTpl< Scalar, Options, axis > &) const
Definition: casadi/joints.cpp:298
TestADOnJoints::operator()
void operator()(const pinocchio::JointModelPrismaticUnalignedTpl< Scalar, Options > &) const
Definition: casadi/joints.cpp:352
init< pinocchio::JointModelMimic< JointModel_ > >::run
static JointModel run()
Definition: casadi/joints.cpp:272
pinocchio::JointModelTpl::setIndexes
void setIndexes(JointIndex id, int nq, int nv)
Definition: joint-generic.hpp:414
pinocchio::python::context::JointModel
JointModelTpl< Scalar, Options > JointModel
Definition: bindings/python/context/generic.hpp:69
init< pinocchio::JointModelRevoluteUnboundedUnalignedTpl< Scalar, Options > >::run
static JointModel run()
Definition: casadi/joints.cpp:190
res
res
pinocchio::JointDataBase::S
ConstraintTypeConstRef S() const
Definition: joint-data-base.hpp:195
pinocchio::LieGroupMap
Definition: liegroup.hpp:17
TestADOnJoints
Definition: casadi/joints.cpp:287
joint-generic.hpp
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
Definition: multibody/joint/fwd.hpp:155
TestADOnJoints::operator()
void operator()(const pinocchio::JointModelUniversalTpl< Scalar, Options > &) const
Definition: casadi/joints.cpp:308
cartpole.v
v
Definition: cartpole.py:153
pinocchio::JointModelBase::shortname
std::string shortname() const
Definition: joint-model-base.hpp:214
pinocchio::JointModelHelicalUnalignedTpl
Definition: multibody/joint/fwd.hpp:65
init< pinocchio::JointModelRevoluteUnboundedUnalignedTpl< Scalar, Options > >::JointModel
pinocchio::JointModelRevoluteUnboundedUnalignedTpl< Scalar, Options > JointModel
Definition: casadi/joints.cpp:188
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: casadi/joints.cpp:228
pinocchio::context::Vector3
Eigen::Matrix< Scalar, 3, 1, Options > Vector3
Definition: context/generic.hpp:53
init< pinocchio::JointModelPrismaticUnalignedTpl< Scalar, Options > >::run
static JointModel run()
Definition: casadi/joints.cpp:210
BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(test_jointRX_motion_space)
Definition: casadi/joints.cpp:17
q
q
pinocchio::JointModel
JointModelTpl< context::Scalar > JointModel
Definition: multibody/joint/fwd.hpp:155
pinocchio::JointModelBase::nq
int nq() const
Definition: joint-model-base.hpp:145
pinocchio::jacobian
void jacobian(const ConstraintModelTpl< Scalar, Options, ConstraintCollectionTpl > &cmodel, ConstraintDataTpl< Scalar, Options, ConstraintCollectionTpl > &cdata, const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< JacobianMatrix > &jacobian_matrix)
Definition: constraint-model-visitor.hpp:199
pinocchio::JointModelRevoluteTpl
Definition: multibody/joint/fwd.hpp:33
TestADOnJoints::operator()
void operator()(const pinocchio::JointModelTpl< Scalar, Options, JointCollection > &) const
Definition: casadi/joints.cpp:363
init< pinocchio::JointModelRevoluteUnalignedTpl< Scalar, Options > >::JointModel
pinocchio::JointModelRevoluteUnalignedTpl< Scalar, Options > JointModel
Definition: casadi/joints.cpp:168
init::name
static std::string name()
Definition: casadi/joints.cpp:159
pinocchio::JointModelRevoluteUnalignedTpl
Definition: multibody/joint/fwd.hpp:38
pinocchio::JointModelPrismaticUnalignedTpl
Definition: multibody/joint/fwd.hpp:94
pinocchio::JointModelCompositeTpl
Definition: multibody/joint/fwd.hpp:141
TestADOnJoints::test
static void test(const pinocchio::JointModelBase< JointModel > &jmodel)
Definition: casadi/joints.cpp:393
init< pinocchio::JointModelCompositeTpl< Scalar, Options, JointCollection > >::name
static std::string name()
Definition: casadi/joints.cpp:261
init::run
static JointModel_ run()
Definition: casadi/joints.cpp:152
pinocchio::python::context::JointModelRY
JointModelRevoluteTpl< Scalar, Options, 1 > JointModelRY
Definition: bindings/python/context/generic.hpp:76
liegroup.hpp
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
init< pinocchio::JointModelTpl< Scalar, Options, JointCollection > >::name
static std::string name()
Definition: casadi/joints.cpp:239
Y
Y
casadi.hpp
pinocchio::python::context::JointData
JointDataTpl< Scalar, Options > JointData
Definition: bindings/python/context/generic.hpp:70
pinocchio::VectorSpaceOperationTpl
Definition: vector-space.hpp:16
pinocchio::JointModelBase::nv
int nv() const
Definition: joint-model-base.hpp:141
pinocchio::python::context::SE3
SE3Tpl< Scalar, Options > SE3
Definition: bindings/python/context/generic.hpp:53
pinocchio::JointCollectionDefaultTpl
Definition: context/generic.hpp:15
pinocchio::MotionTpl
Definition: context/casadi.hpp:27
pinocchio::CastType
Type of the cast of a class C templated by Scalar and Options, to a new NewScalar type....
Definition: fwd.hpp:99
TestADOnJoints::test
static void test(const pinocchio::JointModelMimic< JointModel_ > &)
Definition: casadi/joints.cpp:388
init
Definition: all-joints.cpp:20
TestADOnJoints::operator()
void operator()(const pinocchio::JointModelRevoluteUnboundedUnalignedTpl< Scalar, Options > &) const
Definition: casadi/joints.cpp:341
TestADOnJoints::operator()
void operator()(const pinocchio::JointModelHelicalUnalignedTpl< Scalar, Options > &) const
Definition: casadi/joints.cpp:319
pinocchio::JointCollectionDefaultTpl::JointModelVariant
boost::variant< JointModelRX, JointModelRY, JointModelRZ, JointModelMimicRX, JointModelMimicRY, JointModelMimicRZ, JointModelFreeFlyer, JointModelPlanar, JointModelRevoluteUnaligned, JointModelSpherical, JointModelSphericalZYX, JointModelPX, JointModelPY, JointModelPZ, JointModelPrismaticUnaligned, JointModelTranslation, JointModelRUBX, JointModelRUBY, JointModelRUBZ, JointModelRevoluteUnboundedUnaligned, JointModelHx, JointModelHy, JointModelHz, JointModelHelicalUnaligned, JointModelUniversal, boost::recursive_wrapper< JointModelComposite > > JointModelVariant
Definition: joint-collection.hpp:113
init< pinocchio::JointModelRevoluteUnalignedTpl< Scalar, Options > >::run
static JointModel run()
Definition: casadi/joints.cpp:170
pinocchio::JointMotionSubspaceTpl
Definition: joint-motion-subspace-generic.hpp:48
pinocchio::JointModelBase::derived
JointModelDerived & derived()
Definition: joint-model-base.hpp:82
pinocchio::JointMotionSubspaceXd
JointMotionSubspaceTpl< Eigen::Dynamic, context::Scalar, context::Options > JointMotionSubspaceXd
Definition: joint-motion-subspace.hpp:20
init< pinocchio::JointModelCompositeTpl< Scalar, Options, JointCollection > >::run
static JointModel run()
Definition: casadi/joints.cpp:250
pinocchio::python::context::JointModelRX
JointModelRevoluteTpl< Scalar, Options, 0 > JointModelRX
Definition: bindings/python/context/generic.hpp:73
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


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