5 #ifndef __pinocchio_spatial_axis_hpp__ 6 #define __pinocchio_spatial_axis_hpp__ 8 #include "pinocchio/spatial/fwd.hpp" 9 #include "pinocchio/spatial/cartesian-axis.hpp" 10 #include "pinocchio/spatial/motion.hpp" 11 #include "pinocchio/spatial/force.hpp" 17 template<
int axis,
typename MotionDerived>
19 {
typedef typename MotionDerived::MotionPlain
ReturnType; };
27 enum { LINEAR = 0, ANGULAR = 3 };
29 template<
typename Derived1,
typename Derived2>
33 template<
typename Derived>
41 template<
typename Derived1,
typename Derived2>
45 template<
typename Derived>
53 template<
typename Scalar>
58 for(Eigen::DenseIndex
i = 0;
i <
dim; ++
i)
64 template<
typename Scalar>
71 template<
typename Derived>
72 friend Derived & operator<<(MotionDense<Derived> &
min,
81 template<
typename MotionDerived>
82 typename MotionDerived::MotionPlain
85 typename MotionDerived::MotionPlain
res;
86 if((LINEAR == 0 &&
axis<3) || (LINEAR == 3 &&
axis >= 3))
88 res.angular().setZero();
103 template<
typename Derived1,
typename Derived2>
109 if((LINEAR == 0 &&
axis<3) || (LINEAR == 3 &&
axis >= 3))
111 mout_.angular().setZero();
122 template<
typename Derived1,
typename Derived2>
128 if((LINEAR == 0 &&
axis<3) || (LINEAR == 3 &&
axis >= 3))
130 fout_.linear().setZero();
149 #endif // __pinocchio_spatial_axis_hpp__ JointCollectionTpl const DataTpl< Scalar, Options, JointCollectionTpl > const Eigen::MatrixBase< Mat > & min
Return type of the ation of a Motion onto an object of type D.
friend MotionTpl< Scalar > operator*(const Scalar &s, const SpatialAxis &)
ConstLinearType linear() const
static traits< Derived >::ForcePlain cross(const ForceDense< Derived > &fin)
ConstAngularType angular() const
Return the angular part of the force vector.
#define PINOCCHIO_EIGEN_CONST_CAST(TYPE, OBJ)
Macro for an automatic const_cast.
ConstAngularType angular() const
void cross(const Eigen::MatrixBase< Vector3 > &v, const Eigen::MatrixBase< Matrix3xIn > &Min, const Eigen::MatrixBase< Matrix3xOut > &Mout)
Applies the cross product onto the columns of M.
static void cross(const MotionDense< Derived1 > &min, const MotionDense< Derived2 > &mout)
CartesianAxis< _axis%3 > CartesianAxis3
static traits< Derived >::MotionPlain cross(const MotionDense< Derived > &min)
MotionDerived::MotionPlain ReturnType
ConstLinearType linear() const
Return the linear part of the force vector.
MotionTpl< Scalar > operator*(const Scalar &s) const
Main pinocchio namespace.
Common traits structure to fully define base classes for CRTP.
MotionDerived::MotionPlain motionAction(const MotionDense< MotionDerived > &m) const