joint-spherical.hpp
Go to the documentation of this file.
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_spherical_hpp__
7 #define __pinocchio_joint_spherical_hpp__
8 
9 #include "pinocchio/macros.hpp"
15 
16 namespace pinocchio
17 {
18 
19  template<typename Scalar, int Options = 0> struct MotionSphericalTpl;
21 
22  template<typename Scalar, int Options>
24  {
26  };
27 
28  template<typename Scalar, int Options, typename MotionDerived>
30  {
32  };
33 
34  template<typename _Scalar, int _Options>
35  struct traits< MotionSphericalTpl<_Scalar,_Options> >
36  {
37  typedef _Scalar Scalar;
38  enum { Options = _Options };
39  typedef Eigen::Matrix<Scalar,3,1,Options> Vector3;
40  typedef Eigen::Matrix<Scalar,6,1,Options> Vector6;
41  typedef Eigen::Matrix<Scalar,4,4,Options> Matrix4;
42  typedef Eigen::Matrix<Scalar,6,6,Options> Matrix6;
43  typedef typename PINOCCHIO_EIGEN_REF_CONST_TYPE(Vector6) ToVectorConstReturnType;
44  typedef typename PINOCCHIO_EIGEN_REF_TYPE(Vector6) ToVectorReturnType;
47  typedef const Vector3 ConstAngularType;
48  typedef const Vector3 ConstLinearType;
53  enum {
54  LINEAR = 0,
55  ANGULAR = 3
56  };
57  }; // traits MotionSphericalTpl
58 
59  template<typename _Scalar, int _Options>
60  struct MotionSphericalTpl
61  : MotionBase< MotionSphericalTpl<_Scalar,_Options> >
62  {
63  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
64 
66 
68 
69  template<typename Vector3Like>
70  MotionSphericalTpl(const Eigen::MatrixBase<Vector3Like> & w)
71  : m_w(w)
72  {}
73 
74  Vector3 & operator() () { return m_w; }
75  const Vector3 & operator() () const { return m_w; }
76 
77  inline PlainReturnType plain() const
78  {
79  return PlainReturnType(PlainReturnType::Vector3::Zero(), m_w);
80  }
81 
82  template<typename MotionDerived>
83  void addTo(MotionDense<MotionDerived> & other) const
84  {
85  other.angular() += m_w;
86  }
87 
88  template<typename Derived>
89  void setTo(MotionDense<Derived> & other) const
90  {
91  other.linear().setZero();
92  other.angular() = m_w;
93  }
94 
96  {
97  return MotionSphericalTpl(m_w + other.m_w);
98  }
99 
100  bool isEqual_impl(const MotionSphericalTpl & other) const
101  {
102  return m_w == other.m_w;
103  }
104 
105  template<typename MotionDerived>
106  bool isEqual_impl(const MotionDense<MotionDerived> & other) const
107  {
108  return other.angular() == m_w && other.linear().isZero(0);
109  }
110 
111  template<typename S2, int O2, typename D2>
113  {
114  // Angular
115  v.angular().noalias() = m.rotation() * m_w;
116 
117  // Linear
118  v.linear().noalias() = m.translation().cross(v.angular());
119  }
120 
121  template<typename S2, int O2>
122  MotionPlain se3Action_impl(const SE3Tpl<S2,O2> & m) const
123  {
124  MotionPlain res;
126  return res;
127  }
128 
129  template<typename S2, int O2, typename D2>
131  {
132  // Linear
133  // TODO: use v.angular() as temporary variable
134  Vector3 v3_tmp;
135  v3_tmp.noalias() = m_w.cross(m.translation());
136  v.linear().noalias() = m.rotation().transpose() * v3_tmp;
137 
138  // Angular
139  v.angular().noalias() = m.rotation().transpose() * m_w;
140  }
141 
142  template<typename S2, int O2>
143  MotionPlain se3ActionInverse_impl(const SE3Tpl<S2,O2> & m) const
144  {
145  MotionPlain res;
147  return res;
148  }
149 
150  template<typename M1, typename M2>
151  void motionAction(const MotionDense<M1> & v, MotionDense<M2> & mout) const
152  {
153  // Linear
154  mout.linear().noalias() = v.linear().cross(m_w);
155 
156  // Angular
157  mout.angular().noalias() = v.angular().cross(m_w);
158  }
159 
160  template<typename M1>
161  MotionPlain motionAction(const MotionDense<M1> & v) const
162  {
163  MotionPlain res;
164  motionAction(v,res);
165  return res;
166  }
167 
168  const Vector3 & angular() const { return m_w; }
169  Vector3 & angular() { return m_w; }
170 
171  protected:
172 
173  Vector3 m_w;
174  }; // struct MotionSphericalTpl
175 
176  template<typename S1, int O1, typename MotionDerived>
177  inline typename MotionDerived::MotionPlain
179  {
180  return typename MotionDerived::MotionPlain(m2.linear(),m2.angular() + m1.angular());
181  }
182 
183  template<typename Scalar, int Options> struct ConstraintSphericalTpl;
184 
185  template<typename _Scalar, int _Options>
186  struct traits< ConstraintSphericalTpl<_Scalar,_Options> >
187  {
188  typedef _Scalar Scalar;
189  enum { Options = _Options };
190  enum {
191  LINEAR = 0,
192  ANGULAR = 3
193  };
195  typedef Eigen::Matrix<Scalar,3,1,Options> JointForce;
196  typedef Eigen::Matrix<Scalar,6,3,Options> DenseBase;
199  }; // struct traits struct ConstraintSphericalTpl
200 
201  template<typename _Scalar, int _Options>
203  : public ConstraintBase< ConstraintSphericalTpl<_Scalar,_Options> >
204  {
205  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
206 
208 
210 
211  enum { NV = 3 };
212 
213  int nv_impl() const { return NV; }
214 
215  template<typename Vector3Like>
216  JointMotion __mult__(const Eigen::MatrixBase<Vector3Like> & w) const
217  {
218  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Vector3Like,3);
219  return JointMotion(w);
220  }
221 
223  {
224  template<typename Derived>
227  { return phi.angular(); }
228 
229  /* [CRBA] MatrixBase operator* (Constraint::Transpose S, ForceSet::Block) */
230  template<typename MatrixDerived>
231  const typename SizeDepType<3>::RowsReturn<MatrixDerived>::ConstType
232  operator*(const Eigen::MatrixBase<MatrixDerived> & F) const
233  {
234  assert(F.rows()==6);
235  return F.derived().template middleRows<3>(Inertia::ANGULAR);
236  }
237  };
238 
240 
241  DenseBase matrix_impl() const
242  {
243  DenseBase S;
244  S.template block <3,3>(LINEAR,0).setZero();
245  S.template block <3,3>(ANGULAR,0).setIdentity();
246  return S;
247  }
248 
249  template<typename S1, int O1>
250  Eigen::Matrix<S1,6,3,O1> se3Action(const SE3Tpl<S1,O1> & m) const
251  {
252  Eigen::Matrix<S1,6,3,O1> X_subspace;
253  cross(m.translation(),m.rotation(),X_subspace.template middleRows<3>(LINEAR));
254  X_subspace.template middleRows<3>(ANGULAR) = m.rotation();
255 
256  return X_subspace;
257  }
258 
259  template<typename S1, int O1>
260  Eigen::Matrix<S1,6,3,O1> se3ActionInverse(const SE3Tpl<S1,O1> & m) const
261  {
262  Eigen::Matrix<S1,6,3,O1> X_subspace;
263  AxisX::cross(m.translation(),X_subspace.template middleRows<3>(ANGULAR).col(0));
264  AxisY::cross(m.translation(),X_subspace.template middleRows<3>(ANGULAR).col(1));
265  AxisZ::cross(m.translation(),X_subspace.template middleRows<3>(ANGULAR).col(2));
266 
267  X_subspace.template middleRows<3>(LINEAR).noalias()
268  = m.rotation().transpose() * X_subspace.template middleRows<3>(ANGULAR);
269  X_subspace.template middleRows<3>(ANGULAR) = m.rotation().transpose();
270 
271  return X_subspace;
272  }
273 
274  template<typename MotionDerived>
275  DenseBase motionAction(const MotionDense<MotionDerived> & m) const
276  {
277  const typename MotionDerived::ConstLinearType v = m.linear();
278  const typename MotionDerived::ConstAngularType w = m.angular();
279 
280  DenseBase res;
281  skew(v,res.template middleRows<3>(LINEAR));
282  skew(w,res.template middleRows<3>(ANGULAR));
283 
284  return res;
285  }
286 
287  bool isEqual(const ConstraintSphericalTpl &) const { return true; }
288 
289  }; // struct ConstraintSphericalTpl
290 
291  template<typename MotionDerived, typename S2, int O2>
292  inline typename MotionDerived::MotionPlain
294  const MotionSphericalTpl<S2,O2> & m2)
295  {
296  return m2.motionAction(m1);
297  }
298 
299  /* [CRBA] ForceSet operator* (Inertia Y,Constraint S) */
300  template<typename S1, int O1, typename S2, int O2>
301  inline Eigen::Matrix<S2,6,3,O2>
304  {
305  typedef InertiaTpl<S1,O1> Inertia;
306  typedef typename Inertia::Symmetric3 Symmetric3;
307  Eigen::Matrix<S2,6,3,O2> M;
308  // M.block <3,3> (Inertia::LINEAR, 0) = - Y.mass () * skew(Y.lever ());
309  M.template block<3,3>(Inertia::LINEAR,0) = alphaSkew(-Y.mass(), Y.lever());
310  M.template block<3,3>(Inertia::ANGULAR,0) = (Y.inertia() - typename Symmetric3::AlphaSkewSquare(Y.mass(), Y.lever())).matrix();
311  return M;
312  }
313 
314  /* [ABA] Y*S operator*/
315  template<typename M6Like, typename S2, int O2>
316  inline typename SizeDepType<3>::ColsReturn<M6Like>::ConstType
317  operator*(const Eigen::MatrixBase<M6Like> & Y,
319  {
320  typedef ConstraintSphericalTpl<S2,O2> Constraint;
321  return Y.derived().template middleCols<3>(Constraint::ANGULAR);
322  }
323 
324  template<typename S1, int O1>
326  { typedef Eigen::Matrix<S1,6,3,O1> ReturnType; };
327 
328  template<typename S1, int O1, typename MotionDerived>
329  struct MotionAlgebraAction< ConstraintSphericalTpl<S1,O1>,MotionDerived >
330  { typedef Eigen::Matrix<S1,6,3,O1> ReturnType; };
331 
332  template<typename Scalar, int Options> struct JointSphericalTpl;
333 
334  template<typename _Scalar, int _Options>
335  struct traits< JointSphericalTpl<_Scalar,_Options> >
336  {
337  enum {
338  NQ = 4,
339  NV = 3
340  };
341  typedef _Scalar Scalar;
342  enum { Options = _Options };
349 
350  // [ABA]
351  typedef Eigen::Matrix<Scalar,6,NV,Options> U_t;
352  typedef Eigen::Matrix<Scalar,NV,NV,Options> D_t;
353  typedef Eigen::Matrix<Scalar,6,NV,Options> UD_t;
354 
356 
357  typedef Eigen::Matrix<Scalar,NQ,1,Options> ConfigVector_t;
358  typedef Eigen::Matrix<Scalar,NV,1,Options> TangentVector_t;
359  };
360 
361  template<typename Scalar, int Options>
364 
365  template<typename Scalar, int Options>
368 
369  template<typename _Scalar, int _Options>
370  struct JointDataSphericalTpl : public JointDataBase< JointDataSphericalTpl<_Scalar,_Options> >
371  {
372  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
373 
377 
378  Constraint_t S;
379  Transformation_t M;
380  Motion_t v;
381  Bias_t c;
382 
383  // [ABA] specific data
384  U_t U;
385  D_t Dinv;
386  UD_t UDinv;
387 
389  : M(Transformation_t::Identity())
390  , v(Motion_t::Vector3::Zero())
391  , U(U_t::Zero())
392  , Dinv(D_t::Zero())
393  , UDinv(UD_t::Zero())
394  {}
395 
396  static std::string classname() { return std::string("JointDataSpherical"); }
397  std::string shortname() const { return classname(); }
398 
399  }; // struct JointDataSphericalTpl
400 
401  PINOCCHIO_JOINT_CAST_TYPE_SPECIALIZATION(JointModelSphericalTpl);
402  template<typename _Scalar, int _Options>
403  struct JointModelSphericalTpl
404  : public JointModelBase< JointModelSphericalTpl<_Scalar,_Options> >
405  {
406  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
407 
410 
412  using Base::id;
413  using Base::idx_q;
414  using Base::idx_v;
415  using Base::setIndexes;
416 
417  JointDataDerived createData() const { return JointDataDerived(); }
418 
419  const std::vector<bool> hasConfigurationLimit() const
420  {
421  return {false, false, false, false};
422  }
423 
424  const std::vector<bool> hasConfigurationLimitInTangent() const
425  {
426  return {false, false, false};
427  }
428 
429  template<typename ConfigVectorLike>
430  inline void forwardKinematics(Transformation_t & M, const Eigen::MatrixBase<ConfigVectorLike> & q_joint) const
431  {
432  typedef typename ConfigVectorLike::Scalar Scalar;
433  EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(ConfigVector_t,ConfigVectorLike);
434  typedef typename Eigen::Quaternion<Scalar,PINOCCHIO_EIGEN_PLAIN_TYPE(ConfigVectorLike)::Options> Quaternion;
435  typedef Eigen::Map<const Quaternion> ConstQuaternionMap;
436 
437  ConstQuaternionMap quat(q_joint.derived().data());
438  //assert(math::fabs(quat.coeffs().squaredNorm()-1.) <= sqrt(Eigen::NumTraits<typename V::Scalar>::epsilon())); TODO: check validity of the rhs precision
439  assert(math::fabs(static_cast<Scalar>(quat.coeffs().squaredNorm()-1)) <= 1e-4);
440 
441  M.rotation(quat.matrix());
442  M.translation().setZero();
443  }
444 
445  template<typename QuaternionDerived>
446  void calc(JointDataDerived & data,
447  const typename Eigen::QuaternionBase<QuaternionDerived> & quat) const
448  {
449  data.M.rotation(quat.matrix());
450  }
451 
452  template<typename ConfigVector>
453  EIGEN_DONT_INLINE
454  void calc(JointDataDerived & data,
455  const typename Eigen::PlainObjectBase<ConfigVector> & qs) const
456  {
457  typedef typename Eigen::Quaternion<typename ConfigVector::Scalar,ConfigVector::Options> Quaternion;
458  typedef Eigen::Map<const Quaternion> ConstQuaternionMap;
459 
460  ConstQuaternionMap quat(qs.template segment<NQ>(idx_q()).data());
461  calc(data,quat);
462  }
463 
464  template<typename ConfigVector>
465  EIGEN_DONT_INLINE
466  void calc(JointDataDerived & data,
467  const typename Eigen::MatrixBase<ConfigVector> & qs) const
468  {
469  typedef typename Eigen::Quaternion<Scalar,Options> Quaternion;
470 
471  const Quaternion quat(qs.template segment<NQ>(idx_q()));
472  calc(data,quat);
473  }
474 
475  template<typename ConfigVector, typename TangentVector>
476  void calc(JointDataDerived & data,
477  const typename Eigen::MatrixBase<ConfigVector> & qs,
478  const typename Eigen::MatrixBase<TangentVector> & vs) const
479  {
480  calc(data,qs.derived());
481 
482  data.v.angular() = vs.template segment<NV>(idx_v());
483  }
484 
485  template<typename Matrix6Like>
486  void calc_aba(JointDataDerived & data,
487  const Eigen::MatrixBase<Matrix6Like> & I,
488  const bool update_I) const
489  {
490  data.U = I.template block<6,3>(0,Inertia::ANGULAR);
491 
492  // compute inverse
493 // data.Dinv.setIdentity();
494 // data.U.template middleRows<3>(Inertia::ANGULAR).llt().solveInPlace(data.Dinv);
495  internal::PerformStYSInversion<Scalar>::run(data.U.template middleRows<3>(Inertia::ANGULAR),data.Dinv);
496 
497  data.UDinv.template middleRows<3>(Inertia::ANGULAR).setIdentity(); // can be put in data constructor
498  data.UDinv.template middleRows<3>(Inertia::LINEAR).noalias() = data.U.template block<3,3>(Inertia::LINEAR, 0) * data.Dinv;
499 
500  if (update_I)
501  {
502  Matrix6Like & I_ = PINOCCHIO_EIGEN_CONST_CAST(Matrix6Like,I);
503  I_.template block<3,3>(Inertia::LINEAR,Inertia::LINEAR)
504  -= data.UDinv.template middleRows<3>(Inertia::LINEAR) * I_.template block<3,3> (Inertia::ANGULAR, Inertia::LINEAR);
505  I_.template block<6,3>(0,Inertia::ANGULAR).setZero();
506  I_.template block<3,3>(Inertia::ANGULAR,Inertia::LINEAR).setZero();
507  }
508  }
509 
510  static std::string classname() { return std::string("JointModelSpherical"); }
511  std::string shortname() const { return classname(); }
512 
514  template<typename NewScalar>
516  {
518  ReturnType res;
519  res.setIndexes(id(),idx_q(),idx_v());
520  return res;
521  }
522 
523  }; // struct JointModelSphericalTpl
524 
525 } // namespace pinocchio
526 
527 #include <boost/type_traits.hpp>
528 
529 namespace boost
530 {
531  template<typename Scalar, int Options>
532  struct has_nothrow_constructor< ::pinocchio::JointModelSphericalTpl<Scalar,Options> >
533  : public integral_constant<bool,true> {};
534 
535  template<typename Scalar, int Options>
536  struct has_nothrow_copy< ::pinocchio::JointModelSphericalTpl<Scalar,Options> >
537  : public integral_constant<bool,true> {};
538 
539  template<typename Scalar, int Options>
540  struct has_nothrow_constructor< ::pinocchio::JointDataSphericalTpl<Scalar,Options> >
541  : public integral_constant<bool,true> {};
542 
543  template<typename Scalar, int Options>
544  struct has_nothrow_copy< ::pinocchio::JointDataSphericalTpl<Scalar,Options> >
545  : public integral_constant<bool,true> {};
546 }
547 
548 #endif // ifndef __pinocchio_joint_spherical_hpp__
pinocchio::MotionSphericalTpl::MOTION_TYPEDEF_TPL
EIGEN_MAKE_ALIGNED_OPERATOR_NEW MOTION_TYPEDEF_TPL(MotionSphericalTpl)
pinocchio::SE3GroupAction< MotionSphericalTpl< Scalar, Options > >::ReturnType
MotionTpl< Scalar, Options > ReturnType
Definition: joint-spherical.hpp:25
m
float m
pinocchio::traits< ConstraintSphericalTpl< _Scalar, _Options > >::ConstMatrixReturnType
const typedef DenseBase ConstMatrixReturnType
Definition: joint-spherical.hpp:198
PINOCCHIO_JOINT_DATA_BASE_ACCESSOR_DEFAULT_RETURN_TYPE
#define PINOCCHIO_JOINT_DATA_BASE_ACCESSOR_DEFAULT_RETURN_TYPE
Definition: joint-data-base.hpp:62
sincos.hpp
pinocchio::traits< JointSphericalTpl< _Scalar, _Options > >::UD_t
Eigen::Matrix< Scalar, 6, NV, Options > UD_t
Definition: joint-spherical.hpp:353
pinocchio::traits< JointSphericalTpl< _Scalar, _Options > >::U_t
Eigen::Matrix< Scalar, 6, NV, Options > U_t
Definition: joint-spherical.hpp:351
pinocchio::ConstraintSphericalTpl::se3Action
Eigen::Matrix< S1, 6, 3, O1 > se3Action(const SE3Tpl< S1, O1 > &m) const
Definition: joint-spherical.hpp:250
pinocchio::ConstraintSphericalTpl::motionAction
DenseBase motionAction(const MotionDense< MotionDerived > &m) const
Definition: joint-spherical.hpp:275
pinocchio::traits< ConstraintSphericalTpl< _Scalar, _Options > >::JointForce
Eigen::Matrix< Scalar, 3, 1, Options > JointForce
Definition: joint-spherical.hpp:195
pinocchio::traits< ConstraintSphericalTpl< _Scalar, _Options > >::JointMotion
MotionSphericalTpl< Scalar, Options > JointMotion
Definition: joint-spherical.hpp:194
pinocchio::JointDataSphericalTpl::UDinv
UD_t UDinv
Definition: joint-spherical.hpp:386
pinocchio::traits< JointSphericalTpl< _Scalar, _Options > >::Bias_t
MotionZeroTpl< Scalar, Options > Bias_t
Definition: joint-spherical.hpp:348
pinocchio::ConstraintSphericalTpl::__mult__
JointMotion __mult__(const Eigen::MatrixBase< Vector3Like > &w) const
Definition: joint-spherical.hpp:216
macros.hpp
pinocchio::CartesianAxis::cross
static void cross(const Eigen::MatrixBase< V3_in > &vin, const Eigen::MatrixBase< V3_out > &vout)
pinocchio::operator*
MultiplicationOp< InertiaTpl< Scalar, Options >, ConstraintDerived >::ReturnType operator*(const InertiaTpl< Scalar, Options > &Y, const ConstraintBase< ConstraintDerived > &constraint)
&#160;
Definition: constraint-base.hpp:112
pinocchio::MotionSphericalTpl::addTo
void addTo(MotionDense< MotionDerived > &other) const
Definition: joint-spherical.hpp:83
pinocchio::JointDataSphericalTpl::Dinv
D_t Dinv
Definition: joint-spherical.hpp:385
pinocchio::JointModelSphericalTpl::classname
static std::string classname()
Definition: joint-spherical.hpp:510
pinocchio::idx_q
int idx_q(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdxQVisitor to get the index in the full model configuration space...
pinocchio::ConstraintSphericalTpl::NV
@ NV
Definition: joint-spherical.hpp:211
pinocchio::JointModelBase
Definition: joint-model-base.hpp:67
quat
quat
pinocchio::JointDataSphericalTpl::M
Transformation_t M
Definition: joint-spherical.hpp:379
pinocchio::JointModelSphericalTpl::calc
void calc(JointDataDerived &data, const typename Eigen::MatrixBase< ConfigVector > &qs, const typename Eigen::MatrixBase< TangentVector > &vs) const
Definition: joint-spherical.hpp:476
pinocchio::idx_v
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...
pinocchio::Options
Options
Definition: joint-configuration.hpp:746
pinocchio::traits< ConstraintSphericalTpl< _Scalar, _Options > >::MatrixReturnType
DenseBase MatrixReturnType
Definition: joint-spherical.hpp:197
pinocchio::MotionSphericalTpl::MotionSphericalTpl
MotionSphericalTpl(const Eigen::MatrixBase< Vector3Like > &w)
Definition: joint-spherical.hpp:70
PINOCCHIO_EIGEN_CONST_CAST
#define PINOCCHIO_EIGEN_CONST_CAST(TYPE, OBJ)
Macro for an automatic const_cast.
Definition: eigen-macros.hpp:43
pinocchio::SE3Tpl
Definition: spatial/fwd.hpp:38
pinocchio::MotionSphericalTpl::isEqual_impl
bool isEqual_impl(const MotionSphericalTpl &other) const
Definition: joint-spherical.hpp:100
pinocchio::MotionSphericalTpl::se3ActionInverse_impl
MotionPlain se3ActionInverse_impl(const SE3Tpl< S2, O2 > &m) const
Definition: joint-spherical.hpp:143
pinocchio::internal::PerformStYSInversion::run
static EIGEN_STRONG_INLINE void run(const Eigen::MatrixBase< M1 > &StYS, const Eigen::MatrixBase< M2 > &Dinv)
Definition: joint-common-operations.hpp:25
pinocchio::JointDataBase
Definition: joint-data-base.hpp:82
pinocchio::JointDataSphericalTpl::classname
static std::string classname()
Definition: joint-spherical.hpp:396
pinocchio::traits< MotionSphericalTpl< _Scalar, _Options > >::Vector3
Eigen::Matrix< Scalar, 3, 1, Options > Vector3
Definition: joint-spherical.hpp:39
pinocchio::JointModelSphericalTpl::calc
EIGEN_DONT_INLINE void calc(JointDataDerived &data, const typename Eigen::PlainObjectBase< ConfigVector > &qs) const
Definition: joint-spherical.hpp:454
pinocchio::PINOCCHIO_EIGEN_REF_CONST_TYPE
PINOCCHIO_EIGEN_REF_CONST_TYPE(Matrix6Like) operator*(const Eigen
Definition: joint-free-flyer.hpp:122
setup.data
data
Definition: cmake/cython/setup.in.py:48
pinocchio::ConstraintSphericalTpl::TransposeConst::operator*
const SizeDepType< 3 >::RowsReturn< MatrixDerived >::ConstType operator*(const Eigen::MatrixBase< MatrixDerived > &F) const
Definition: joint-spherical.hpp:232
inertia.hpp
pinocchio::MotionDense
Definition: spatial/fwd.hpp:41
boost
pinocchio::JointModelSphericalTpl::shortname
std::string shortname() const
Definition: joint-spherical.hpp:511
pinocchio::traits< MotionSphericalTpl< _Scalar, _Options > >::HomogeneousMatrixType
Matrix4 HomogeneousMatrixType
Definition: joint-spherical.hpp:50
pinocchio::traits< ConstraintSphericalTpl< _Scalar, _Options > >::Scalar
_Scalar Scalar
Definition: joint-spherical.hpp:188
pinocchio::JointModelBase::setIndexes
void setIndexes(JointIndex id, int q, int v)
Definition: joint-model-base.hpp:127
pinocchio::ConstraintSphericalTpl
Definition: joint-spherical.hpp:183
pinocchio::MotionSphericalTpl::__plus__
MotionSphericalTpl __plus__(const MotionSphericalTpl &other) const
Definition: joint-spherical.hpp:95
pinocchio::traits< MotionSphericalTpl< _Scalar, _Options > >::LinearType
Vector3 LinearType
Definition: joint-spherical.hpp:46
pinocchio::MotionAlgebraAction
Return type of the ation of a Motion onto an object of type D.
Definition: spatial/motion.hpp:46
pinocchio::MotionSphericalTpl::operator()
Vector3 & operator()()
Definition: joint-spherical.hpp:74
pinocchio::JointModelSphericalTpl::hasConfigurationLimitInTangent
const std::vector< bool > hasConfigurationLimitInTangent() const
Definition: joint-spherical.hpp:424
pinocchio::traits< JointSphericalTpl< _Scalar, _Options > >::ConfigVector_t
PINOCCHIO_JOINT_DATA_BASE_ACCESSOR_DEFAULT_RETURN_TYPE typedef Eigen::Matrix< Scalar, NQ, 1, Options > ConfigVector_t
Definition: joint-spherical.hpp:357
pinocchio::traits< MotionSphericalTpl< _Scalar, _Options > >::Scalar
_Scalar Scalar
Definition: joint-spherical.hpp:37
pinocchio::MotionDense::linear
ConstLinearType linear() const
Definition: motion-base.hpp:22
pinocchio::traits< MotionSphericalTpl< _Scalar, _Options > >::ConstAngularType
const typedef Vector3 ConstAngularType
Definition: joint-spherical.hpp:47
pinocchio::JointModelSphericalTpl::cast
JointModelSphericalTpl< NewScalar, Options > cast() const
Definition: joint-spherical.hpp:515
pinocchio::MotionSphericalTpl::motionAction
MotionPlain motionAction(const MotionDense< M1 > &v) const
Definition: joint-spherical.hpp:161
pinocchio::SE3GroupAction
Definition: spatial/se3.hpp:39
skew.hpp
pinocchio::MotionZeroTpl
Definition: spatial/fwd.hpp:44
PINOCCHIO_JOINT_DATA_BASE_DEFAULT_ACCESSOR
#define PINOCCHIO_JOINT_DATA_BASE_DEFAULT_ACCESSOR
Definition: joint-data-base.hpp:46
pinocchio::Inertia
InertiaTpl< double, 0 > Inertia
Definition: spatial/fwd.hpp:59
pinocchio::JointModelSphericalTpl::JointDerived
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef JointSphericalTpl< _Scalar, _Options > JointDerived
Definition: joint-spherical.hpp:408
pinocchio::SE3GroupAction< ConstraintSphericalTpl< S1, O1 > >::ReturnType
Eigen::Matrix< S1, 6, 3, O1 > ReturnType
Definition: joint-spherical.hpp:326
pinocchio::JointModelSphericalTpl::calc_aba
void calc_aba(JointDataDerived &data, const Eigen::MatrixBase< Matrix6Like > &I, const bool update_I) const
Definition: joint-spherical.hpp:486
res
res
pinocchio::MotionSphericalTpl
Definition: joint-spherical.hpp:19
pinocchio::traits< JointSphericalTpl< _Scalar, _Options > >::Scalar
_Scalar Scalar
Definition: joint-spherical.hpp:341
pinocchio::SizeDepType::RowsReturn
Definition: matrix-block.hpp:70
pinocchio::JointModelSphericalTpl::PINOCCHIO_JOINT_TYPEDEF_TEMPLATE
PINOCCHIO_JOINT_TYPEDEF_TEMPLATE(JointDerived)
pinocchio::MotionSphericalTpl::motionAction
void motionAction(const MotionDense< M1 > &v, MotionDense< M2 > &mout) const
Definition: joint-spherical.hpp:151
pinocchio::traits< MotionSphericalTpl< _Scalar, _Options > >::Vector6
Eigen::Matrix< Scalar, 6, 1, Options > Vector6
Definition: joint-spherical.hpp:40
pinocchio::python::Scalar
SE3::Scalar Scalar
Definition: conversions.cpp:15
pinocchio::JointDataSphericalTpl::c
Bias_t c
Definition: joint-spherical.hpp:381
pinocchio::PINOCCHIO_JOINT_CAST_TYPE_SPECIALIZATION
PINOCCHIO_JOINT_CAST_TYPE_SPECIALIZATION(JointModelFreeFlyerTpl)
pinocchio::JointDataSphericalTpl::U
U_t U
Definition: joint-spherical.hpp:384
pinocchio::skew
void skew(const Eigen::MatrixBase< Vector3 > &v, const Eigen::MatrixBase< Matrix3 > &M)
Computes the skew representation of a given 3d vector, i.e. the antisymmetric matrix representation o...
Definition: skew.hpp:21
pinocchio::JointModelSphericalTpl::Base
JointModelBase< JointModelSphericalTpl > Base
Definition: joint-spherical.hpp:411
pinocchio::JointDataSphericalTpl::shortname
std::string shortname() const
Definition: joint-spherical.hpp:397
pinocchio::traits< JointSphericalTpl< _Scalar, _Options > >::JointDataDerived
JointDataSphericalTpl< Scalar, Options > JointDataDerived
Definition: joint-spherical.hpp:343
pinocchio::traits< MotionSphericalTpl< _Scalar, _Options > >::ActionMatrixType
Matrix6 ActionMatrixType
Definition: joint-spherical.hpp:49
pinocchio::MotionSphericalTpl::setTo
void setTo(MotionDense< Derived > &other) const
Definition: joint-spherical.hpp:89
pinocchio::traits< ConstraintSphericalTpl< _Scalar, _Options > >::DenseBase
Eigen::Matrix< Scalar, 6, 3, Options > DenseBase
Definition: joint-spherical.hpp:196
joint-base.hpp
pinocchio::JointDataSphericalTpl::JointDataSphericalTpl
JointDataSphericalTpl()
Definition: joint-spherical.hpp:388
pinocchio::JointModelSphericalTpl
Definition: multibody/joint/fwd.hpp:42
pinocchio::JointModelSphericalTpl::hasConfigurationLimit
const std::vector< bool > hasConfigurationLimit() const
Definition: joint-spherical.hpp:419
pinocchio::operator+
MotionDerived::MotionPlain operator+(const MotionPlanarTpl< Scalar, Options > &m1, const MotionDense< MotionDerived > &m2)
Definition: joint-planar.hpp:192
pinocchio::MotionSphericalTpl::m_w
Vector3 m_w
Definition: joint-spherical.hpp:173
pinocchio::JointDataSphericalTpl
Definition: multibody/joint/fwd.hpp:45
M
M
pinocchio::ConstraintSphericalTpl::se3ActionInverse
Eigen::Matrix< S1, 6, 3, O1 > se3ActionInverse(const SE3Tpl< S1, O1 > &m) const
Definition: joint-spherical.hpp:260
ur5x4.w
w
Definition: ur5x4.py:45
pinocchio::traits< MotionSphericalTpl< _Scalar, _Options > >::Matrix4
Eigen::Matrix< Scalar, 4, 4, Options > Matrix4
Definition: joint-spherical.hpp:41
pinocchio::JointDataSphericalTpl::S
PINOCCHIO_JOINT_DATA_BASE_DEFAULT_ACCESSOR Constraint_t S
Definition: joint-spherical.hpp:378
pinocchio::traits< JointSphericalTpl< _Scalar, _Options > >::TangentVector_t
Eigen::Matrix< Scalar, NV, 1, Options > TangentVector_t
Definition: joint-spherical.hpp:358
pinocchio::JointDataSphericalTpl::v
Motion_t v
Definition: joint-spherical.hpp:380
pinocchio::MotionSphericalTpl::isEqual_impl
bool isEqual_impl(const MotionDense< MotionDerived > &other) const
Definition: joint-spherical.hpp:106
pinocchio::traits< JointSphericalTpl< _Scalar, _Options > >::D_t
Eigen::Matrix< Scalar, NV, NV, Options > D_t
Definition: joint-spherical.hpp:352
pinocchio::ConstraintSphericalTpl::nv_impl
int nv_impl() const
Definition: joint-spherical.hpp:213
pinocchio::Symmetric3
Symmetric3Tpl< double, 0 > Symmetric3
Definition: spatial/fwd.hpp:60
pinocchio::JointModelSphericalTpl::forwardKinematics
void forwardKinematics(Transformation_t &M, const Eigen::MatrixBase< ConfigVectorLike > &q_joint) const
Definition: joint-spherical.hpp:430
pinocchio::MotionSphericalTpl::MotionSphericalTpl
MotionSphericalTpl()
Definition: joint-spherical.hpp:67
pinocchio::MotionAlgebraAction< ConstraintSphericalTpl< S1, O1 >, MotionDerived >::ReturnType
Eigen::Matrix< S1, 6, 3, O1 > ReturnType
Definition: joint-spherical.hpp:330
pinocchio::MotionSphericalTpl::se3Action_impl
void se3Action_impl(const SE3Tpl< S2, O2 > &m, MotionDense< D2 > &v) const
Definition: joint-spherical.hpp:112
pinocchio::ConstraintSphericalTpl::TransposeConst
Definition: joint-spherical.hpp:222
pinocchio::JointModelBase::idx_v
int idx_v() const
Definition: joint-model-base.hpp:120
pinocchio::v
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
Definition: joint-configuration.hpp:748
constraint.hpp
pinocchio::ConstraintSphericalTpl::transpose
TransposeConst transpose() const
Definition: joint-spherical.hpp:239
pinocchio::traits< MotionSphericalTpl< _Scalar, _Options > >::MotionPlain
MotionTpl< Scalar, Options > MotionPlain
Definition: joint-spherical.hpp:51
pinocchio::ConstraintSphericalTpl::TransposeConst::operator*
ForceDense< Derived >::ConstAngularType operator*(const ForceDense< Derived > &phi)
Definition: joint-spherical.hpp:226
pinocchio::traits< MotionSphericalTpl< _Scalar, _Options > >::ConstLinearType
const typedef Vector3 ConstLinearType
Definition: joint-spherical.hpp:48
collision-with-point-clouds.Y
Y
Definition: collision-with-point-clouds.py:31
pinocchio::traits< JointModelSphericalTpl< Scalar, Options > >::JointDerived
JointSphericalTpl< Scalar, Options > JointDerived
Definition: joint-spherical.hpp:367
pinocchio::traits< JointSphericalTpl< _Scalar, _Options > >::Constraint_t
ConstraintSphericalTpl< Scalar, Options > Constraint_t
Definition: joint-spherical.hpp:345
pinocchio::MotionSpherical
MotionSphericalTpl< double > MotionSpherical
Definition: joint-spherical.hpp:19
pinocchio::JointModelBase::idx_q
int idx_q() const
Definition: joint-model-base.hpp:119
pinocchio::MotionSphericalTpl::angular
Vector3 & angular()
Definition: joint-spherical.hpp:169
pinocchio::MotionSphericalTpl::plain
PlainReturnType plain() const
Definition: joint-spherical.hpp:77
pinocchio::traits< MotionSphericalTpl< _Scalar, _Options > >::PlainReturnType
MotionPlain PlainReturnType
Definition: joint-spherical.hpp:52
pinocchio::MotionSphericalTpl::se3ActionInverse_impl
void se3ActionInverse_impl(const SE3Tpl< S2, O2 > &m, MotionDense< D2 > &v) const
Definition: joint-spherical.hpp:130
pinocchio::ForceDense
Definition: force-dense.hpp:24
pinocchio::cross
void cross(const Eigen::MatrixBase< Vector3 > &v, const Eigen::MatrixBase< Matrix3xIn > &Min, const Eigen::MatrixBase< Matrix3xOut > &Mout)
Applies the cross product onto the columns of M.
Definition: skew.hpp:211
pinocchio::ConstraintBase
Definition: constraint-base.hpp:48
pinocchio::traits< JointSphericalTpl< _Scalar, _Options > >::Transformation_t
SE3Tpl< Scalar, Options > Transformation_t
Definition: joint-spherical.hpp:346
PINOCCHIO_CONSTRAINT_TYPEDEF_TPL
#define PINOCCHIO_CONSTRAINT_TYPEDEF_TPL(DERIVED)
Definition: constraint-base.hpp:27
pinocchio::InertiaTpl
Definition: spatial/fwd.hpp:52
pinocchio::traits< JointSphericalTpl< _Scalar, _Options > >::JointModelDerived
JointModelSphericalTpl< Scalar, Options > JointModelDerived
Definition: joint-spherical.hpp:344
pinocchio::traits
Common traits structure to fully define base classes for CRTP.
Definition: fwd.hpp:44
pinocchio::JointModelSphericalTpl::calc
void calc(JointDataDerived &data, const typename Eigen::QuaternionBase< QuaternionDerived > &quat) const
Definition: joint-spherical.hpp:446
pinocchio::PINOCCHIO_EIGEN_PLAIN_TYPE
PINOCCHIO_EIGEN_PLAIN_TYPE(ConfigVectorType) integrate(const ModelTpl< Scalar
Integrate a configuration vector for the specified model for a tangent vector during one unit time.
pinocchio::MotionSphericalTpl::se3Action_impl
MotionPlain se3Action_impl(const SE3Tpl< S2, O2 > &m) const
Definition: joint-spherical.hpp:122
PINOCCHIO_EIGEN_REF_TYPE
#define PINOCCHIO_EIGEN_REF_TYPE(D)
Definition: eigen-macros.hpp:25
pinocchio::JointModelSphericalTpl::calc
EIGEN_DONT_INLINE void calc(JointDataDerived &data, const typename Eigen::MatrixBase< ConfigVector > &qs) const
Definition: joint-spherical.hpp:466
pinocchio::alphaSkew
void alphaSkew(const Scalar alpha, const Eigen::MatrixBase< Vector3 > &v, const Eigen::MatrixBase< Matrix3 > &M)
Computes the skew representation of a given 3d vector multiplied by a given scalar....
Definition: skew.hpp:124
pinocchio::traits< MotionSphericalTpl< _Scalar, _Options > >::Matrix6
Eigen::Matrix< Scalar, 6, 6, Options > Matrix6
Definition: joint-spherical.hpp:42
pinocchio::MotionTpl< Scalar, Options >
pinocchio::MotionSphericalTpl::angular
const Vector3 & angular() const
Definition: joint-spherical.hpp:168
dcrba.NV
NV
Definition: dcrba.py:444
pinocchio::JointDataSphericalTpl::JointDerived
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef JointSphericalTpl< _Scalar, _Options > JointDerived
Definition: joint-spherical.hpp:374
dpendulum.NQ
int NQ
Definition: dpendulum.py:8
meshcat-viewer.qs
qs
Definition: meshcat-viewer.py:130
pinocchio::operator^
MotionDerived::MotionPlain operator^(const MotionDense< MotionDerived > &m1, const MotionPlanarTpl< S2, O2 > &m2)
Definition: joint-planar.hpp:339
pinocchio::ConstraintSphericalTpl::isEqual
bool isEqual(const ConstraintSphericalTpl &) const
Definition: joint-spherical.hpp:287
pinocchio::traits< JointSphericalTpl< _Scalar, _Options > >::Motion_t
MotionSphericalTpl< Scalar, Options > Motion_t
Definition: joint-spherical.hpp:347
pinocchio::traits< MotionSphericalTpl< _Scalar, _Options > >::AngularType
Vector3 AngularType
Definition: joint-spherical.hpp:45
pinocchio::ForceDense::angular
ConstAngularType angular() const
Return the angular part of the force vector.
Definition: force-base.hpp:35
pinocchio::ConstraintSphericalTpl::matrix_impl
DenseBase matrix_impl() const
Definition: joint-spherical.hpp:241
pinocchio::MotionAlgebraAction< MotionSphericalTpl< Scalar, Options >, MotionDerived >::ReturnType
MotionTpl< Scalar, Options > ReturnType
Definition: joint-spherical.hpp:31
pinocchio::JointSphericalTpl
Definition: joint-spherical.hpp:332
pinocchio::traits< JointDataSphericalTpl< Scalar, Options > >::JointDerived
JointSphericalTpl< Scalar, Options > JointDerived
Definition: joint-spherical.hpp:363
pinocchio::MotionDense::angular
ConstAngularType angular() const
Definition: motion-base.hpp:21
pinocchio::JointModelSphericalTpl::createData
JointDataDerived createData() const
Definition: joint-spherical.hpp:417
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:28
pinocchio::JointDataSphericalTpl::PINOCCHIO_JOINT_DATA_TYPEDEF_TEMPLATE
PINOCCHIO_JOINT_DATA_TYPEDEF_TEMPLATE(JointDerived)
pinocchio::JointModelBase::id
JointIndex id() const
Definition: joint-model-base.hpp:121


pinocchio
Author(s):
autogenerated on Tue Feb 13 2024 03:43:59