pinocchio  2.3.1-dirty
joint-prismatic.hpp
1 //
2 // Copyright (c) 2015-2019 CNRS INRIA
3 // Copyright (c) 2015-2016 Wandercraft, 86 rue de Paris 91400 Orsay, France.
4 //
5 
6 #ifndef __pinocchio_joint_prismatic_hpp__
7 #define __pinocchio_joint_prismatic_hpp__
8 
9 #include "pinocchio/macros.hpp"
10 #include "pinocchio/multibody/joint/joint-base.hpp"
11 #include "pinocchio/multibody/constraint.hpp"
12 #include "pinocchio/spatial/inertia.hpp"
13 #include "pinocchio/spatial/spatial-axis.hpp"
14 #include "pinocchio/utils/axis-label.hpp"
15 
16 namespace pinocchio
17 {
18 
19  template<typename Scalar, int Options, int _axis> struct MotionPrismaticTpl;
20 
21  template<typename Scalar, int Options, int axis>
22  struct SE3GroupAction< MotionPrismaticTpl<Scalar,Options,axis> >
23  {
25  };
26 
27  template<typename Scalar, int Options, int axis, typename MotionDerived>
28  struct MotionAlgebraAction< MotionPrismaticTpl<Scalar,Options,axis>, MotionDerived>
29  {
31  };
32 
33  template<typename _Scalar, int _Options, int _axis>
34  struct traits < MotionPrismaticTpl<_Scalar,_Options,_axis> >
35  {
36  typedef _Scalar Scalar;
37  enum { Options = _Options };
38  typedef Eigen::Matrix<Scalar,3,1,Options> Vector3;
39  typedef Eigen::Matrix<Scalar,6,1,Options> Vector6;
40  typedef Eigen::Matrix<Scalar,6,6,Options> Matrix6;
41  typedef typename PINOCCHIO_EIGEN_REF_CONST_TYPE(Vector6) ToVectorConstReturnType;
42  typedef typename PINOCCHIO_EIGEN_REF_TYPE(Vector6) ToVectorReturnType;
43  typedef Vector3 AngularType;
44  typedef Vector3 LinearType;
45  typedef const Vector3 ConstAngularType;
46  typedef const Vector3 ConstLinearType;
47  typedef Matrix6 ActionMatrixType;
49  typedef MotionPlain PlainReturnType;
50  enum {
51  LINEAR = 0,
52  ANGULAR = 3
53  };
54  }; // struct traits MotionPrismaticTpl
55 
56  template<typename _Scalar, int _Options, int _axis>
57  struct MotionPrismaticTpl
58  : MotionBase < MotionPrismaticTpl<_Scalar,_Options,_axis> >
59  {
60  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
61  MOTION_TYPEDEF_TPL(MotionPrismaticTpl);
62 
63  enum { axis = _axis };
64 
65  typedef SpatialAxis<_axis+LINEAR> Axis;
66  typedef typename Axis::CartesianAxis3 CartesianAxis3;
67 
69  MotionPrismaticTpl(const Scalar & v) : m_v(v) {}
70 
71  inline PlainReturnType plain() const { return Axis() * m_v; }
72 
73  template<typename OtherScalar>
74  MotionPrismaticTpl __mult__(const OtherScalar & alpha) const
75  {
76  return MotionPrismaticTpl(alpha*m_v);
77  }
78 
79  template<typename Derived>
80  void addTo(MotionDense<Derived> & other) const
81  {
82  typedef typename MotionDense<Derived>::Scalar OtherScalar;
83  other.linear()[_axis] += (OtherScalar) m_v;
84  }
85 
86  template<typename MotionDerived>
87  void setTo(MotionDense<MotionDerived> & other) const
88  {
89  for(Eigen::DenseIndex k = 0; k < 3; ++k)
90  other.linear()[k] = k == axis ? m_v : (Scalar)0;
91  other.angular().setZero();
92  }
93 
94  template<typename S2, int O2, typename D2>
95  void se3Action_impl(const SE3Tpl<S2,O2> & m, MotionDense<D2> & v) const
96  {
97  v.angular().setZero();
98  v.linear().noalias() = m_v * (m.rotation().col(axis));
99  }
100 
101  template<typename S2, int O2>
102  MotionPlain se3Action_impl(const SE3Tpl<S2,O2> & m) const
103  {
104  MotionPlain res;
105  se3Action_impl(m,res);
106  return res;
107  }
108 
109  template<typename S2, int O2, typename D2>
110  void se3ActionInverse_impl(const SE3Tpl<S2,O2> & m, MotionDense<D2> & v) const
111  {
112  // Linear
113  v.linear().noalias() = m_v * (m.rotation().transpose().col(axis));
114 
115  // Angular
116  v.angular().setZero();
117  }
118 
119  template<typename S2, int O2>
120  MotionPlain se3ActionInverse_impl(const SE3Tpl<S2,O2> & m) const
121  {
122  MotionPlain res;
123  se3ActionInverse_impl(m,res);
124  return res;
125  }
126 
127  template<typename M1, typename M2>
128  void motionAction(const MotionDense<M1> & v, MotionDense<M2> & mout) const
129  {
130  // Linear
131  CartesianAxis3::alphaCross(-m_v,v.angular(),mout.linear());
132 
133  // Angular
134  mout.angular().setZero();
135  }
136 
137  template<typename M1>
138  MotionPlain motionAction(const MotionDense<M1> & v) const
139  {
140  MotionPlain res;
141  motionAction(v,res);
142  return res;
143  }
144 
145  Scalar & linearRate() { return m_v; }
146  const Scalar & linearRate() const { return m_v; }
147 
148  bool isEqual_impl(const MotionPrismaticTpl & other) const
149  {
150  return m_v == other.m_v;
151  }
152 
153  protected:
154 
155  Scalar m_v;
156  }; // struct MotionPrismaticTpl
157 
158  template<typename Scalar, int Options, int axis, typename MotionDerived>
159  typename MotionDerived::MotionPlain
160  operator+(const MotionPrismaticTpl<Scalar,Options,axis> & m1,
161  const MotionDense<MotionDerived> & m2)
162  {
163  typename MotionDerived::MotionPlain res(m2);
164  res += m1;
165  return res;
166  }
167 
168  template<typename MotionDerived, typename S2, int O2, int axis>
169  EIGEN_STRONG_INLINE
170  typename MotionDerived::MotionPlain
171  operator^(const MotionDense<MotionDerived> & m1, const MotionPrismaticTpl<S2,O2,axis> & m2)
172  {
173  return m2.motionAction(m1);
174  }
175 
176  template<typename Scalar, int Options, int axis> struct TransformPrismaticTpl;
177 
178  template<typename _Scalar, int _Options, int _axis>
179  struct traits< TransformPrismaticTpl<_Scalar,_Options,_axis> >
180  {
181  enum {
182  axis = _axis,
183  Options = _Options,
184  LINEAR = 0,
185  ANGULAR = 3
186  };
187  typedef _Scalar Scalar;
189  typedef Eigen::Matrix<Scalar,3,1,Options> Vector3;
190  typedef Eigen::Matrix<Scalar,3,3,Options> Matrix3;
191  typedef typename Matrix3::IdentityReturnType AngularType;
192  typedef AngularType AngularRef;
193  typedef AngularType ConstAngularRef;
194  typedef Vector3 LinearType;
195  typedef const Vector3 LinearRef;
196  typedef const Vector3 ConstLinearRef;
197  typedef typename traits<PlainType>::ActionMatrixType ActionMatrixType;
198  typedef typename traits<PlainType>::HomogeneousMatrixType HomogeneousMatrixType;
199  }; // traits TransformPrismaticTpl
200 
201  template<typename Scalar, int Options, int axis>
202  struct SE3GroupAction< TransformPrismaticTpl<Scalar,Options,axis> >
203  { typedef typename traits <TransformPrismaticTpl<Scalar,Options,axis> >::PlainType ReturnType; };
204 
205  template<typename _Scalar, int _Options, int axis>
206  struct TransformPrismaticTpl : SE3Base< TransformPrismaticTpl<_Scalar,_Options,axis> >
207  {
208  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
209  PINOCCHIO_SE3_TYPEDEF_TPL(TransformPrismaticTpl);
210  typedef typename traits<TransformPrismaticTpl>::PlainType PlainType;
211 
212  typedef SpatialAxis<axis+LINEAR> Axis;
213  typedef typename Axis::CartesianAxis3 CartesianAxis3;
214 
216  TransformPrismaticTpl(const Scalar & displacement)
217  : m_displacement(displacement)
218  {}
219 
220  PlainType plain() const
221  {
222  PlainType res(PlainType::Identity());
223  res.rotation().setIdentity();
224  res.translation()[axis] = m_displacement;
225 
226  return res;
227  }
228 
229  operator PlainType() const { return plain(); }
230 
231  template<typename S2, int O2>
233  se3action(const SE3Tpl<S2,O2> & m) const
234  {
235  typedef typename SE3GroupAction<TransformPrismaticTpl>::ReturnType ReturnType;
236  ReturnType res(m);
237  res.translation()[axis] += m_displacement;
238 
239  return res;
240  }
241 
242  const Scalar & displacement() const { return m_displacement; }
243  Scalar & displacement() { return m_displacement; }
244 
245  ConstLinearRef translation() const { return CartesianAxis3()*displacement(); };
246  AngularType rotation() const { return AngularType(3,3); }
247 
248  bool isEqual(const TransformPrismaticTpl & other) const
249  {
250  return m_displacement == other.m_displacement;
251  }
252 
253  protected:
254 
255  Scalar m_displacement;
256  };
257 
258  template<typename Scalar, int Options, int axis> struct ConstraintPrismaticTpl;
259 
260  template<typename _Scalar, int _Options, int axis>
261  struct traits< ConstraintPrismaticTpl<_Scalar,_Options,axis> >
262  {
263  typedef _Scalar Scalar;
264  enum { Options = _Options };
265  enum {
266  LINEAR = 0,
267  ANGULAR = 3
268  };
270  typedef Eigen::Matrix<Scalar,1,1,Options> JointForce;
271  typedef Eigen::Matrix<Scalar,6,1,Options> DenseBase;
272  typedef DenseBase MatrixReturnType;
273  typedef const DenseBase ConstMatrixReturnType;
274  }; // traits ConstraintRevolute
275 
276  template<typename Scalar, int Options, int axis>
277  struct SE3GroupAction< ConstraintPrismaticTpl<Scalar,Options,axis> >
278  { typedef Eigen::Matrix<Scalar,6,1,Options> ReturnType; };
279 
280  template<typename Scalar, int Options, int axis, typename MotionDerived>
281  struct MotionAlgebraAction< ConstraintPrismaticTpl<Scalar,Options,axis>, MotionDerived >
282  { typedef Eigen::Matrix<Scalar,6,1,Options> ReturnType; };
283 
284  template<typename Scalar, int Options, int axis, typename ForceDerived>
285  struct ConstraintForceOp< ConstraintPrismaticTpl<Scalar,Options,axis>, ForceDerived>
286  { typedef typename ForceDense<ForceDerived>::ConstLinearType::template ConstFixedSegmentReturnType<1>::Type ReturnType; };
287 
288  template<typename Scalar, int Options, int axis, typename ForceSet>
289  struct ConstraintForceSetOp< ConstraintPrismaticTpl<Scalar,Options,axis>, ForceSet>
290  { typedef typename Eigen::MatrixBase<ForceSet>::ConstRowXpr ReturnType; };
291 
292  template<typename _Scalar, int _Options, int axis>
294  : ConstraintBase < ConstraintPrismaticTpl <_Scalar,_Options,axis> >
295  {
296  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
297  PINOCCHIO_CONSTRAINT_TYPEDEF_TPL(ConstraintPrismaticTpl)
298  enum { NV = 1 };
299 
300  typedef SpatialAxis<LINEAR+axis> Axis;
301 
303 
304  template<typename Vector1Like>
305  JointMotion __mult__(const Eigen::MatrixBase<Vector1Like> & v) const
306  {
307  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Vector1Like,1);
308  assert(v.size() == 1);
309  return JointMotion(v[0]);
310  }
311 
312  template<typename S2, int O2>
314  se3Action(const SE3Tpl<S2,O2> & m) const
315  {
317  MotionRef<DenseBase> v(res);
318  v.linear() = m.rotation().col(axis);
319  v.angular().setZero();
320  return res;
321  }
322 
323  template<typename S2, int O2>
325  se3ActionInverse(const SE3Tpl<S2,O2> & m) const
326  {
328  MotionRef<DenseBase> v(res);
329  v.linear() = m.rotation().transpose().col(axis);
330  v.angular().setZero();
331  return res;
332  }
333 
334  int nv_impl() const { return NV; }
335 
337  {
338  const ConstraintPrismaticTpl & ref;
339  TransposeConst(const ConstraintPrismaticTpl & ref) : ref(ref) {}
340 
341  template<typename ForceDerived>
342  typename ConstraintForceOp<ConstraintPrismaticTpl,ForceDerived>::ReturnType
343  operator* (const ForceDense<ForceDerived> & f) const
344  { return f.linear().template segment<1>(axis); }
345 
346  /* [CRBA] MatrixBase operator* (Constraint::Transpose S, ForceSet::Block) */
347  template<typename Derived>
348  typename ConstraintForceSetOp<ConstraintPrismaticTpl,Derived>::ReturnType
349  operator*(const Eigen::MatrixBase<Derived> & F )
350  {
351  assert(F.rows()==6);
352  return F.row(LINEAR+axis);
353  }
354 
355  }; // struct TransposeConst
356  TransposeConst transpose() const { return TransposeConst(*this); }
357 
358  /* CRBA joint operators
359  * - ForceSet::Block = ForceSet
360  * - ForceSet operator* (Inertia Y,Constraint S)
361  * - MatrixBase operator* (Constraint::Transpose S, ForceSet::Block)
362  * - SE3::act(ForceSet::Block)
363  */
364  DenseBase matrix_impl() const
365  {
366  DenseBase S;
368  v << Axis();
369  return S;
370  }
371 
372  template<typename MotionDerived>
374  motionAction(const MotionDense<MotionDerived> & m) const
375  {
377  MotionRef<DenseBase> v(res);
378  v = m.cross(Axis());
379  return res;
380  }
381 
382  bool isEqual(const ConstraintPrismaticTpl &) const { return true; }
383 
384  }; // struct ConstraintPrismaticTpl
385 
386  template<typename S1, int O1,typename S2, int O2, int axis>
388  {
389  typedef Eigen::Matrix<S2,6,1,O2> ReturnType;
390  };
391 
392  /* [CRBA] ForceSet operator* (Inertia Y,Constraint S) */
393  namespace impl
394  {
395  template<typename S1, int O1, typename S2, int O2>
397  {
398  typedef InertiaTpl<S1,O1> Inertia;
400  typedef typename MultiplicationOp<Inertia,Constraint>::ReturnType ReturnType;
401  static inline ReturnType run(const Inertia & Y,
402  const Constraint & /*constraint*/)
403  {
404  ReturnType res;
405 
406  /* Y(:,0) = ( 1,0, 0, 0 , z , -y ) */
407  const S1
408  &m = Y.mass(),
409  &y = Y.lever()[1],
410  &z = Y.lever()[2];
411  res << m, S1(0), S1(0), S1(0), m*z, -m*y;
412 
413  return res;
414  }
415  };
416 
417  template<typename S1, int O1, typename S2, int O2>
419  {
420  typedef InertiaTpl<S1,O1> Inertia;
422  typedef typename MultiplicationOp<Inertia,Constraint>::ReturnType ReturnType;
423  static inline ReturnType run(const Inertia & Y,
424  const Constraint & /*constraint*/)
425  {
426  ReturnType res;
427 
428  /* Y(:,1) = ( 0,1, 0, -z , 0 , x) */
429  const S1
430  &m = Y.mass(),
431  &x = Y.lever()[0],
432  &z = Y.lever()[2];
433 
434  res << S1(0), m, S1(0), -m*z, S1(0), m*x;
435 
436  return res;
437  }
438  };
439 
440  template<typename S1, int O1, typename S2, int O2>
442  {
443  typedef InertiaTpl<S1,O1> Inertia;
445  typedef typename MultiplicationOp<Inertia,Constraint>::ReturnType ReturnType;
446  static inline ReturnType run(const Inertia & Y,
447  const Constraint & /*constraint*/)
448  {
449  ReturnType res;
450 
451  /* Y(:,2) = ( 0,0, 1, y , -x , 0) */
452  const S1
453  &m = Y.mass(),
454  &x = Y.lever()[0],
455  &y = Y.lever()[1];
456 
457  res << S1(0), S1(0), m, m*y, -m*x, S1(0);
458 
459  return res;
460  }
461  };
462  } // namespace impl
463 
464  template<typename M6Like,typename S2, int O2, int axis>
465  struct MultiplicationOp<Eigen::MatrixBase<M6Like>, ConstraintPrismaticTpl<S2,O2,axis> >
466  {
467  typedef typename M6Like::ConstColXpr ReturnType;
468  };
469 
470  /* [ABA] operator* (Inertia Y,Constraint S) */
471  namespace impl
472  {
473  template<typename M6Like, typename Scalar, int Options, int axis>
474  struct LhsMultiplicationOp<Eigen::MatrixBase<M6Like>, ConstraintPrismaticTpl<Scalar,Options,axis> >
475  {
477  typedef typename MultiplicationOp<Eigen::MatrixBase<M6Like>,Constraint>::ReturnType ReturnType;
478  static inline ReturnType run(const Eigen::MatrixBase<M6Like> & Y,
479  const Constraint & /*constraint*/)
480  {
481  EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(M6Like,6,6);
482  return Y.derived().col(Inertia::LINEAR + axis);
483  }
484  };
485  } // namespace impl
486 
487  template<typename _Scalar, int _Options, int _axis>
489  {
490  typedef _Scalar Scalar;
491 
492  enum
493  {
494  Options = _Options,
495  axis = _axis
496  };
497  };
498 
499  template<typename _Scalar, int _Options, int axis>
500  struct traits< JointPrismaticTpl<_Scalar,_Options,axis> >
501  {
502  enum {
503  NQ = 1,
504  NV = 1
505  };
506  typedef _Scalar Scalar;
507  enum { Options = _Options };
514 
515  // [ABA]
516  typedef Eigen::Matrix<Scalar,6,NV,Options> U_t;
517  typedef Eigen::Matrix<Scalar,NV,NV,Options> D_t;
518  typedef Eigen::Matrix<Scalar,6,NV,Options> UD_t;
519 
520  PINOCCHIO_JOINT_DATA_BASE_ACCESSOR_DEFAULT_RETURN_TYPE
521 
522  typedef Eigen::Matrix<Scalar,NQ,1,Options> ConfigVector_t;
523  typedef Eigen::Matrix<Scalar,NV,1,Options> TangentVector_t;
524  };
525 
526  template<typename Scalar, int Options, int axis>
527  struct traits< JointDataPrismaticTpl<Scalar,Options,axis> >
529 
530  template<typename Scalar, int Options, int axis>
531  struct traits< JointModelPrismaticTpl<Scalar,Options,axis> >
533 
534  template<typename _Scalar, int _Options, int axis>
535  struct JointDataPrismaticTpl : public JointDataBase< JointDataPrismaticTpl<_Scalar,_Options,axis> >
536  {
537  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
539  PINOCCHIO_JOINT_DATA_TYPEDEF_TEMPLATE(JointDerived);
540  PINOCCHIO_JOINT_DATA_BASE_DEFAULT_ACCESSOR
541 
542  Constraint_t S;
543  Transformation_t M;
544  Motion_t v;
545  Bias_t c;
546 
547  // [ABA] specific data
548  U_t U;
549  D_t Dinv;
550  UD_t UDinv;
551 
553  : M((Scalar)0)
554  , v((Scalar)0)
555  , U(U_t::Zero())
556  , Dinv(D_t::Zero())
557  , UDinv(UD_t::Zero())
558  {}
559 
560  static std::string classname()
561  {
562  return std::string("JointDataP") + axisLabel<axis>();
563  }
564  std::string shortname() const { return classname(); }
565 
566  }; // struct JointDataPrismaticTpl
567 
568  template<typename NewScalar, typename Scalar, int Options, int axis>
569  struct CastType< NewScalar, JointModelPrismaticTpl<Scalar,Options,axis> >
570  {
572  };
573 
574  template<typename _Scalar, int _Options, int axis>
576  : public JointModelBase< JointModelPrismaticTpl<_Scalar,_Options,axis> >
577  {
578  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
579  typedef JointPrismaticTpl<_Scalar,_Options,axis> JointDerived;
580  PINOCCHIO_JOINT_TYPEDEF_TEMPLATE(JointDerived);
581 
583  using Base::id;
584  using Base::idx_q;
585  using Base::idx_v;
586  using Base::setIndexes;
587 
588  JointDataDerived createData() const { return JointDataDerived(); }
589 
590  template<typename ConfigVector>
591  void calc(JointDataDerived & data,
592  const typename Eigen::MatrixBase<ConfigVector> & qs) const
593  {
594  typedef typename ConfigVector::Scalar Scalar;
595  const Scalar & q = qs[idx_q()];
596  data.M.displacement() = q;
597  }
598 
599  template<typename ConfigVector, typename TangentVector>
600  void calc(JointDataDerived & data,
601  const typename Eigen::MatrixBase<ConfigVector> & qs,
602  const typename Eigen::MatrixBase<TangentVector> & vs) const
603  {
604  calc(data,qs.derived());
605 
606  typedef typename TangentVector::Scalar S2;
607  const S2 & v = vs[idx_v()];
608  data.v.linearRate() = v;
609  }
610 
611  template<typename Matrix6Like>
612  void calc_aba(JointDataDerived & data, const Eigen::MatrixBase<Matrix6Like> & I, const bool update_I) const
613  {
614  data.U = I.col(Inertia::LINEAR + axis);
615  data.Dinv[0] = 1./I(Inertia::LINEAR + axis, Inertia::LINEAR + axis);
616  data.UDinv.noalias() = data.U * data.Dinv[0];
617 
618  if (update_I)
619  PINOCCHIO_EIGEN_CONST_CAST(Matrix6Like,I) -= data.UDinv * data.U.transpose();
620  }
621 
622  static std::string classname()
623  {
624  return std::string("JointModelP") + axisLabel<axis>();
625  }
626  std::string shortname() const { return classname(); }
627 
629  template<typename NewScalar>
631  {
633  ReturnType res;
634  res.setIndexes(id(),idx_q(),idx_v());
635  return res;
636  }
637 
638  }; // struct JointModelPrismaticTpl
639 
643 
647 
651 
652 } //namespace pinocchio
653 
654 #include <boost/type_traits.hpp>
655 
656 namespace boost
657 {
658  template<typename Scalar, int Options, int axis>
659  struct has_nothrow_constructor< ::pinocchio::JointModelPrismaticTpl<Scalar,Options,axis> >
660  : public integral_constant<bool,true> {};
661 
662  template<typename Scalar, int Options, int axis>
663  struct has_nothrow_copy< ::pinocchio::JointModelPrismaticTpl<Scalar,Options,axis> >
664  : public integral_constant<bool,true> {};
665 
666  template<typename Scalar, int Options, int axis>
667  struct has_nothrow_constructor< ::pinocchio::JointDataPrismaticTpl<Scalar,Options,axis> >
668  : public integral_constant<bool,true> {};
669 
670  template<typename Scalar, int Options, int axis>
671  struct has_nothrow_copy< ::pinocchio::JointDataPrismaticTpl<Scalar,Options,axis> >
672  : public integral_constant<bool,true> {};
673 }
674 
675 #endif // ifndef __pinocchio_joint_prismatic_hpp__
Forward declaration of the multiplication operation return type. Should be overloaded, otherwise it will procude a compilation error.
Definition: binary-op.hpp:15
int idx_q(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdxQVisitor to get the index in the full model configuration space...
int idx_v(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdxVVisitor to get the index in the full model tangent space corre...
Return type of the Constraint::Transpose * ForceSet operation.
Return type of the ation of a Motion onto an object of type D.
JointDataTpl< Scalar, Options, JointCollectionTpl > createData(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through CreateData visitor to create a JointDataTpl.
Source from #include <cppad/example/cppad_eigen.hpp>
JointModelPrismaticTpl< NewScalar, Options, axis > cast() const
std::string shortname(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointShortnameVisitor to get the shortname of the derived joint model...
Main pinocchio namespace.
Definition: treeview.dox:24
Common traits structure to fully define base classes for CRTP.
Definition: spatial/fwd.hpp:32
ConstLinearType linear() const
Return the linear part of the force vector.
Definition: force-base.hpp:47
Type of the cast of a class C templated by Scalar and Options, to a new NewScalar type...
Definition: spatial/fwd.hpp:43
Return type of the Constraint::Transpose * Force operation.
void calc_aba(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata, const Eigen::MatrixBase< Matrix6Type > &I, const bool update_I)
Visit a JointModelTpl and the corresponding JointDataTpl through JointCalcAbaVisitor to...
MultiplicationOp< InertiaTpl< Scalar, Options >, ConstraintDerived >::ReturnType operator*(const InertiaTpl< Scalar, Options > &Y, const ConstraintBase< ConstraintDerived > &constraint)
 .