joint-basic-visitors.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016-2020 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_multibody_joint_basic_visitors_hpp__
6 #define __pinocchio_multibody_joint_basic_visitors_hpp__
7 
9 
10 namespace pinocchio
11 {
12 
22  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
23  inline JointDataTpl<Scalar, Options, JointCollectionTpl>
24  createData(const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel);
25 
38  template<
39  typename Scalar,
40  int Options,
41  template<typename S, int O> class JointCollectionTpl,
42  typename ConfigVectorType>
43  inline void calc_zero_order(
44  const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel,
45  JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata,
46  const Eigen::MatrixBase<ConfigVectorType> & q);
47 
62  template<
63  typename Scalar,
64  int Options,
65  template<typename S, int O> class JointCollectionTpl,
66  typename ConfigVectorType,
67  typename TangentVectorType>
68  inline void calc_first_order(
69  const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel,
70  JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata,
71  const Eigen::MatrixBase<ConfigVectorType> & q,
72  const Eigen::MatrixBase<TangentVectorType> & v);
73 
86  template<
87  typename Scalar,
88  int Options,
89  template<typename S, int O> class JointCollectionTpl,
90  typename TangentVectorType>
91  inline void calc_first_order(
92  const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel,
93  JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata,
94  const Blank blank,
95  const Eigen::MatrixBase<TangentVectorType> & v);
96 
112  template<
113  typename Scalar,
114  int Options,
115  template<typename S, int O> class JointCollectionTpl,
116  typename VectorLike,
117  typename Matrix6Type>
118  inline void calc_aba(
119  const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel,
120  JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata,
121  const Eigen::MatrixBase<VectorLike> & armature,
122  const Eigen::MatrixBase<Matrix6Type> & I,
123  const bool update_I);
124 
133  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
134  inline int nv(const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel);
135 
144  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
145  inline int nq(const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel);
146 
155  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
156  inline const std::vector<bool>
157  hasConfigurationLimit(const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel);
158 
167  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
168  inline const std::vector<bool>
169  hasConfigurationLimitInTangent(const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel);
170 
180  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
181  inline int idx_q(const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel);
182 
192  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
193  inline int idx_v(const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel);
194 
203  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
204  inline JointIndex id(const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel);
205 
219  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
220  inline void setIndexes(
221  JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel, JointIndex id, int q, int v);
222 
229  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
230  inline std::string shortname(const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel);
231 
241  template<
242  typename NewScalar,
243  typename Scalar,
244  int Options,
245  template<typename S, int O> class JointCollectionTpl>
246  typename CastType<NewScalar, JointModelTpl<Scalar, Options, JointCollectionTpl>>::type
247  cast_joint(const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel);
248 
257  template<
258  typename Scalar,
259  int Options,
260  template<typename S, int O> class JointCollectionTpl,
261  typename JointModelDerived>
262  bool isEqual(
263  const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel_generic,
264  const JointModelBase<JointModelDerived> & jmodel);
265 
275  template<
276  typename NewScalar,
277  typename Scalar,
278  int Options,
279  template<typename S, int O> class JointCollectionTpl,
280  typename JointModelDerived>
281  bool hasSameIndexes(
282  const JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel_generic,
283  const JointModelBase<JointModelDerived> & jmodel);
284 
285  //
286  // Visitors on JointDatas
287  //
288 
297  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
298  inline typename JointDataTpl<Scalar, Options, JointCollectionTpl>::ConfigVector_t
299  joint_q(const JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata);
300 
309  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
310  inline typename JointDataTpl<Scalar, Options, JointCollectionTpl>::TangentVector_t
311  joint_v(const JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata);
312 
321  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
322  inline JointMotionSubspaceTpl<Eigen::Dynamic, Scalar, Options>
323  joint_motin_subspace_xd(const JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata);
324 
333  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
334  inline SE3Tpl<Scalar, Options>
335  joint_transform(const JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata);
336 
345  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
346  inline MotionTpl<Scalar, Options>
347  motion(const JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata);
348 
357  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
358  inline MotionTpl<Scalar, Options>
359  bias(const JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata);
360 
369  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
370  inline Eigen::Matrix<Scalar, 6, Eigen::Dynamic, Options>
371  u_inertia(const JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata);
372 
381  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
382  inline Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Options>
383  dinv_inertia(const JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata);
384 
393  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
394  inline Eigen::Matrix<Scalar, 6, Eigen::Dynamic, Options>
395  udinv_inertia(const JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata);
396 
405  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
406  inline Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Options>
407  stu_inertia(const JointDataTpl<Scalar, Options, JointCollectionTpl> & jdata);
408 
417  template<
418  typename Scalar,
419  int Options,
420  template<typename S, int O> class JointCollectionTpl,
421  typename JointDataDerived>
422  bool isEqual(
423  const JointDataTpl<Scalar, Options, JointCollectionTpl> & jmodel_generic,
424  const JointDataBase<JointDataDerived> & jmodel);
425 
426 } // namespace pinocchio
427 
428 /* --- Details -------------------------------------------------------------------- */
429 // Included later
430 // #include "pinocchio/multibody/joint/joint-basic-visitors.hxx"
431 
432 #endif // ifndef __pinocchio_multibody_joint_basic_visitors_hpp__
pinocchio::joint_q
JointDataTpl< Scalar, Options, JointCollectionTpl >::ConfigVector_t joint_q(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataVariant through JointConfigVisitor to get the joint configuration vector.
common_symbols.type
type
Definition: common_symbols.py:35
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::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:1082
pinocchio::nv
int nv(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNvVisitor to get the dimension of the joint tangent space.
pinocchio::id
JointIndex id(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdVisitor to get the index of the joint in the kinematic chain.
pinocchio::nq
int nq(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNqVisitor to get the dimension of the joint configuration space.
pinocchio::u_inertia
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > u_inertia(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointUInertiaVisitor to get the U matrix of the inertia matrix decomposi...
pinocchio::python::Scalar
context::Scalar Scalar
Definition: admm-solver.cpp:29
pinocchio::hasSameIndexes
bool hasSameIndexes(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel_generic, const JointModelBase< JointModelDerived > &jmodel)
Check whether JointModelTpl<Scalar,...> has the indexes than another JointModelDerived.
pinocchio::motion
MotionTpl< Scalar, Options > motion(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointMotionVisitor to get the joint internal motion as a dense motion.
pinocchio::hasConfigurationLimitInTangent
const std::vector< bool > hasConfigurationLimitInTangent(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointConfigurationLimitInTangentVisitor to get the configurations limit...
pinocchio::joint_v
JointDataTpl< Scalar, Options, JointCollectionTpl >::TangentVector_t joint_v(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataVariant through JointConfigVisitor to get the joint velocity vector.
pinocchio::shortname
std::string shortname(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointShortnameVisitor to get the shortname of the derived joint model.
pinocchio::createData
ConstraintDataTpl< Scalar, Options, ConstraintCollectionTpl > createData(const ConstraintModelTpl< Scalar, Options, ConstraintCollectionTpl > &cmodel)
Definition: constraint-model-visitor.hpp:239
pinocchio::calc_first_order
void calc_first_order(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v)
Visit a JointModelTpl and the corresponding JointDataTpl through JointCalcFirstOrderVisitor to comput...
pinocchio::joint_transform
SE3Tpl< Scalar, Options > joint_transform(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointTransformVisitor to get the joint internal transform (transform bet...
pinocchio::hasConfigurationLimit
const std::vector< bool > hasConfigurationLimit(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointConfigurationLimitVisitor to get the configurations limits.
pinocchio::setIndexes
void setIndexes(JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, JointIndex id, int q, int v)
Visit a JointModelTpl through JointSetIndexesVisitor to set the indexes of the joint in the kinematic...
pinocchio::cast_joint
CastType< NewScalar, JointModelTpl< Scalar, Options, JointCollectionTpl > >::type cast_joint(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl<Scalar,...> to cast it into JointModelTpl<NewScalar,...>
pinocchio::calc_aba
void calc_aba(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata, const Eigen::MatrixBase< VectorLike > &armature, const Eigen::MatrixBase< Matrix6Type > &I, const bool update_I)
Visit a JointModelTpl and the corresponding JointDataTpl through JointCalcAbaVisitor to.
pinocchio::q
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
Definition: joint-configuration.hpp:1083
pinocchio::v
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
Definition: joint-configuration.hpp:1084
pinocchio::bias
MotionTpl< Scalar, Options > bias(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointBiasVisitor to get the joint bias as a dense motion.
pinocchio::isEqual
bool isEqual(const ConstraintDataTpl< Scalar, Options, ConstraintCollectionTpl > &cdata_generic, const ConstraintDataBase< ConstraintDataDerived > &cdata)
Definition: constraint-model-visitor.hpp:273
pinocchio::dinv_inertia
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options > dinv_inertia(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointDInvInertiaVisitor to get the D^{-1} matrix of the inertia matrix d...
pinocchio::udinv_inertia
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > udinv_inertia(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointUDInvInertiaVisitor to get U*D^{-1} matrix of the inertia matrix de...
fwd.hpp
pinocchio::JointIndex
Index JointIndex
Definition: multibody/fwd.hpp:26
pinocchio::stu_inertia
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options > stu_inertia(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointStUInertiaVisitor to get St*I*S matrix of the inertia matrix decomp...
pinocchio::calc_zero_order
void calc_zero_order(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata, const Eigen::MatrixBase< ConfigVectorType > &q)
Visit a JointModelTpl and the corresponding JointDataTpl through JointCalcZeroOrderVisitor to compute...
pinocchio::joint_motin_subspace_xd
JointMotionSubspaceTpl< Eigen::Dynamic, Scalar, Options > joint_motin_subspace_xd(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataVariant through JointConstraintVisitor to get the joint constraint as a dense constr...
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:09