Go to the documentation of this file.
6 #ifndef __pinocchio_joint_prismatic_hpp__
7 #define __pinocchio_joint_prismatic_hpp__
21 template<
typename Scalar,
int Options,
int axis>
27 template<
typename Scalar,
int Options,
int axis,
typename MotionDerived>
33 template<
typename _Scalar,
int _Options,
int _axis>
38 typedef Eigen::Matrix<Scalar,3,1,Options>
Vector3;
39 typedef Eigen::Matrix<Scalar,6,1,Options>
Vector6;
40 typedef Eigen::Matrix<Scalar,4,4,Options>
Matrix4;
41 typedef Eigen::Matrix<Scalar,6,6,Options>
Matrix6;
58 template<
typename _Scalar,
int _Options,
int _axis>
59 struct MotionPrismaticTpl
60 : MotionBase < MotionPrismaticTpl<_Scalar,_Options,_axis> >
62 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
75 template<
typename OtherScalar>
81 template<
typename Derived>
85 other.
linear()[_axis] += (OtherScalar)
m_v;
88 template<
typename MotionDerived>
91 for(Eigen::DenseIndex k = 0; k < 3; ++k)
96 template<
typename S2,
int O2,
typename D2>
99 v.angular().setZero();
100 v.linear().noalias() =
m_v * (
m.rotation().col(
axis));
103 template<
typename S2,
int O2>
111 template<
typename S2,
int O2,
typename D2>
115 v.linear().noalias() =
m_v * (
m.rotation().transpose().col(
axis));
118 v.angular().setZero();
121 template<
typename S2,
int O2>
129 template<
typename M1,
typename M2>
139 template<
typename M1>
152 return m_v == other.m_v;
160 template<
typename Scalar,
int Options,
int axis,
typename MotionDerived>
161 typename MotionDerived::MotionPlain
165 typename MotionDerived::MotionPlain
res(m2);
170 template<
typename MotionDerived,
typename S2,
int O2,
int axis>
172 typename MotionDerived::MotionPlain
175 return m2.motionAction(m1);
180 template<
typename _Scalar,
int _Options,
int _axis>
191 typedef Eigen::Matrix<Scalar,3,1,Options>
Vector3;
192 typedef Eigen::Matrix<Scalar,3,3,Options>
Matrix3;
203 template<
typename Scalar,
int Options,
int axis>
207 template<
typename _Scalar,
int _Options,
int axis>
210 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
223 PlainType
res(PlainType::Identity());
224 res.rotation().setIdentity();
230 operator PlainType()
const {
return plain(); }
232 template<
typename S2,
int O2>
247 AngularType
rotation()
const {
return AngularType(3,3); }
261 template<
typename _Scalar,
int _Options,
int axis>
277 template<
typename Scalar,
int Options,
int axis>
281 template<
typename Scalar,
int Options,
int axis,
typename MotionDerived>
285 template<
typename Scalar,
int Options,
int axis,
typename ForceDerived>
289 template<
typename Scalar,
int Options,
int axis,
typename ForceSet>
291 {
typedef typename Eigen::MatrixBase<ForceSet>::ConstRowXpr
ReturnType; };
293 template<
typename _Scalar,
int _Options,
int axis>
295 :
ConstraintBase < ConstraintPrismaticTpl <_Scalar,_Options,axis> >
297 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
305 template<
typename Vector1Like>
306 JointMotion
__mult__(
const Eigen::MatrixBase<Vector1Like> &
v)
const
308 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Vector1Like,1);
309 assert(
v.size() == 1);
310 return JointMotion(
v[0]);
313 template<
typename S2,
int O2>
319 v.linear() =
m.rotation().col(
axis);
320 v.angular().setZero();
324 template<
typename S2,
int O2>
330 v.linear() =
m.rotation().transpose().col(
axis);
331 v.angular().setZero();
342 template<
typename ForceDerived>
345 {
return f.
linear().template segment<1>(
axis); }
348 template<
typename Derived>
353 return F.row(LINEAR+
axis);
373 template<
typename MotionDerived>
387 template<
typename S1,
int O1,
typename S2,
int O2,
int axis>
396 template<
typename S1,
int O1,
typename S2,
int O2>
412 res <<
m, S1(0), S1(0), S1(0),
m*z, -
m*
y;
418 template<
typename S1,
int O1,
typename S2,
int O2>
435 res << S1(0),
m, S1(0), -
m*z, S1(0),
m*
x;
441 template<
typename S1,
int O1,
typename S2,
int O2>
458 res << S1(0), S1(0),
m,
m*
y, -
m*
x, S1(0);
465 template<
typename M6Like,
typename S2,
int O2,
int axis>
474 template<
typename M6Like,
typename Scalar,
int Options,
int axis>
482 EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(M6Like,6,6);
483 return Y.derived().col(Inertia::LINEAR +
axis);
488 template<
typename _Scalar,
int _Options,
int _axis>
500 template<
typename _Scalar,
int _Options,
int axis>
517 typedef Eigen::Matrix<Scalar,6,NV,Options>
U_t;
518 typedef Eigen::Matrix<Scalar,NV,NV,Options>
D_t;
519 typedef Eigen::Matrix<Scalar,6,NV,Options>
UD_t;
527 template<
typename Scalar,
int Options,
int axis>
531 template<
typename Scalar,
int Options,
int axis>
535 template<
typename _Scalar,
int _Options,
int axis>
538 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
558 ,
UDinv(UD_t::Zero())
563 return std::string(
"JointDataP") + axisLabel<axis>();
569 template<
typename NewScalar,
typename Scalar,
int Options,
int axis>
575 template<
typename _Scalar,
int _Options,
int axis>
577 :
public JointModelBase< JointModelPrismaticTpl<_Scalar,_Options,axis> >
579 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
589 JointDataDerived
createData()
const {
return JointDataDerived(); }
601 template<
typename ConfigVector>
603 const typename Eigen::MatrixBase<ConfigVector> &
qs)
const
607 data.M.displacement() =
q;
610 template<
typename ConfigVector,
typename TangentVector>
612 const typename Eigen::MatrixBase<ConfigVector> &
qs,
613 const typename Eigen::MatrixBase<TangentVector> & vs)
const
618 const S2 &
v = vs[
idx_v()];
619 data.v.linearRate() =
v;
622 template<
typename Matrix6Like>
623 void calc_aba(JointDataDerived &
data,
const Eigen::MatrixBase<Matrix6Like> & I,
const bool update_I)
const
625 data.U = I.col(Inertia::LINEAR +
axis);
635 return std::string(
"JointModelP") + axisLabel<axis>();
640 template<
typename NewScalar>
665 #include <boost/type_traits.hpp>
669 template<
typename Scalar,
int Options,
int axis>
671 :
public integral_constant<bool,true> {};
673 template<
typename Scalar,
int Options,
int axis>
675 :
public integral_constant<bool,true> {};
677 template<
typename Scalar,
int Options,
int axis>
679 :
public integral_constant<bool,true> {};
681 template<
typename Scalar,
int Options,
int axis>
683 :
public integral_constant<bool,true> {};
686 #endif // ifndef __pinocchio_joint_prismatic_hpp__
MotionTpl< Scalar, Options > ReturnType
std::string shortname() const
#define PINOCCHIO_JOINT_DATA_BASE_ACCESSOR_DEFAULT_RETURN_TYPE
void se3ActionInverse_impl(const SE3Tpl< S2, O2 > &m, MotionDense< D2 > &v) const
ConstLinearType linear() const
Return the linear part of the force vector.
JointDataPrismaticTpl< double, 0, 0 > JointDataPX
Forward declaration of the multiplication operation return type. Should be overloaded,...
Eigen::Matrix< Scalar, 6, 1, Options > ReturnType
const typedef Vector3 ConstLinearType
Eigen::Matrix< Scalar, 1, 1, Options > JointForce
bool isEqual_impl(const MotionPrismaticTpl &other) const
PINOCCHIO_JOINT_DATA_TYPEDEF_TEMPLATE(JointDerived)
void calc_aba(JointDataDerived &data, const Eigen::MatrixBase< Matrix6Like > &I, const bool update_I) const
Eigen::Matrix< Scalar, 6, 6, Options > Matrix6
TransposeConst(const ConstraintPrismaticTpl &ref)
TransposeConst transpose() 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...
PINOCCHIO_JOINT_DATA_BASE_ACCESSOR_DEFAULT_RETURN_TYPE typedef Eigen::Matrix< Scalar, NQ, 1, Options > ConfigVector_t
SpatialAxis< LINEAR+axis > Axis
MotionTpl< Scalar, Options > ReturnType
Eigen::Matrix< Scalar, 6, 1, Options > DenseBase
MotionTpl< Scalar, Options > MotionPlain
Return type of the Constraint::Transpose * Force operation.
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...
Axis::CartesianAxis3 CartesianAxis3
ForceDense< ForceDerived >::ConstLinearType::template ConstFixedSegmentReturnType< 1 >::Type ReturnType
#define PINOCCHIO_EIGEN_CONST_CAST(TYPE, OBJ)
Macro for an automatic const_cast.
JointDataPrismaticTpl< Scalar, Options, axis > JointDataDerived
ConstraintPrismaticTpl< Scalar, Options, axis > Constraint
PINOCCHIO_EIGEN_REF_CONST_TYPE(Matrix6Like) operator*(const Eigen
void addTo(MotionDense< Derived > &other) const
void calc(JointDataDerived &data, const typename Eigen::MatrixBase< ConfigVector > &qs) const
static ReturnType run(const Inertia &Y, const Constraint &)
MotionPlain motionAction(const MotionDense< M1 > &v) const
Eigen::Matrix< Scalar, 6, 1, Options > Vector6
Eigen::Matrix< Scalar, NV, NV, Options > D_t
const Scalar & linearRate() const
ConstraintPrismaticTpl< S2, O2, 0 > Constraint
InertiaTpl< S1, O1 > Inertia
ReturnTypeNotDefined ReturnType
void setIndexes(JointIndex id, int q, int v)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef JointPrismaticTpl< _Scalar, _Options, axis > JointDerived
const std::vector< bool > hasConfigurationLimit() const
ConstraintForceSetOp< ConstraintPrismaticTpl, Derived >::ReturnType operator*(const Eigen::MatrixBase< Derived > &F)
static std::string classname()
SpatialAxis< _axis+LINEAR > Axis
M6Like::ConstColXpr ReturnType
Return type of the ation of a Motion onto an object of type D.
MotionPrismaticTpl __mult__(const OtherScalar &alpha) const
Eigen::Matrix< Scalar, 3, 1, Options > Vector3
ConstLinearType linear() const
const typedef Vector3 ConstAngularType
JointPrismaticTpl< double, 0, 1 > JointPY
#define PINOCCHIO_JOINT_DATA_BASE_DEFAULT_ACCESSOR
Eigen::Matrix< S2, 6, 1, O2 > ReturnType
const typedef DenseBase ConstMatrixReturnType
JointPrismaticTpl< Scalar, Options, axis > JointDerived
PINOCCHIO_JOINT_DATA_BASE_DEFAULT_ACCESSOR Constraint_t S
MotionPrismaticTpl< Scalar, Options, axis > Motion_t
ReturnTypeNotDefined ReturnType
JointModelPrismaticTpl< double, 0, 1 > JointModelPY
std::string shortname() const
SE3GroupAction< ConstraintPrismaticTpl >::ReturnType se3Action(const SE3Tpl< S2, O2 > &m) const
InertiaTpl< S1, O1 > Inertia
DenseBase MatrixReturnType
MultiplicationOp< Inertia, Constraint >::ReturnType ReturnType
ConstraintPrismaticTpl< S2, O2, 2 > Constraint
static ReturnType run(const Inertia &Y, const Constraint &)
void setTo(MotionDense< MotionDerived > &other) const
MultiplicationOp< Eigen::MatrixBase< M6Like >, Constraint >::ReturnType ReturnType
JointMotion __mult__(const Eigen::MatrixBase< Vector1Like > &v) const
JointDataPrismaticTpl< double, 0, 1 > JointDataPY
JointModelPrismaticTpl< NewScalar, Options, axis > cast() const
Eigen::Matrix< Scalar, 6, NV, Options > U_t
MotionDerived::MotionPlain operator+(const MotionPlanarTpl< Scalar, Options > &m1, const MotionDense< MotionDerived > &m2)
TransformPrismaticTpl< Scalar, Options, axis > Transformation_t
static ReturnType run(const Inertia &Y, const Constraint &)
const std::vector< bool > hasConfigurationLimitInTangent() const
JointPrismaticTpl< Scalar, Options, axis > JointDerived
InertiaTpl< S1, O1 > Inertia
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
JointModelBase< JointModelPrismaticTpl > Base
MotionPlain PlainReturnType
void calc(JointDataDerived &data, const typename Eigen::MatrixBase< ConfigVector > &qs, const typename Eigen::MatrixBase< TangentVector > &vs) const
Eigen::Matrix< Scalar, 4, 4, Options > Matrix4
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
bool isEqual(const ConstraintPrismaticTpl &) const
MotionPrismaticTpl< Scalar, Options, axis > JointMotion
Return type of the Constraint::Transpose * ForceSet operation.
MotionZeroTpl< Scalar, Options > Bias_t
MotionPrismaticTpl(const Scalar &v)
MotionPlain se3ActionInverse_impl(const SE3Tpl< S2, O2 > &m) const
Eigen::Matrix< Scalar, 6, 1, Options > ReturnType
Base class for rigid transformation.
SE3GroupAction< ConstraintPrismaticTpl >::ReturnType se3ActionInverse(const SE3Tpl< S2, O2 > &m) const
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef JointPrismaticTpl< _Scalar, _Options, axis > JointDerived
JointDataDerived createData() const
MultiplicationOp< Inertia, Constraint >::ReturnType ReturnType
PINOCCHIO_JOINT_TYPEDEF_TEMPLATE(JointDerived)
PlainReturnType plain() const
MultiplicationOp< Inertia, Constraint >::ReturnType ReturnType
static std::string classname()
JointPrismaticTpl< double, 0, 0 > JointPX
#define PINOCCHIO_CONSTRAINT_TYPEDEF_TPL(DERIVED)
ConstraintPrismaticTpl< S2, O2, 1 > Constraint
const ConstraintPrismaticTpl & ref
JointDataPrismaticTpl< double, 0, 2 > JointDataPZ
void motionAction(const MotionDense< M1 > &v, MotionDense< M2 > &mout) const
Eigen::MatrixBase< ForceSet >::ConstRowXpr ReturnType
JointPrismaticTpl< double, 0, 2 > JointPZ
Matrix4 HomogeneousMatrixType
Common traits structure to fully define base classes for CRTP.
DenseBase matrix_impl() const
static ReturnType run(const Eigen::MatrixBase< M6Like > &Y, const Constraint &)
#define PINOCCHIO_EIGEN_REF_TYPE(D)
JointModelPrismaticTpl< double, 0, 0 > JointModelPX
Type of the cast of a class C templated by Scalar and Options, to a new NewScalar type....
Eigen::Matrix< Scalar, 6, NV, Options > UD_t
EIGEN_MAKE_ALIGNED_OPERATOR_NEW MOTION_TYPEDEF_TPL(MotionPrismaticTpl)
ConstraintPrismaticTpl< Scalar, Options, axis > Constraint_t
JointModelPrismaticTpl< Scalar, Options, axis > JointModelDerived
MotionDerived::MotionPlain operator^(const MotionDense< MotionDerived > &m1, const MotionPlanarTpl< S2, O2 > &m2)
Eigen::Matrix< Scalar, NV, 1, Options > TangentVector_t
void se3Action_impl(const SE3Tpl< S2, O2 > &m, MotionDense< D2 > &v) const
JointModelPrismaticTpl< NewScalar, Options, axis > type
ConstraintForceOp< ConstraintPrismaticTpl, ForceDerived >::ReturnType operator*(const ForceDense< ForceDerived > &f) const
MotionAlgebraAction< ConstraintPrismaticTpl, MotionDerived >::ReturnType motionAction(const MotionDense< MotionDerived > &m) const
ConstAngularType angular() const
JointModelPrismaticTpl< double, 0, 2 > JointModelPZ
static void alphaCross(const Scalar &s, const Eigen::MatrixBase< V3_in > &vin, const Eigen::MatrixBase< V3_out > &vout)
Main pinocchio namespace.
MotionPlain se3Action_impl(const SE3Tpl< S2, O2 > &m) const
pinocchio
Author(s):
autogenerated on Tue Feb 13 2024 03:43:59