pinocchio  2.4.4
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
regressor.hpp
1 //
2 // Copyright (c) 2018 CNRS
3 //
4 
5 #ifndef __pinocchio_regressor_hpp__
6 #define __pinocchio_regressor_hpp__
7 
8 #include "pinocchio/multibody/model.hpp"
9 #include "pinocchio/multibody/data.hpp"
10 
11 namespace pinocchio
12 {
13 
32  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType>
34  computeStaticRegressor(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
35  DataTpl<Scalar,Options,JointCollectionTpl> & data,
36  const Eigen::MatrixBase<ConfigVectorType> & q);
37 
38  namespace regressor
39  {
40 
56  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType>
57  inline PINOCCHIO_DEPRECATED typename DataTpl<Scalar,Options,JointCollectionTpl>::Matrix3x &
60  const Eigen::MatrixBase<ConfigVectorType> & q)
61  {
62  return ::pinocchio::computeStaticRegressor(model,data,q);
63  }
64  }
65 
76  template<typename MotionVelocity, typename MotionAcceleration, typename OutputType>
77  inline void
78  bodyRegressor(const MotionDense<MotionVelocity> & v, const MotionDense<MotionAcceleration> & a, const Eigen::MatrixBase<OutputType> & regressor);
79 
91  template<typename MotionVelocity, typename MotionAcceleration>
92  inline Eigen::Matrix<typename MotionVelocity::Scalar,6,10,PINOCCHIO_EIGEN_PLAIN_TYPE(typename MotionVelocity::Vector3)::Options>
94 
111  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
115  JointIndex jointId);
116 
133  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
137  FrameIndex frameId);
138 
162  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType1, typename TangentVectorType2>
163  inline typename DataTpl<Scalar,Options,JointCollectionTpl>::MatrixXs &
166  const Eigen::MatrixBase<ConfigVectorType> & q,
167  const Eigen::MatrixBase<TangentVectorType1> & v,
168  const Eigen::MatrixBase<TangentVectorType2> & a);
169 
170 } // namespace pinocchio
171 
172 /* --- Details -------------------------------------------------------------------- */
173 #include "pinocchio/algorithm/regressor.hxx"
174 
175 #endif // ifndef __pinocchio_regressor_hpp__
DataTpl< Scalar, Options, JointCollectionTpl >::BodyRegressorType & jointBodyRegressor(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, JointIndex jointId)
Computes the regressor for the dynamic parameters of a rigid body attached to a given joint...
DataTpl< Scalar, Options, JointCollectionTpl >::BodyRegressorType & frameBodyRegressor(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, FrameIndex frameId)
Computes the regressor for the dynamic parameters of a rigid body attached to a given frame...
void bodyRegressor(const MotionDense< MotionVelocity > &v, const MotionDense< MotionAcceleration > &a, const Eigen::MatrixBase< OutputType > &regressor)
Computes the regressor for the dynamic parameters of a single rigid body.
Eigen::Matrix< Scalar, 3, Eigen::Dynamic, Options > Matrix3x
The 3d jacobian type (temporary)
Definition: data.hpp:73
DataTpl< Scalar, Options, JointCollectionTpl >::MatrixXs & computeJointTorqueRegressor(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType1 > &v, const Eigen::MatrixBase< TangentVectorType2 > &a)
Computes the joint torque regressor that links the joint torque to the dynamic parameters of each lin...
Main pinocchio namespace.
Definition: treeview.dox:24
DataTpl< Scalar, Options, JointCollectionTpl >::Matrix3x & computeStaticRegressor(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
Computes the static regressor that links the center of mass positions of all the links to the center ...
Definition: regressor.hpp:58
Eigen::Matrix< Scalar, 6, 10, Options > BodyRegressorType
The type of the body regressor.
Definition: data.hpp:80