Go to the documentation of this file.
6 #ifndef __pinocchio_multibody_joint_model_base_hpp__
7 #define __pinocchio_multibody_joint_model_base_hpp__
16 #define PINOCCHIO_JOINT_MODEL_TYPEDEF_GENERIC(Joint, TYPENAME) \
17 typedef Eigen::DenseIndex Index; \
18 typedef TYPENAME traits<Joint>::Scalar Scalar; \
19 typedef TYPENAME traits<Joint>::JointDataDerived JointDataDerived; \
20 typedef TYPENAME traits<Joint>::JointModelDerived JointModelDerived; \
21 typedef TYPENAME traits<Joint>::Constraint_t Constraint_t; \
22 typedef TYPENAME traits<Joint>::Transformation_t Transformation_t; \
23 typedef TYPENAME traits<Joint>::Motion_t Motion_t; \
24 typedef TYPENAME traits<Joint>::Bias_t Bias_t; \
25 typedef TYPENAME traits<Joint>::U_t U_t; \
26 typedef TYPENAME traits<Joint>::D_t D_t; \
27 typedef TYPENAME traits<Joint>::UD_t UD_t; \
28 typedef TYPENAME traits<Joint>::is_mimicable_t is_mimicable_t; \
31 Options = traits<Joint>::Options, \
32 NQ = traits<Joint>::NQ, \
33 NV = traits<Joint>::NV, \
34 NVExtended = traits<Joint>::NVExtended \
36 typedef TYPENAME traits<Joint>::ConfigVector_t ConfigVector_t; \
37 typedef TYPENAME traits<Joint>::TangentVector_t TangentVector_t
41 #define PINOCCHIO_JOINT_TYPEDEF(Joint) \
42 PINOCCHIO_JOINT_MODEL_TYPEDEF_GENERIC(Joint, PINOCCHIO_EMPTY_ARG)
43 #define PINOCCHIO_JOINT_TYPEDEF_TEMPLATE(Joint) \
44 PINOCCHIO_JOINT_MODEL_TYPEDEF_GENERIC(Joint, typename)
46 #elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4) && (__GNUC_PATCHLEVEL__ == 2)
48 #define PINOCCHIO_JOINT_TYPEDEF(Joint) \
49 PINOCCHIO_JOINT_MODEL_TYPEDEF_GENERIC(Joint, PINOCCHIO_EMPTY_ARG)
50 #define PINOCCHIO_JOINT_TYPEDEF_TEMPLATE(Joint) \
51 PINOCCHIO_JOINT_MODEL_TYPEDEF_GENERIC(Joint, typename)
55 #define PINOCCHIO_JOINT_TYPEDEF(Joint) PINOCCHIO_JOINT_MODEL_TYPEDEF_GENERIC(Joint, typename)
56 #define PINOCCHIO_JOINT_TYPEDEF_TEMPLATE(Joint) \
57 PINOCCHIO_JOINT_MODEL_TYPEDEF_GENERIC(Joint, typename)
61 #define PINOCCHIO_JOINT_USE_INDEXES(Joint) \
62 typedef JointModelBase<Joint> Base; \
65 using Base::idx_vExtended
67 #define PINOCCHIO_JOINT_CAST_TYPE_SPECIALIZATION(JointModelTpl) \
68 template<typename Scalar, int Options, typename NewScalar> \
69 struct CastType<NewScalar, JointModelTpl<Scalar, Options>> \
71 typedef JointModelTpl<NewScalar, Options> type; \
77 template<
typename Derived>
80 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
87 return *
static_cast<Derived *
>(
this);
91 return *
static_cast<const Derived *
>(
this);
101 return derived().hasConfigurationLimit();
106 return derived().hasConfigurationLimitInTangent();
109 template<
typename ConfigVectorType>
110 void calc(JointDataDerived &
data,
const Eigen::MatrixBase<ConfigVectorType> &
qs)
const
115 template<
typename TangentVectorType>
117 JointDataDerived &
data,
118 const Blank not_used,
119 const Eigen::MatrixBase<TangentVectorType> & vs)
const
124 template<
typename ConfigVectorType,
typename TangentVectorType>
126 JointDataDerived &
data,
127 const Eigen::MatrixBase<ConfigVectorType> &
qs,
128 const Eigen::MatrixBase<TangentVectorType> & vs)
const
133 template<
typename VectorLike,
typename Matrix6Like>
135 JointDataDerived &
data,
136 const Eigen::MatrixBase<VectorLike> & armature,
137 const Eigen::MatrixBase<Matrix6Like> & I,
138 const bool update_I =
false)
const
154 return derived().nvExtended_impl();
181 return derived().idx_vExtended_impl();
212 derived().setIndexes_impl(
id,
q,
v, vExtended);
222 void disp(std::ostream & os)
const
226 <<
" index: " <<
id() << endl
227 <<
" index q: " <<
idx_q() << endl
228 <<
" index v: " <<
idx_v() << endl
230 <<
" nq: " <<
nq() << endl
231 <<
" nv: " <<
nv() << endl
247 return Derived::classname();
250 template<
typename NewScalar>
253 return derived().template cast<NewScalar>();
256 template<
class OtherDerived>
262 template<
class OtherDerived>
268 template<
class OtherDerived>
279 template<
class OtherDerived>
294 return derived().JointMappedConfigSelector_impl(
a);
309 return derived().JointMappedConfigSelector_impl(
a);
324 return derived().jointConfigSelector_impl(
a);
339 return derived().jointConfigSelector_impl(
a);
355 return derived().JointMappedVelocitySelector_impl(
a.derived());
370 return derived().JointMappedVelocitySelector_impl(
a.derived());
385 return derived().jointVelocitySelector_impl(
a.derived());
400 return derived().jointVelocitySelector_impl(
a.derived());
416 return derived().jointCols_impl(
A.derived());
423 return derived().jointExtendedModelCols_impl(
A.derived());
445 return derived().jointCols_impl(
A.derived());
452 return derived().jointExtendedModelCols_impl(
A.derived());
475 return derived().jointRows_impl(
A.derived());
482 return derived().jointExtendedModelRows_impl(
A.derived());
503 return derived().jointRows_impl(
A.derived());
510 return derived().jointExtendedModelRows_impl(
A.derived());
534 return derived().jointBlock_impl(Mat.derived());
541 return derived().jointExtendedModelBlock_impl(Mat.derived());
564 return derived().jointBlock_impl(Mat.derived());
571 return derived().jointExtendedModelBlock_impl(Mat.derived());
633 #endif // ifndef __pinocchio_multibody_joint_model_base_hpp__
JointModelBase(const JointModelBase &clone)
SizeDepType< NVExtended >::template ColsReturn< D >::ConstType jointExtendedModelCols_impl(const Eigen::MatrixBase< D > &A) const
JointDataDerived createData() const
SizeDepType< NQ >::template SegmentReturn< D >::Type jointConfigSelector(Eigen::MatrixBase< D > &a) const
void calc(JointDataDerived &data, const Blank not_used, const Eigen::MatrixBase< TangentVectorType > &vs) const
SizeDepType< NV >::template RowsReturn< D >::ConstType jointRows(const Eigen::MatrixBase< D > &A) const
SizeDepType< NV >::template BlockReturn< D >::Type jointBlock_impl(Eigen::MatrixBase< D > &Mat) const
const std::vector< bool > hasConfigurationLimit() const
void calc(JointDataDerived &data, const Eigen::MatrixBase< ConfigVectorType > &qs, const Eigen::MatrixBase< TangentVectorType > &vs) const
bool hasSameIndexes(const JointModelBase< OtherDerived > &other) const
SizeDepType< NVExtended >::template BlockReturn< D >::ConstType jointExtendedModelBlock_impl(const Eigen::MatrixBase< D > &Mat) const
SizeDepType< NVExtended >::template BlockReturn< D >::Type jointExtendedModelBlock(Eigen::MatrixBase< D > &Mat) const
SizeDepType< NQ >::template SegmentReturn< D >::ConstType JointMappedConfigSelector_impl(const Eigen::MatrixBase< D > &a) const
SizeDepType< NVExtended >::template RowsReturn< D >::ConstType jointExtendedModelRows(const Eigen::MatrixBase< D > &A) const
static ColsReturn< D >::ConstType middleCols(const Eigen::MatrixBase< D > &mat, typename Eigen::DenseBase< D >::Index start, typename Eigen::DenseBase< D >::Index size=NV)
#define PINOCCHIO_EIGEN_CONST_CAST(TYPE, OBJ)
Macro for an automatic const_cast.
bool isEqual(const JointModelBase< Derived > &other) const
JointIndex id_impl() const
SizeDepType< NQ >::template SegmentReturn< D >::ConstType jointConfigSelector(const Eigen::MatrixBase< D > &a) const
SizeDepType< NVExtended >::template ColsReturn< D >::Type jointExtendedModelCols_impl(Eigen::MatrixBase< D > &A) const
CastType< NewScalar, Derived >::type cast() const
void setIndexes(JointIndex id, int q, int v)
PINOCCHIO_JOINT_TYPEDEF_TEMPLATE(JointDerived)
SizeDepType< NVExtended >::template BlockReturn< D >::ConstType jointExtendedModelBlock(const Eigen::MatrixBase< D > &Mat) const
SizeDepType< NV >::template RowsReturn< D >::Type jointRows(Eigen::MatrixBase< D > &A) const
SizeDepType< NVExtended >::template RowsReturn< D >::ConstType jointExtendedModelRows_impl(const Eigen::MatrixBase< D > &A) const
SizeDepType< NQ >::template SegmentReturn< D >::Type JointMappedConfigSelector_impl(Eigen::MatrixBase< D > &a) const
SizeDepType< NV >::template SegmentReturn< D >::ConstType jointVelocitySelector(const Eigen::MatrixBase< D > &a) const
SizeDepType< NQ >::template SegmentReturn< D >::Type JointMappedConfigSelector(Eigen::MatrixBase< D > &a) const
SizeDepType< NV >::template ColsReturn< D >::Type jointCols(Eigen::MatrixBase< D > &A) const
void calc_aba(JointDataDerived &data, const Eigen::MatrixBase< VectorLike > &armature, const Eigen::MatrixBase< Matrix6Like > &I, const bool update_I=false) const
SizeDepType< NQ >::template SegmentReturn< D >::Type jointConfigSelector_impl(Eigen::MatrixBase< D > &a) const
SizeDepType< NVExtended >::template RowsReturn< D >::Type jointExtendedModelRows(Eigen::MatrixBase< D > &A) const
static std::string classname()
int nvExtended_impl() const
SizeDepType< NVExtended >::template BlockReturn< D >::Type jointExtendedModelBlock_impl(Eigen::MatrixBase< D > &Mat) const
SizeDepType< NV >::template ColsReturn< D >::ConstType jointCols_impl(const Eigen::MatrixBase< D > &A) const
JointModelBase & operator=(const JointModelBase &clone)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef traits< Derived >::JointDerived JointDerived
friend std::ostream & operator<<(std::ostream &os, const JointModelBase< Derived > &jmodel)
void setIndexes(JointIndex id, int q, int v, int vExtended)
std::string shortname() const
bool operator!=(const JointModelBase< OtherDerived > &other) const
bool operator==(const JointModelBase< OtherDerived > &other) const
const std::vector< bool > hasConfigurationLimitInTangent() const
static RowsReturn< D >::ConstType middleRows(const Eigen::MatrixBase< D > &mat, typename Eigen::DenseBase< D >::Index start, typename Eigen::DenseBase< D >::Index size=NV)
static SegmentReturn< D >::ConstType segment(const Eigen::MatrixBase< D > &mat, typename Eigen::DenseBase< D >::Index start, typename Eigen::DenseBase< D >::Index size=NV)
int idx_vExtended() const
SizeDepType< NV >::template SegmentReturn< D >::ConstType jointVelocitySelector_impl(const Eigen::MatrixBase< D > &a) const
SizeDepType< NV >::template BlockReturn< D >::ConstType jointBlock(const Eigen::MatrixBase< D > &Mat) const
Returns a block of dimension nv()xnv() located at position idx_v(),idx_v() in the matrix Mat.
SizeDepType< NVExtended >::template RowsReturn< D >::Type jointExtendedModelRows_impl(Eigen::MatrixBase< D > &A) const
SizeDepType< NVExtended >::template ColsReturn< D >::ConstType jointExtendedModelCols(const Eigen::MatrixBase< D > &A) const
SizeDepType< NV >::template RowsReturn< D >::Type jointRows_impl(Eigen::MatrixBase< D > &A) const
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
SizeDepType< NV >::template ColsReturn< D >::Type jointCols_impl(Eigen::MatrixBase< D > &A) const
virtual CollisionGeometry * clone() const=0
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
bool comparison_eq(const LhsType &lhs_value, const RhsType &rhs_value)
SizeDepType< NV >::template SegmentReturn< D >::ConstType JointMappedVelocitySelector(const Eigen::MatrixBase< D > &a) const
SizeDepType< NV >::template ColsReturn< D >::ConstType jointCols(const Eigen::MatrixBase< D > &A) const
SizeDepType< NV >::template SegmentReturn< D >::Type JointMappedVelocitySelector(Eigen::MatrixBase< D > &a) const
SizeDepType< NV >::template RowsReturn< D >::ConstType jointRows_impl(const Eigen::MatrixBase< D > &A) const
void calc(JointDataDerived &data, const Eigen::MatrixBase< ConfigVectorType > &qs) const
SizeDepType< NV >::template BlockReturn< D >::Type jointBlock(Eigen::MatrixBase< D > &Mat) const
void setIndexes_impl(JointIndex id, int q, int v, int vExtended)
Common traits structure to fully define base classes for CRTP.
SizeDepType< NV >::template BlockReturn< D >::ConstType jointBlock_impl(const Eigen::MatrixBase< D > &Mat) const
SizeDepType< NV >::template SegmentReturn< D >::Type jointVelocitySelector(Eigen::MatrixBase< D > &a) const
SizeDepType< NV >::template SegmentReturn< D >::ConstType JointMappedVelocitySelector_impl(const Eigen::MatrixBase< D > &a) const
SizeDepType< NQ >::template SegmentReturn< D >::ConstType jointConfigSelector_impl(const Eigen::MatrixBase< D > &a) const
static BlockReturn< D >::ConstType block(const Eigen::MatrixBase< D > &mat, typename Eigen::DenseBase< D >::Index row_id, typename Eigen::DenseBase< D >::Index col_id, typename Eigen::DenseBase< D >::Index row_size_block=NV, typename Eigen::DenseBase< D >::Index col_size_block=NV)
void disp(std::ostream &os) const
Type of the cast of a class C templated by Scalar and Options, to a new NewScalar type....
const JointModelDerived & derived() const
SizeDepType< NV >::template SegmentReturn< D >::Type JointMappedVelocitySelector_impl(Eigen::MatrixBase< D > &a) const
SizeDepType< NV >::template SegmentReturn< D >::Type jointVelocitySelector_impl(Eigen::MatrixBase< D > &a) const
AD< Scalar > max(const AD< Scalar > &x, const AD< Scalar > &y)
SizeDepType< NQ >::template SegmentReturn< D >::ConstType JointMappedConfigSelector(const Eigen::MatrixBase< D > &a) const
int idx_vExtended_impl() const
bool isEqual(const JointModelBase< OtherDerived > &) const
JointModelDerived & derived()
SizeDepType< NVExtended >::template ColsReturn< D >::Type jointExtendedModelCols(Eigen::MatrixBase< D > &A) const
Main pinocchio namespace.
pinocchio
Author(s):
autogenerated on Thu Apr 10 2025 02:42:19