pinocchio  2.4.4
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
joint-mimic.hpp
1 //
2 // Copyright (c) 2019 INRIA
3 //
4 
5 #ifndef __pinocchio_joint_mimic_hpp__
6 #define __pinocchio_joint_mimic_hpp__
7 
8 #include "pinocchio/macros.hpp"
9 #include "pinocchio/multibody/joint/joint-base.hpp"
10 
11 namespace pinocchio
12 {
13 
14  template<class Constraint> struct ScaledConstraint;
15 
16  template<class Constraint>
17  struct traits< ScaledConstraint<Constraint> >
18  {
19  typedef typename traits<Constraint>::Scalar Scalar;
20  enum { Options = traits<Constraint>::Options };
21  enum {
24  };
25  typedef typename traits<Constraint>::JointMotion JointMotion;
26  typedef typename traits<Constraint>::JointForce JointForce;
27  typedef typename traits<Constraint>::DenseBase DenseBase;
28  typedef typename traits<Constraint>::MatrixReturnType MatrixReturnType;
29  typedef typename traits<Constraint>::ConstMatrixReturnType ConstMatrixReturnType;
30  }; // traits ScaledConstraint
31 
32  template<class Constraint>
33  struct SE3GroupAction< ScaledConstraint<Constraint> >
34  { typedef typename SE3GroupAction<Constraint>::ReturnType ReturnType; };
35 
36  template<class Constraint, typename MotionDerived>
37  struct MotionAlgebraAction< ScaledConstraint<Constraint>, MotionDerived >
38  { typedef typename MotionAlgebraAction<Constraint,MotionDerived>::ReturnType ReturnType; };
39 
40  template<class Constraint, typename ForceDerived>
41  struct ConstraintForceOp< ScaledConstraint<Constraint>, ForceDerived>
42  {
43  typedef typename Constraint::Scalar Scalar;
44  typedef typename ConstraintForceOp<Constraint,ForceDerived>::ReturnType OriginalReturnType;
45 
46  typedef typename ScalarMatrixProduct<Scalar,OriginalReturnType>::type IdealReturnType;
47  typedef Eigen::Matrix<Scalar,IdealReturnType::RowsAtCompileTime,IdealReturnType::ColsAtCompileTime,Constraint::Options> ReturnType;
48  };
49 
50  template<class Constraint, typename ForceSet>
52  {
53  typedef typename Constraint::Scalar Scalar;
54  typedef typename ConstraintForceSetOp<Constraint,ForceSet>::ReturnType OriginalReturnType;
55  typedef typename ScalarMatrixProduct<Scalar,OriginalReturnType>::type IdealReturnType;
56  typedef Eigen::Matrix<Scalar,Constraint::NV,ForceSet::ColsAtCompileTime,Constraint::Options | Eigen::RowMajor> ReturnType;
57  };
58 
59  template<class Constraint>
60  struct ScaledConstraint
61  : ConstraintBase< ScaledConstraint<Constraint> >
62  {
63  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
64 
65  PINOCCHIO_CONSTRAINT_TYPEDEF_TPL(ScaledConstraint)
66  enum { NV = Constraint::NV };
68  using Base::nv;
69 
70  typedef typename SE3GroupAction<Constraint>::ReturnType SE3ActionReturnType;
71 
72  ScaledConstraint() {}
73 
74  explicit ScaledConstraint(const Scalar & scaling_factor)
75  : m_scaling_factor(scaling_factor)
76  {}
77 
78  ScaledConstraint(const Constraint & constraint,
79  const Scalar & scaling_factor)
80  : m_constraint(constraint)
81  , m_scaling_factor(scaling_factor)
82  {}
83 
84  ScaledConstraint(const ScaledConstraint & other)
85  : m_constraint(other.m_constraint)
86  , m_scaling_factor(other.m_scaling_factor)
87  {}
88 
89  ScaledConstraint & operator=(const ScaledConstraint & other)
90  {
91  m_constraint = other.m_constraint;
92  m_scaling_factor = other.m_scaling_factor;
93  return *this;
94  }
95 
96  template<typename VectorLike>
97  JointMotion __mult__(const Eigen::MatrixBase<VectorLike> & v) const
98  {
99  assert(v.size() == nv());
100  JointMotion jm = m_constraint * v;
101  return jm * m_scaling_factor;
102  }
103 
104  template<typename S1, int O1>
105  SE3ActionReturnType
106  se3Action(const SE3Tpl<S1,O1> & m) const
107  {
108  SE3ActionReturnType res = m_constraint.se3Action(m);
109  return m_scaling_factor * res;
110  }
111 
112  template<typename S1, int O1>
113  SE3ActionReturnType
114  se3ActionInverse(const SE3Tpl<S1,O1> & m) const
115  {
116  SE3ActionReturnType res = m_constraint.se3ActionInverse(m);
117  return m_scaling_factor * res;
118  }
119 
120  int nv_impl() const { return m_constraint.nv(); }
121 
123  {
124  const ScaledConstraint & ref;
125  TransposeConst(const ScaledConstraint & ref) : ref(ref) {}
126 
127  template<typename Derived>
128  typename ConstraintForceOp<ScaledConstraint,Derived>::ReturnType
129  operator*(const ForceDense<Derived> & f) const
130  {
131  // TODO: I don't know why, but we should a dense a return type, otherwise it failes at the evaluation level;
132  typedef typename ConstraintForceOp<ScaledConstraint,Derived>::ReturnType ReturnType;
133  return ReturnType(ref.m_scaling_factor * (ref.m_constraint.transpose() * f));
134  }
135 
137  template<typename Derived>
138  typename ConstraintForceSetOp<ScaledConstraint,Derived>::ReturnType
139  operator*(const Eigen::MatrixBase<Derived> & F) const
140  {
141  typedef typename ConstraintForceSetOp<ScaledConstraint,Derived>::ReturnType ReturnType;
142  return ReturnType(ref.m_scaling_factor * (ref.m_constraint.transpose() * F));
143  }
144 
145  }; // struct TransposeConst
146 
147  TransposeConst transpose() const { return TransposeConst(*this); }
148 
149  DenseBase matrix_impl() const
150  {
151  DenseBase S = m_scaling_factor * m_constraint.matrix();
152  return S;
153  }
154 
155  template<typename MotionDerived>
157  motionAction(const MotionDense<MotionDerived> & m) const
158  {
160  ReturnType res = m_scaling_factor * m_constraint.motionAction(m);
161  return res;
162  }
163 
164  inline const Scalar & scaling() const { return m_scaling_factor; }
165  inline Scalar & scaling() { return m_scaling_factor; }
166 
167  inline const Constraint & constraint() const { return m_constraint; }
168  inline Constraint & constraint() { return m_constraint; }
169 
170  bool isEqual(const ScaledConstraint & other) const
171  {
172  return m_constraint == other.m_constraint
173  && m_scaling_factor == other.m_scaling_factor;
174  }
175 
176  protected:
177 
178  Constraint m_constraint;
179  Scalar m_scaling_factor;
180  }; // struct ScaledConstraint
181 
182  template<typename S1, int O1, typename _Constraint>
183  struct MultiplicationOp<InertiaTpl<S1,O1>, ScaledConstraint<_Constraint> >
184  {
185  typedef InertiaTpl<S1,O1> Inertia;
187  typedef typename Constraint::Scalar Scalar;
188 
189  typedef typename MultiplicationOp<Inertia,_Constraint>::ReturnType OriginalReturnType;
190 // typedef typename ScalarMatrixProduct<Scalar,OriginalReturnType>::type ReturnType;
191  typedef OriginalReturnType ReturnType;
192  };
193 
194  /* [CRBA] ForceSet operator* (Inertia Y,Constraint S) */
195  namespace impl
196  {
197  template<typename S1, int O1, typename _Constraint>
198  struct LhsMultiplicationOp<InertiaTpl<S1,O1>, ScaledConstraint<_Constraint> >
199  {
200  typedef InertiaTpl<S1,O1> Inertia;
202  typedef typename MultiplicationOp<Inertia,Constraint>::ReturnType ReturnType;
203 
204  static inline ReturnType run(const Inertia & Y,
205  const Constraint & scaled_constraint)
206  {
207  return scaled_constraint.scaling() * (Y * scaled_constraint.constraint());
208  }
209  };
210  } // namespace impl
211 
212  template<typename M6Like, typename _Constraint>
213  struct MultiplicationOp<Eigen::MatrixBase<M6Like>, ScaledConstraint<_Constraint> >
214  {
215  typedef typename MultiplicationOp<Inertia,_Constraint>::ReturnType OriginalReturnType;
216  typedef typename PINOCCHIO_EIGEN_PLAIN_TYPE(OriginalReturnType) ReturnType;
217  };
218 
219  /* [ABA] operator* (Inertia Y,Constraint S) */
220  namespace impl
221  {
222  template<typename M6Like, typename _Constraint>
223  struct LhsMultiplicationOp<Eigen::MatrixBase<M6Like>, ScaledConstraint<_Constraint> >
224  {
226  typedef typename MultiplicationOp<Eigen::MatrixBase<M6Like>,Constraint>::ReturnType ReturnType;
227 
228  static inline ReturnType run(const Eigen::MatrixBase<M6Like> & Y,
229  const Constraint & scaled_constraint)
230  {
231  return scaled_constraint.scaling() * (Y.derived() * scaled_constraint.constraint());
232  }
233  };
234  } // namespace impl
235 
236  template<class Joint> struct JointMimic;
237  template<class JointModel> struct JointModelMimic;
238  template<class JointData> struct JointDataMimic;
239 
240  template<class Joint>
242  {
243  enum
244  {
245  NQ = traits<Joint>::NV,
246  NV = traits<Joint>::NQ
247  };
248  typedef typename traits<Joint>::Scalar Scalar;
249  enum { Options = traits<Joint>::Options };
250 
251  typedef typename traits<Joint>::JointDataDerived JointDataBase;
252  typedef typename traits<Joint>::JointModelDerived JointModelBase;
253 
256 
258  typedef typename traits<Joint>::Transformation_t Transformation_t;
259  typedef typename traits<Joint>::Motion_t Motion_t;
260  typedef typename traits<Joint>::Bias_t Bias_t;
261 
262  // [ABA]
263  typedef typename traits<Joint>::U_t U_t;
264  typedef typename traits<Joint>::D_t D_t;
265  typedef typename traits<Joint>::UD_t UD_t;
266 
267  PINOCCHIO_JOINT_DATA_BASE_ACCESSOR_DEFAULT_RETURN_TYPE
268 
269  typedef typename traits<Joint>::ConfigVector_t ConfigVector_t;
270  typedef typename traits<Joint>::TangentVector_t TangentVector_t;
271  };
272 
273  template<class Joint>
276 
277  template<class Joint>
280 
281  template<class JointData>
282  struct JointDataMimic
283  : public JointDataBase< JointDataMimic<JointData> >
284  {
285  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
286 
289 
290  PINOCCHIO_JOINT_DATA_TYPEDEF_TEMPLATE(JointDerived);
291 
293  : m_scaling((Scalar)0)
294  , m_q_transform(ConfigVector_t::Zero())
295  , m_v_transform(TangentVector_t::Zero())
296  , S((Scalar)0)
297  {}
298 
300  const Scalar & scaling)
301  : m_jdata_ref(jdata.derived())
302  , m_scaling(scaling)
303  , S(m_jdata_ref.S,scaling)
304  {}
305 
306  JointDataMimic & operator=(const JointDataMimic & other)
307  {
308  m_jdata_ref = other.m_jdata_ref;
309  m_scaling = other.m_scaling;
310  m_q_transform = other.m_q_transform;
311  m_v_transform = other.m_v_transform;
312  S = Constraint_t(m_jdata_ref.S,other.m_scaling);
313  return *this;
314  }
315 
316  bool isEqual(const JointDataMimic & other) const
317  {
318  return Base::isEqual(other)
319  && m_jdata_ref == other.m_jdata_ref
320  && m_scaling == other.m_scaling
321  && m_q_transform == other.m_q_transform
322  && m_v_transform == other.m_v_transform
323  ;
324  }
325 
326  static std::string classname()
327  {
328  return std::string("JointDataMimic<") + JointData::classname() + std::string(">");
329  }
330 
331  std::string shortname() const
332  {
333  return std::string("JointDataMimic<") + m_jdata_ref.shortname() + std::string(">");
334  }
335 
336  // Accessors
337  ConstraintTypeConstRef S_accessor() const { return S; }
338  ConstraintTypeRef S_accessor() { return S; }
339 
340  TansformTypeConstRef M_accessor() const { return m_jdata_ref.M; }
341  TansformTypeRef M_accessor() { return m_jdata_ref.M; }
342 
343  MotionTypeConstRef v_accessor() const { return m_jdata_ref.v; }
344  MotionTypeRef v_accessor() { return m_jdata_ref.v; }
345 
346  BiasTypeConstRef c_accessor() const { return m_jdata_ref.c; }
347  BiasTypeRef c_accessor() { return m_jdata_ref.c; }
348 
349  UTypeConstRef U_accessor() const { return m_jdata_ref.U; }
350  UTypeRef U_accessor() { return m_jdata_ref.U; }
351 
352  DTypeConstRef Dinv_accessor() const { return m_jdata_ref.Dinv; }
353  DTypeRef Dinv_accessor() { return m_jdata_ref.Dinv; }
354 
355  UDTypeConstRef UDinv_accessor() const { return m_jdata_ref.UDinv; }
356  UDTypeRef UDinv_accessor() { return m_jdata_ref.UDinv; }
357 
358  template<class JointModel>
359  friend struct JointModelMimic;
360 
361  const JointData & jdata() const { return m_jdata_ref; }
362  JointData & jdata() { return m_jdata_ref; }
363 
364  const Scalar & scaling() const { return m_scaling; }
365  Scalar & scaling() { return m_scaling; }
366 
367  ConfigVector_t & jointConfiguration() { return m_q_transform; }
368  const ConfigVector_t & jointConfiguration() const { return m_q_transform; }
369 
370  TangentVector_t & jointVelocity() { return m_v_transform; }
371  const TangentVector_t & jointVelocity() const { return m_v_transform; }
372 
373  protected:
374 
375  JointData m_jdata_ref;
376  Scalar m_scaling;
377 
379  ConfigVector_t m_q_transform;
381  TangentVector_t m_v_transform;
382 
383  public:
384 
385  // data
386  Constraint_t S;
387 
388  }; // struct JointDataMimic
389 
390  template<typename NewScalar, typename JointModel>
391  struct CastType< NewScalar, JointModelMimic<JointModel> >
392  {
393  typedef typename CastType<NewScalar,JointModel>::type JointModelNewType;
395  };
396 
397  template<class JointModel>
398  struct JointModelMimic
399  : public JointModelBase< JointModelMimic<JointModel> >
400  {
401  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
402 
403  typedef typename traits<JointModelMimic>::JointDerived JointDerived;
404 
405  PINOCCHIO_JOINT_TYPEDEF_TEMPLATE(JointDerived);
406 
407  typedef JointModelBase<JointModelMimic> Base;
408  using Base::id;
409  using Base::idx_q;
410  using Base::idx_v;
411  using Base::nq;
412  using Base::nv;
413  using Base::setIndexes;
414 
416  {}
417 
419  const Scalar & scaling,
420  const Scalar & offset)
421  : m_jmodel_ref(jmodel.derived())
422  , m_scaling(scaling)
423  , m_offset(offset)
424  {}
425 
426  Base & base() { return *static_cast<Base*>(this); }
427  const Base & base() const { return *static_cast<const Base*>(this); }
428 
429  inline int nq_impl() const { return 0; }
430  inline int nv_impl() const { return 0; }
431 
432  inline int idx_q_impl() const { return m_jmodel_ref.idx_q(); }
433  inline int idx_v_impl() const { return m_jmodel_ref.idx_v(); }
434 
435  void setIndexes_impl(JointIndex id, int /*q*/, int /*v*/)
436  {
437  Base::i_id = id; // Only the id of the joint in the model is different.
438  Base::i_q = m_jmodel_ref.idx_q();
439  Base::i_v = m_jmodel_ref.idx_v();
440  }
441 
442  JointDataDerived createData() const
443  {
444  return JointDataDerived(m_jmodel_ref.createData(),scaling());
445  }
446 
447  template<typename ConfigVector>
448  EIGEN_DONT_INLINE
449  void calc(JointDataDerived & jdata,
450  const typename Eigen::MatrixBase<ConfigVector> & qs) const
451  {
452  typedef typename ConfigVectorAffineTransform<JointDerived>::Type AffineTransform;
453 
454  AffineTransform::run(qs.head(m_jmodel_ref.nq()),
455  m_scaling,m_offset,jdata.m_q_transform);
456  m_jmodel_ref.calc(jdata.m_jdata_ref,jdata.m_q_transform);
457  }
458 
459  template<typename ConfigVector, typename TangentVector>
460  EIGEN_DONT_INLINE
461  void calc(JointDataDerived & jdata,
462  const typename Eigen::MatrixBase<ConfigVector> & qs,
463  const typename Eigen::MatrixBase<TangentVector> & vs) const
464  {
465  typedef typename ConfigVectorAffineTransform<JointDerived>::Type AffineTransform;
466 
467  AffineTransform::run(qs.head(m_jmodel_ref.nq()),
468  m_scaling,m_offset,jdata.m_q_transform);
469  jdata.m_v_transform = m_scaling * vs.head(m_jmodel_ref.nv());
470  m_jmodel_ref.calc(jdata.m_jdata_ref,
471  jdata.m_q_transform,
472  jdata.m_v_transform);
473  }
474 
475  template<typename Matrix6Like>
476  void calc_aba(JointDataDerived & data,
477  const Eigen::MatrixBase<Matrix6Like> & I,
478  const bool update_I) const
479  {
480  // TODO: fixme
481  m_jmodel_ref.calc_aba(data.m_jdata_ref,
482  PINOCCHIO_EIGEN_CONST_CAST(Matrix6Like,I),
483  update_I);
484  }
485 
486  static std::string classname()
487  {
488  return std::string("JointModelMimic<") + JointModel::classname() + std::string(">");;
489  }
490 
491  std::string shortname() const
492  {
493  return std::string("JointModelMimic<") + m_jmodel_ref.shortname() + std::string(">");
494  }
495 
497  template<typename NewScalar>
499  {
500  typedef typename CastType<NewScalar,JointModelMimic>::type ReturnType;
501 
502  ReturnType res(m_jmodel_ref.template cast<NewScalar>(),
503  (NewScalar)m_scaling,
504  (NewScalar)m_offset);
505  res.setIndexes(id(),idx_q(),idx_v());
506  return res;
507  }
508 
509  const JointModel & jmodel() const { return m_jmodel_ref; }
510  JointModel & jmodel() { return m_jmodel_ref; }
511 
512  const Scalar & scaling() const { return m_scaling; }
513  Scalar & scaling() { return m_scaling; }
514 
515  const Scalar & offset() const { return m_offset; }
516  Scalar & offset() { return m_offset; }
517 
518  protected:
519 
520  // data
521  JointModel m_jmodel_ref;
522  Scalar m_scaling, m_offset;
523 
524  public:
525 
526  /* Acces to dedicated segment in robot config space. */
527  // Const access
528  template<typename D>
529  typename SizeDepType<NQ>::template SegmentReturn<D>::ConstType
530  jointConfigSelector_impl(const Eigen::MatrixBase<D> & a) const
531  {
532  return SizeDepType<NQ>::segment(a.derived(),
533  m_jmodel_ref.idx_q(),
534  m_jmodel_ref.nq());
535  }
536 
537  // Non-const access
538  template<typename D>
539  typename SizeDepType<NQ>::template SegmentReturn<D>::Type
540  jointConfigSelector_impl(Eigen::MatrixBase<D> & a) const
541  {
542  return SizeDepType<NQ>::segment(a.derived(),
543  m_jmodel_ref.idx_q(),
544  m_jmodel_ref.nq());
545  }
546 
547  /* Acces to dedicated segment in robot config velocity space. */
548  // Const access
549  template<typename D>
550  typename SizeDepType<NV>::template SegmentReturn<D>::ConstType
551  jointVelocitySelector_impl(const Eigen::MatrixBase<D> & a) const
552  {
553  return SizeDepType<NV>::segment(a.derived(),
554  m_jmodel_ref.idx_v(),
555  m_jmodel_ref.nv());
556  }
557 
558  // Non-const access
559  template<typename D>
560  typename SizeDepType<NV>::template SegmentReturn<D>::Type
561  jointVelocitySelector_impl(Eigen::MatrixBase<D> & a) const
562  {
563  return SizeDepType<NV>::segment(a.derived(),
564  m_jmodel_ref.idx_v(),
565  m_jmodel_ref.nv());
566  }
567 
568  /* Acces to dedicated columns in a ForceSet or MotionSet matrix.*/
569  // Const access
570  template<typename D>
571  typename SizeDepType<NV>::template ColsReturn<D>::ConstType
572  jointCols_impl(const Eigen::MatrixBase<D> & A) const
573  {
574  return SizeDepType<NV>::middleCols(A.derived(),
575  m_jmodel_ref.idx_v(),
576  m_jmodel_ref.nv());
577  }
578 
579  // Non-const access
580  template<typename D>
581  typename SizeDepType<NV>::template ColsReturn<D>::Type
582  jointCols_impl(Eigen::MatrixBase<D> & A) const
583  {
584  return SizeDepType<NV>::middleCols(A.derived(),
585  m_jmodel_ref.idx_v(),
586  m_jmodel_ref.nv());
587  }
588 
589  /* Acces to dedicated rows in a matrix.*/
590  // Const access
591  template<typename D>
592  typename SizeDepType<NV>::template RowsReturn<D>::ConstType
593  jointRows_impl(const Eigen::MatrixBase<D> & A) const
594  {
595  return SizeDepType<NV>::middleRows(A.derived(),
596  m_jmodel_ref.idx_v(),
597  m_jmodel_ref.nv());
598  }
599 
600  // Non-const access
601  template<typename D>
602  typename SizeDepType<NV>::template RowsReturn<D>::Type
603  jointRows_impl(Eigen::MatrixBase<D> & A) const
604  {
605  return SizeDepType<NV>::middleRows(A.derived(),
606  m_jmodel_ref.idx_v(),
607  m_jmodel_ref.nv());
608  }
609 
611  // Const access
612  template<typename D>
613  typename SizeDepType<NV>::template BlockReturn<D>::ConstType
614  jointBlock_impl(const Eigen::MatrixBase<D> & Mat) const
615  {
616  return SizeDepType<NV>::block(Mat.derived(),
617  m_jmodel_ref.idx_v(),m_jmodel_ref.idx_v(),
618  m_jmodel_ref.nv(),m_jmodel_ref.nv());
619  }
620 
621  // Non-const access
622  template<typename D>
623  typename SizeDepType<NV>::template BlockReturn<D>::Type
624  jointBlock_impl(Eigen::MatrixBase<D> & Mat) const
625  {
626  return SizeDepType<NV>::block(Mat.derived(),
627  m_jmodel_ref.idx_v(),m_jmodel_ref.idx_v(),
628  m_jmodel_ref.nv(),m_jmodel_ref.nv());
629  }
630 
631  }; // struct JointModelMimic
632 
633 } // namespace pinocchio
634 
635 #endif // ifndef __pinocchio_joint_mimic_hpp__
int nv(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNvVisitor to get the dimension of the joint tangent space...
Forward declaration of the multiplication operation return type. Should be overloaded, otherwise it will procude a compilation error.
Definition: binary-op.hpp:15
Linear affine transformation of the configuration vector. Valide for most common joints which are evo...
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.
Definition: motion.hpp:44
JointDataTpl< Scalar, Options, JointCollectionTpl > createData(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through CreateData visitor to create a JointDataTpl.
JointIndex id(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdVisitor to get the index of the joint in the kinematic chain...
Definition: casadi.hpp:47
TangentVector_t m_v_transform
Transform velocity vector.
std::string shortname(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointShortnameVisitor to get the shortname of the derived joint model...
SizeDepType< NV >::template BlockReturn< D >::ConstType jointBlock_impl(const Eigen::MatrixBase< D > &Mat) const
Returns a block of dimension nv()xnv() located at position idx_v(),idx_v() in the matrix Mat...
Main pinocchio namespace.
Definition: treeview.dox:24
CastType< NewScalar, JointModelMimic >::type cast() const
Common traits structure to fully define base classes for CRTP.
Definition: fwd.hpp:35
ConstraintForceSetOp< ScaledConstraint, Derived >::ReturnType operator*(const Eigen::MatrixBase< Derived > &F) const
[CRBA] MatrixBase operator* (Constraint::Transpose S, ForceSet::Block)
Type of the cast of a class C templated by Scalar and Options, to a new NewScalar type...
Definition: fwd.hpp:46
ConfigVector_t m_q_transform
Transform configuration vector.
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)
 .