regressor.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2018-2020 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_algorithm_regressor_hpp__
6 #define __pinocchio_algorithm_regressor_hpp__
7 
8 #include "pinocchio/multibody/model.hpp"
9 #include "pinocchio/multibody/data.hpp"
10 
11 namespace pinocchio
12 {
13 
19  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename Matrix6xReturnType>
20  void computeJointKinematicRegressor(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
21  const DataTpl<Scalar,Options,JointCollectionTpl> & data,
22  const JointIndex joint_id,
23  const ReferenceFrame rf,
24  const SE3Tpl<Scalar,Options> & placement,
25  const Eigen::MatrixBase<Matrix6xReturnType> & kinematic_regressor);
26 
27 
40  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
44  const JointIndex joint_id,
45  const ReferenceFrame rf,
47  {
48  typedef typename DataTpl<Scalar,Options,JointCollectionTpl>::Matrix6x ReturnType;
49  ReturnType res(ReturnType::Zero(6,(model.njoints-1)*6));
50 
51  computeJointKinematicRegressor(model,data,joint_id,rf,placement,res);
52 
53  return res;
54  }
55 
61  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename Matrix6xReturnType>
64  const JointIndex joint_id,
65  const ReferenceFrame rf,
66  const Eigen::MatrixBase<Matrix6xReturnType> & kinematic_regressor);
67 
79  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
83  const JointIndex joint_id,
84  const ReferenceFrame rf)
85  {
86  typedef typename DataTpl<Scalar,Options,JointCollectionTpl>::Matrix6x ReturnType;
87  ReturnType res(ReturnType::Zero(6,(model.njoints-1)*6));
88 
89  computeJointKinematicRegressor(model,data,joint_id,rf,res);
90 
91  return res;
92  }
93 
99  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename Matrix6xReturnType>
102  const FrameIndex frame_id,
103  const ReferenceFrame rf,
104  const Eigen::MatrixBase<Matrix6xReturnType> & kinematic_regressor);
105 
117  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
121  const FrameIndex frame_id,
122  const ReferenceFrame rf)
123  {
124  typedef typename DataTpl<Scalar,Options,JointCollectionTpl>::Matrix6x ReturnType;
125  ReturnType res(ReturnType::Zero(6,(model.njoints-1)*6));
126 
127  computeFrameKinematicRegressor(model,data,frame_id,rf,res);
128 
129  return res;
130  }
131 
150  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType>
154  const Eigen::MatrixBase<ConfigVectorType> & q);
155 
156  namespace regressor
157  {
158 
174  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType>
175  PINOCCHIO_DEPRECATED typename DataTpl<Scalar,Options,JointCollectionTpl>::Matrix3x &
178  const Eigen::MatrixBase<ConfigVectorType> & q)
179  {
181  }
182  }
183 
194  template<typename MotionVelocity, typename MotionAcceleration, typename OutputType>
195  inline void
198  const Eigen::MatrixBase<OutputType> & regressor);
199 
211  template<typename MotionVelocity, typename MotionAcceleration>
212  inline Eigen::Matrix<typename MotionVelocity::Scalar,6,10,PINOCCHIO_EIGEN_PLAIN_TYPE(typename MotionVelocity::Vector3)::Options>
215 
232  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
236  JointIndex jointId);
237 
254  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
258  FrameIndex frameId);
259 
283  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType1, typename TangentVectorType2>
287  const Eigen::MatrixBase<ConfigVectorType> & q,
288  const Eigen::MatrixBase<TangentVectorType1> & v,
289  const Eigen::MatrixBase<TangentVectorType2> & a);
290 
291 } // namespace pinocchio
292 
293 /* --- Details -------------------------------------------------------------------- */
294 #include "pinocchio/algorithm/regressor.hxx"
295 
296 #endif // ifndef __pinocchio_algorithm_regressor_hpp__
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
int njoints
Number of joints.
ReferenceFrame
List of Reference Frames supported by Pinocchio.
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...
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
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.
PINOCCHIO_DEPRECATED 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:176
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options > MatrixXs
Vec3f a
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: timings.cpp:28
res
Eigen::Matrix< Scalar, 3, Eigen::Dynamic, Options > Matrix3x
The 3d jacobian type (temporary)
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:176
void computeJointKinematicRegressor(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const JointIndex joint_id, const ReferenceFrame rf, const SE3Tpl< Scalar, Options > &placement, const Eigen::MatrixBase< Matrix6xReturnType > &kinematic_regressor)
Computes the kinematic regressor that links the joint placements variations of the whole kinematic tr...
void computeFrameKinematicRegressor(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const FrameIndex frame_id, const ReferenceFrame rf, const Eigen::MatrixBase< Matrix6xReturnType > &kinematic_regressor)
Computes the kinematic regressor that links the joint placement variations of the whole kinematic tre...
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > Matrix6x
The 6d jacobian type (temporary)
JointCollectionTpl & model
Eigen::Matrix< Scalar, 6, 10, Options > BodyRegressorType
The type of the body regressor.


pinocchio
Author(s):
autogenerated on Fri Jun 23 2023 02:38:32