Go to the documentation of this file.
5 #ifndef __pinocchio_multibody_joint_generic_hpp__
6 #define __pinocchio_multibody_joint_generic_hpp__
10 #include "pinocchio/multibody/joint/joint-basic-visitors.hxx"
13 #include <boost/mpl/contains.hpp>
21 template<
typename S,
int O>
class JointCollectionTpl = JointCollectionDefaultTpl>
25 template<
typename _Scalar,
int _Options,
template<
typename S,
int O>
class JointCollectionTpl>
47 typedef Eigen::Matrix<Scalar, 6, Eigen::Dynamic, Options>
U_t;
48 typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Options>
D_t;
49 typedef Eigen::Matrix<Scalar, 6, Eigen::Dynamic, Options>
UD_t;
77 template<
typename _Scalar,
int _Options,
template<
typename S,
int O>
class JointCollectionTpl>
84 template<
typename _Scalar,
int _Options,
template<
typename S,
int O>
class JointCollectionTpl>
91 template<
typename _Scalar,
int _Options,
template<
typename S,
int O>
class JointCollectionTpl>
93 :
public JointDataBase<JointDataTpl<_Scalar, _Options, JointCollectionTpl>>
96 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
106 using Base::operator==;
107 using Base::operator!=;
126 Constraint_t
S()
const
130 Transformation_t
M()
const
171 template<
typename Jo
intDataDerived>
175 BOOST_MPL_ASSERT((boost::mpl::contains<typename JointDataVariant::types, JointDataDerived>));
229 template<
typename Jo
intDataDerived>
247 return !(*
this == other);
255 template<
typename S,
int O>
class JointCollectionTpl>
261 template<
typename _Scalar,
int _Options,
template<
typename S,
int O>
class JointCollectionTpl>
263 :
JointModelBase<JointModelTpl<_Scalar, _Options, JointCollectionTpl>>
266 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
279 using Base::operator==;
280 using Base::operator!=;
302 template<
typename Jo
intModelDerived>
307 (boost::mpl::contains<typename JointModelVariant::types, JointModelDerived>));
322 return ::pinocchio::createData<Scalar, Options, JointCollectionTpl>(*
this);
325 template<
typename Jo
intModelDerived>
331 template<
typename Jo
intModelDerived>
349 return !(*
this == other);
352 template<
typename ConfigVector>
353 void calc(JointDataDerived &
data,
const Eigen::MatrixBase<ConfigVector> &
q)
const
358 template<
typename TangentVector>
360 JointDataDerived &
data,
const Blank blank,
const Eigen::MatrixBase<TangentVector> &
v)
const
365 template<
typename ConfigVector,
typename TangentVector>
367 JointDataDerived &
data,
368 const Eigen::MatrixBase<ConfigVector> &
q,
369 const Eigen::MatrixBase<TangentVector> &
v)
const
374 template<
typename VectorLike,
typename Matrix6Like>
376 JointDataDerived &
data,
377 const Eigen::MatrixBase<VectorLike> & armature,
378 const Eigen::MatrixBase<Matrix6Like> & I,
379 const bool update_I)
const
391 typedef const Eigen::MatrixBase<D> & InputType;
393 typedef JointMappedConfigSelectorVisitor<InputType, ReturnType> Visitor;
394 typename Visitor::ArgsType arg(
a);
403 typedef Eigen::MatrixBase<D> & InputType;
405 typedef JointMappedConfigSelectorVisitor<InputType, ReturnType> Visitor;
406 typename Visitor::ArgsType arg(
a);
461 template<
typename NewScalar>
464 return cast_joint<NewScalar, Scalar, Options, JointCollectionTpl>(*
this);
474 template<
typename S,
int O>
class JointCollectionTpl,
475 typename JointDataDerived>
480 return joint_data_generic == joint_data.
derived();
486 template<
typename S,
int O>
class JointCollectionTpl,
487 typename JointDataDerived>
492 return joint_data_generic != joint_data.
derived();
498 template<
typename S,
int O>
class JointCollectionTpl,
499 typename JointModelDerived>
504 return joint_model_generic == joint_model.
derived();
510 template<
typename S,
int O>
class JointCollectionTpl,
511 typename JointModelDerived>
516 return joint_model_generic != joint_model.
derived();
521 #endif // ifndef __pinocchio_multibody_joint_generic_hpp__
bool operator!=(const JointModelTpl &other) const
JointTpl< _Scalar, _Options, JointCollectionTpl > JointDerived
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.
JointDataBase< JointDataTpl > Base
const std::vector< bool > hasConfigurationLimitInTangent() const
TangentVector_t TangentVectorTypeRef
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options > D_t
bool isEqual(const JointDataBase< Derived > &other) const
 
