Go to the documentation of this file.
5 #ifndef __pinocchio_joint_generic_hpp__
6 #define __pinocchio_joint_generic_hpp__
10 #include "pinocchio/multibody/joint/joint-basic-visitors.hxx"
13 #include <boost/mpl/contains.hpp>
18 template<
typename Scalar,
int Options = 0,
template<
typename S,
int O>
class JointCollectionTpl = JointCollectionDefaultTpl>
22 template<
typename _Scalar,
int _Options,
template<
typename S,
int O>
class JointCollectionTpl>
42 typedef Eigen::Matrix<Scalar,6,Eigen::Dynamic,Options>
U_t;
43 typedef Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic,Options>
D_t;
44 typedef Eigen::Matrix<Scalar,6,Eigen::Dynamic,Options>
UD_t;
65 template<
typename Scalar,
int Options,
template<
typename S,
int O>
class JointCollectionTpl>
69 template<
typename Scalar,
int Options,
template<
typename S,
int O>
class JointCollectionTpl>
73 template<
typename _Scalar,
int _Options,
template<
typename S,
int O>
class JointCollectionTpl>
75 :
public JointDataBase< JointDataTpl<_Scalar,_Options,JointCollectionTpl> >
78 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
88 using Base::operator==;
89 using Base::operator!=;
96 Motion_t
v()
const {
return motion(*
this); }
97 Bias_t
c()
const {
return bias(*
this); }
112 template<
typename Jo
intDataDerived>
116 BOOST_MPL_ASSERT((boost::mpl::contains<typename JointDataVariant::types,JointDataDerived>));
131 template<
typename Jo
intDataDerived>
149 return !(*
this == other);
154 template<
typename NewScalar,
typename Scalar,
int Options,
template<
typename S,
int O>
class JointCollectionTpl>
160 template<
typename _Scalar,
int _Options,
template<
typename S,
int O>
class JointCollectionTpl>
162 :
JointModelBase< JointModelTpl<_Scalar,_Options,JointCollectionTpl> >
165 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
178 using Base::operator==;
179 using Base::operator!=;
198 template<
typename Jo
intModelDerived>
202 BOOST_MPL_ASSERT((boost::mpl::contains<typename JointModelVariant::types,JointModelDerived>));
212 { return ::pinocchio::createData<Scalar,Options,JointCollectionTpl>(*
this); }
214 template<
typename Jo
intModelDerived>
220 template<
typename Jo
intModelDerived>
238 return !(*
this == other);
241 template<
typename ConfigVector>
243 const Eigen::MatrixBase<ConfigVector> &
q)
const
246 template<
typename ConfigVector,
typename TangentVector>
248 const Eigen::MatrixBase<ConfigVector> &
q,
249 const Eigen::MatrixBase<TangentVector> &
v)
const
252 template<
typename Matrix6Like>
253 void calc_aba(JointDataDerived &
data,
const Eigen::MatrixBase<Matrix6Like> & I,
const bool update_I)
const
273 template<
typename NewScalar>
276 return cast_joint<NewScalar,Scalar,Options,JointCollectionTpl>(*
this);
284 template<
typename Scalar,
int Options,
template<
typename S,
int O>
class JointCollectionTpl,
typename JointDataDerived>
288 return joint_data_generic == joint_data.
derived();
292 template<
typename Scalar,
int Options,
template<
typename S,
int O>
class JointCollectionTpl,
typename JointDataDerived>
296 return joint_data_generic != joint_data.
derived();
299 template<
typename Scalar,
int Options,
template<
typename S,
int O>
class JointCollectionTpl,
typename JointModelDerived>
303 return joint_model_generic == joint_model.
derived();
306 template<
typename Scalar,
int Options,
template<
typename S,
int O>
class JointCollectionTpl,
typename JointModelDerived>
310 return joint_model_generic != joint_model.
derived();
315 #endif // ifndef __pinocchio_joint_generic_hpp__
bool operator!=(const JointModelTpl &other) const
JointModelTpl< NewScalar, Options, JointCollectionTpl > cast() const
JointDataBase< JointDataTpl > Base
const std::vector< bool > hasConfigurationLimitInTangent() 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...
Eigen::Matrix< Scalar, Eigen::Dynamic, 1, Options > TangentVector_t
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 full model tangent space corre...
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.
JointDataVariant & toVariant()
JointModelTpl(const JointModelBase< JointModelDerived > &jmodel)
const std::vector< bool > hasConfigurationLimit() const
JointModelTpl(const JointModelVariant &jmodel_variant)
JointModelVariant & toVariant()
bool isEqual(const JointModelBase< JointModelDerived > &other) const
bool isEqual(const JointDataBase< JointDataDerived > &other) const
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...
ConstraintTpl< Eigen::Dynamic, Scalar, Options > Constraint_t
JointCollection::JointDataVariant JointDataVariant
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.
Transformation_t TansformTypeConstRef
JointTpl< Scalar, Options, JointCollectionTpl > JointDerived
void setIndexes(JointIndex id, int nq, int nv)
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
SE3Tpl< Scalar, Options > Transformation_t
bool operator==(const JointDataTpl &other) const
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.
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > UD_t
bool operator==(const JointDataBase< JointDataDerived > &joint_data, const JointDataTpl< Scalar, Options, JointCollectionTpl > &joint_data_generic)
static std::string classname()
JointCollectionDefault::JointModelVariant JointModelVariant
bool isEqual(const JointDataBase &other) const
 
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...
JointDataTpl< double > JointData
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
JointCollectionTpl< Scalar, Options > JointCollection
UD_t UDinv_accessor() const
D_t Dinv_accessor() const
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...
bool isEqual(const JointModelTpl &other) const
Bias_t c_accessor() const
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef JointTpl< _Scalar, _Options, JointCollectionTpl > JointDerived
ConstraintTpl< Eigen::Dynamic, Scalar, Options > constraint_xd(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataVariant through JointConstraintVisitor to get the joint constraint as a dense constr...
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...
JointModelTpl< double > JointModel
bool operator==(const JointModelTpl &other) const
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options > D_t
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
Constraint_t ConstraintTypeRef
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
PINOCCHIO_JOINT_TYPEDEF_TEMPLATE(JointDerived)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef JointTpl< _Scalar, _Options, JointCollectionTpl > JointDerived
bool operator!=(const JointDataBase< JointDataDerived > &joint_data, const JointDataTpl< Scalar, Options, JointCollectionTpl > &joint_data_generic)
Eigen::Matrix< Scalar, Eigen::Dynamic, 1, Options > ConfigVector_t
Constraint_t ConstraintTypeConstRef
bool hasSameIndexes(const JointModelBase< JointModelDerived > &other) const
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.
const JointDataVariant & toVariant() const
MotionTpl< Scalar, Options > Bias_t
MotionTpl< Scalar, Options > Motion_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::Matrix< Scalar, 6, Eigen::Dynamic, Options > U_t
JointCollection::JointModelVariant JointModelVariant
JointDataTpl(const JointDataBase< JointDataDerived > &jdata)
JointDataTpl< Scalar, Options, JointCollectionTpl > JointDataDerived
JointCollectionTpl< _Scalar, _Options > JointCollection
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)
JointModelTpl< Scalar, Options, JointCollectionTpl > JointModelDerived
SE3Tpl< Scalar, Options > joint_transform(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointTransformVisitor to get the joint internal transform (transform bet...
MotionTpl< Scalar, Options > bias(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointBiasVisitor to get the joint bias as a dense motion.
Type of the cast of a class C templated by Scalar and Options, to a new NewScalar type....
std::string shortname() const
PINOCCHIO_JOINT_DATA_TYPEDEF_TEMPLATE(JointDerived)
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...
virtual bool isEqual(const CollisionGeometry &other) const=0
Transformation_t M() const
JointCollectionTpl< Scalar, Options > JointCollection
typedef PINOCCHIO_ALIGNED_STD_VECTOR(JointData) JointDataVector
JointModelTpl< NewScalar, Options, JointCollectionTpl > type
JointDataTpl(const JointDataVariant &jdata_variant)
void calc_aba(JointDataDerived &data, const Eigen::MatrixBase< Matrix6Like > &I, const bool update_I) const
JointModelDerived & derived()
Transformation_t M_accessor() const
JointTpl< Scalar, Options, JointCollectionTpl > JointDerived
std::string shortname() const
Transformation_t TansformTypeRef
Main pinocchio namespace.
void calc(JointDataDerived &data, const Eigen::MatrixBase< ConfigVector > &q) const
pinocchio
Author(s):
autogenerated on Tue Feb 13 2024 03:43:58