5#ifndef __pinocchio_context_generic_hpp__ 6#define __pinocchio_context_generic_hpp__ 9#include "pinocchio/container/aligned-vector.hpp" 14 template<
typename _Scalar,
int _Options>
18 int _Options = PINOCCHIO_OPTIONS_DEFAULT,
23 int _Options = PINOCCHIO_OPTIONS_DEFAULT,
26 template<
typename _Scalar,
int _Options = PINOCCHIO_OPTIONS_DEFAULT>
28 template<
typename _Scalar,
int _Options = PINOCCHIO_OPTIONS_DEFAULT>
30 template<
typename _Scalar,
int _Options = PINOCCHIO_OPTIONS_DEFAULT>
32 template<
typename _Scalar,
int _Options = PINOCCHIO_OPTIONS_DEFAULT>
34 template<
typename _Scalar,
int _Options>
36 template<
typename _Scalar,
int _Options>
39 template<
typename _Scalar>
41 template<
typename _Scalar>
44#define PINOCCHIO_COMMON_TYPEDEF(Scalar, Options) \ 45 typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1, Options> VectorXs; \ 46 typedef Eigen::Matrix<Scalar, 6, Eigen::Dynamic, Options> Matrix6xs; \ 47 typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Options> MatrixXs; \ 48 typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor | Options> \ 50 typedef Eigen::Matrix<Scalar, 3, Eigen::Dynamic, Options> Matrix3x; \ 51 typedef Eigen::Matrix<Scalar, 3, 1, Options> Vector3; \ 52 typedef Eigen::Matrix<Scalar, 6, 10, Options> BodyRegressorType; \ 54 typedef ModelTpl<Scalar, Options> Model; \ 55 typedef DataTpl<Scalar, Options> Data; \ 57 typedef CoulombFrictionConeTpl<Scalar> CoulombFrictionCone; \ 58 typedef DualCoulombFrictionConeTpl<Scalar> DualCoulombFrictionCone; \ 60 typedef RigidConstraintModelTpl<Scalar, Options> RigidConstraintModel; \ 61 typedef RigidConstraintDataTpl<Scalar, Options> RigidConstraintData; \ 63 typedef PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(CoulombFrictionCone) \ 64 CoulombFrictionConeVector; \ 65 typedef PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(DualCoulombFrictionCone) \ 66 DualCoulombFrictionConeVector; \ 67 typedef PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel) \ 68 RigidConstraintModelVector; \ 69 typedef PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintData) \ 70 RigidConstraintDataVector; \ 72 typedef SE3Tpl<Scalar, Options> SE3; \ 73 typedef MotionTpl<Scalar, Options> Motion; \ 74 typedef ForceTpl<Scalar, Options> Force; \ 75 typedef InertiaTpl<Scalar, Options> Inertia; 79 typedef PINOCCHIO_SCALAR_TYPE Scalar;
82 Options = PINOCCHIO_OPTIONS_DEFAULT
85 PINOCCHIO_COMMON_TYPEDEF(Scalar, Options)
90 template<
typename Derived>
91 Eigen::Ref<typename Derived::PlainObject> make_ref(
const Eigen::MatrixBase<Derived> & x)
93 return Eigen::Ref<typename Derived::PlainObject>(x.const_cast_derived());
98 auto make_const_ref(Eigen::MatrixBase<M>
const & m) -> Eigen::Ref<typename M::PlainObject const>
Main pinocchio namespace.