int idx_q(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdxQVisitor to get the index in the full model configuration space...
ConfigVector_t joint_q_accessor() const
void calc(JointDataDerived &data, const Eigen::MatrixBase< ConfigVector > &q, const Eigen::MatrixBase< TangentVector > &v) const
int idx_v(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdxVVisitor to get the index in the model tangent space correspond...
TangentVector_t joint_v_accessor() const
int nv(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNvVisitor to get the dimension of the joint tangent space.
bool operator!=(const JointDataTpl &other) const
JointIndex id(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdVisitor to get the index of the joint in the kinematic chain.
JointIndex id_impl() const
#define PINOCCHIO_EIGEN_CONST_CAST(TYPE, OBJ)
Macro for an automatic const_cast.
static std::string classname()
Motion_t v_accessor() const
int nq(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNqVisitor to get the dimension of the joint configuration space.
bool operator==(const ConstraintDataBase< ConstraintDataDerived > &data1, const ConstraintDataTpl< Scalar, Options, ConstraintCollectionTpl > &data2)
JointCollectionTpl< _Scalar, _Options > JointCollection
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...
JointDataVariant & toVariant()
JointModelTpl(const JointModelBase< JointModelDerived > &jmodel)
const std::vector< bool > hasConfigurationLimit() const
JointModelTpl(const JointModelVariant &jmodel_variant)
JointModelVariant & toVariant()
void setIndexes(JointIndex id, int nq, int nv, int nvExtended)
bool isEqual(const JointModelBase< JointModelDerived > &other) const
bool isEqual(const JointDataBase< JointDataDerived > &other) const
void calc(JointDataDerived &data, const Blank blank, const Eigen::MatrixBase< TangentVector > &v) const
JointTpl< context::Scalar > Joint
JointCollection::JointDataVariant JointDataVariant
traits< JointDerived >::Scalar Scalar
bool isEqual(const JointDataTpl &other) const
bool hasSameIndexes(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel_generic, const JointModelBase< JointModelDerived > &jmodel)
Check whether JointModelTpl<Scalar,...> has the indexes than another JointModelDerived.
MotionTpl< Scalar, Options > Bias_t
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.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef JointTpl< _Scalar, _Options, JointCollectionTpl > JointDerived
Transformation_t TansformTypeConstRef
JointModelTpl< NewScalar, Options, JointCollectionTpl > type
void calc_aba(JointDataDerived &data, const Eigen::MatrixBase< VectorLike > &armature, const Eigen::MatrixBase< Matrix6Like > &I, const bool update_I) const
ConfigVector_t ConfigVectorTypeConstRef
void setIndexes(JointIndex id, int nq, int nv)
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > UD_t
const std::vector< bool > hasConfigurationLimitInTangent(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointConfigurationLimitInTangentVisitor to get the configurations limit...
const JointModelVariant & toVariant() const
ConfigVector_t joint_q() const
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > U_t
bool operator==(const JointDataTpl &other) const
JointModelTpl< NewScalar, Options, JointCollectionTpl > cast() const
JointDataTpl< context::Scalar > JointData
Eigen::Matrix< Scalar, Eigen::Dynamic, 1, Options > TangentVector_t
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.
ConfigVector_t ConfigVectorTypeRef
JointDataDerived createData() const
std::string shortname(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointShortnameVisitor to get the shortname of the derived joint model.
static std::string classname()
JointCollectionDefault::JointModelVariant JointModelVariant
Motion_t MotionTypeConstRef
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...
SE3Tpl< Scalar, Options > joint_transform(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointTransformVisitor to get the joint internal transform (transform bet...
const std::vector< bool > hasConfigurationLimit(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointConfigurationLimitVisitor to get the configurations limits.
Constraint_t S_accessor() const
TangentVector_t joint_v() const
UD_t UDinv_accessor() const
D_t Dinv_accessor() const
bool isEqual(const JointModelTpl &other) const
traits< JointDerived >::Scalar Scalar
Bias_t c_accessor() const
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.
SizeDepType< NV >::template SegmentReturn< D >::Type JointMappedConfigSelector_impl(Eigen::MatrixBase< D > &a) const
JointModelTpl< context::Scalar > JointModel
JointTpl< _Scalar, _Options, JointCollectionTpl > JointDerived
Eigen::Matrix< Scalar, Eigen::Dynamic, 1, Options > ConfigVector_t
bool operator==(const JointModelTpl &other) const
int nvExtended(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNvExtendVisitor to get the dimension of the joint extended tangent...
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
Constraint_t ConstraintTypeRef
int idx_vExtended(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdvExtendedVisitor to get the index in the model extended tangent ...
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
MotionTpl< Scalar, Options > bias(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointBiasVisitor to get the joint bias as a dense motion.
void setIndexes(JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, JointIndex id, int q, int v, int vExtended)
Visit a JointModelTpl through JointSetIndexesVisitor to set the indexes of the joint in the kinematic...
PINOCCHIO_JOINT_TYPEDEF_TEMPLATE(JointDerived)
bool operator!=(const JointDataBase< JointDataDerived > &joint_data, const JointDataTpl< Scalar, Options, JointCollectionTpl > &joint_data_generic)
Constraint_t ConstraintTypeConstRef
JointDataTpl< Scalar, Options, JointCollectionTpl > JointDataDerived
bool hasSameIndexes(const JointModelBase< JointModelDerived > &other) const
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...
const JointDataVariant & toVariant() const
JointMotionSubspaceTpl< Eigen::Dynamic, Scalar, Options > Constraint_t
JointModelTpl< Scalar, Options, JointCollectionTpl > JointModelDerived
JointCollectionTpl< Scalar, Options > JointCollection
JointCollection::JointModelVariant JointModelVariant
int idx_vExtended_impl() const
JointDataTpl(const JointDataBase< JointDataDerived > &jdata)
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...
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef JointTpl< _Scalar, _Options, JointCollectionTpl > JointDerived
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...
Common traits structure to fully define base classes for CRTP.
JointCollectionDefault::JointDataVariant JointDataVariant
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...
JointCollection::JointDataVariant JointDataVariant
PINOCCHIO_JOINT_USE_INDEXES(JointModelTpl)
Type of the cast of a class C templated by Scalar and Options, to a new NewScalar type....
std::string shortname() const
JointCollectionTpl< Scalar, Options > JointCollection
PINOCCHIO_JOINT_DATA_TYPEDEF_TEMPLATE(JointDerived)
virtual bool isEqual(const CollisionGeometry &other) const=0
Transformation_t M() const
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...
typedef PINOCCHIO_ALIGNED_STD_VECTOR(JointData) JointDataVector
JointDataTpl(const JointDataVariant &jdata_variant)
JointModelDerived & derived()
MotionTpl< Scalar, Options > Motion_t
SE3Tpl< Scalar, Options > Transformation_t
Transformation_t M_accessor() const
boost::mpl::false_ is_mimicable_t
std::string shortname() const
TangentVector_t TangentVectorTypeConstRef
int nvExtended_impl() const
Transformation_t TansformTypeRef
SizeDepType< NV >::template SegmentReturn< D >::ConstType JointMappedConfigSelector_impl(const Eigen::MatrixBase< D > &a) const
Main pinocchio namespace.
void calc(JointDataDerived &data, const Eigen::MatrixBase< ConfigVector > &q) const
pinocchio
Author(s):
autogenerated on Sat Apr 19 2025 02:41:34