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 
10 
11 namespace pinocchio
12 {
13 
22  template<
23  typename Scalar,
24  int Options,
25  template<typename, int> class JointCollectionTpl,
26  typename Matrix6xReturnType>
28  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
29  const DataTpl<Scalar, Options, JointCollectionTpl> & data,
30  const JointIndex joint_id,
31  const ReferenceFrame rf,
32  const SE3Tpl<Scalar, Options> & placement,
33  const Eigen::MatrixBase<Matrix6xReturnType> & kinematic_regressor);
34 
51  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
55  const JointIndex joint_id,
56  const ReferenceFrame rf,
58  {
60  ReturnType res(ReturnType::Zero(6, (model.njoints - 1) * 6));
61 
63 
64  return res;
65  }
66 
74  template<
75  typename Scalar,
76  int Options,
77  template<typename, int> class JointCollectionTpl,
78  typename Matrix6xReturnType>
80  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
81  const DataTpl<Scalar, Options, JointCollectionTpl> & data,
82  const JointIndex joint_id,
83  const ReferenceFrame rf,
84  const Eigen::MatrixBase<Matrix6xReturnType> & kinematic_regressor);
85 
101  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
105  const JointIndex joint_id,
106  const ReferenceFrame rf)
107  {
108  typedef typename DataTpl<Scalar, Options, JointCollectionTpl>::Matrix6x ReturnType;
109  ReturnType res(ReturnType::Zero(6, (model.njoints - 1) * 6));
110 
112 
113  return res;
114  }
115 
123  template<
124  typename Scalar,
125  int Options,
126  template<typename, int> class JointCollectionTpl,
127  typename Matrix6xReturnType>
129  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
130  DataTpl<Scalar, Options, JointCollectionTpl> & data,
131  const FrameIndex frame_id,
132  const ReferenceFrame rf,
133  const Eigen::MatrixBase<Matrix6xReturnType> & kinematic_regressor);
134 
150  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
154  const FrameIndex frame_id,
155  const ReferenceFrame rf)
156  {
157  typedef typename DataTpl<Scalar, Options, JointCollectionTpl>::Matrix6x ReturnType;
158  ReturnType res(ReturnType::Zero(6, (model.njoints - 1) * 6));
159 
161 
162  return res;
163  }
164 
184  template<
185  typename Scalar,
186  int Options,
187  template<typename, int> class JointCollectionTpl,
188  typename ConfigVectorType>
190  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
191  DataTpl<Scalar, Options, JointCollectionTpl> & data,
192  const Eigen::MatrixBase<ConfigVectorType> & q);
193 
204  template<typename MotionVelocity, typename MotionAcceleration, typename OutputType>
205  inline void bodyRegressor(
206  const MotionDense<MotionVelocity> & v,
207  const MotionDense<MotionAcceleration> & a,
208  const Eigen::MatrixBase<OutputType> & regressor);
209 
221  template<typename MotionVelocity, typename MotionAcceleration>
222  inline Eigen::Matrix<
223  typename MotionVelocity::Scalar,
224  6,
225  10,
227  bodyRegressor(const MotionDense<MotionVelocity> & v, const MotionDense<MotionAcceleration> & a);
228 
247  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
250  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
251  DataTpl<Scalar, Options, JointCollectionTpl> & data,
253 
272  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
275  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
276  DataTpl<Scalar, Options, JointCollectionTpl> & data,
278 
303  template<
304  typename Scalar,
305  int Options,
306  template<typename, int> class JointCollectionTpl,
307  typename ConfigVectorType,
308  typename TangentVectorType1,
309  typename TangentVectorType2>
312  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
313  DataTpl<Scalar, Options, JointCollectionTpl> & data,
314  const Eigen::MatrixBase<ConfigVectorType> & q,
315  const Eigen::MatrixBase<TangentVectorType1> & v,
316  const Eigen::MatrixBase<TangentVectorType2> & a);
317 
336  template<
337  typename Scalar,
338  int Options,
339  template<typename, int> class JointCollectionTpl,
340  typename ConfigVectorType,
341  typename TangentVectorType>
343  computeKineticEnergyRegressor(
344  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
345  DataTpl<Scalar, Options, JointCollectionTpl> & data,
346  const Eigen::MatrixBase<ConfigVectorType> & q,
347  const Eigen::MatrixBase<TangentVectorType> & v);
348 
365  template<
366  typename Scalar,
367  int Options,
368  template<typename, int> class JointCollectionTpl,
369  typename ConfigVectorType>
372  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
373  DataTpl<Scalar, Options, JointCollectionTpl> & data,
374  const Eigen::MatrixBase<ConfigVectorType> & q);
375 } // namespace pinocchio
376 
377 /* --- Details -------------------------------------------------------------------- */
378 #include "pinocchio/algorithm/regressor.hxx"
379 
380 #if PINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION
381  #include "pinocchio/algorithm/regressor.txx"
382 #endif // PINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION
383 
384 #endif // ifndef __pinocchio_algorithm_regressor_hpp__
pinocchio::DataTpl::MatrixXs
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options > MatrixXs
Definition: multibody/data.hpp:74
pinocchio::FrameIndex
Index FrameIndex
Definition: multibody/fwd.hpp:28
pinocchio::DataTpl
Definition: context/generic.hpp:25
pinocchio::Options
Options
Definition: joint-configuration.hpp:1082
pinocchio::ReferenceFrame
ReferenceFrame
Various conventions to express the velocity of a moving frame.
Definition: multibody/fwd.hpp:46
pinocchio::SE3Tpl< Scalar, Options >
model.hpp
pinocchio::computeJointTorqueRegressor
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...
setup.data
data
Definition: cmake/cython/setup.in.py:48
pinocchio::python::Scalar
context::Scalar Scalar
Definition: admm-solver.cpp:29
pinocchio::res
ReturnType res
Definition: spatial/classic-acceleration.hpp:57
pinocchio::frameBodyRegressor
DataTpl< Scalar, Options, JointCollectionTpl >::BodyRegressorType & frameBodyRegressor(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, FrameIndex frame_id)
Computes the regressor for the dynamic parameters of a rigid body attached to a given frame,...
pinocchio::placement
const MotionDense< Motion2 > const SE3Tpl< SE3Scalar, SE3Options > & placement
Definition: spatial/classic-acceleration.hpp:122
pinocchio::DataTpl::Matrix3x
Eigen::Matrix< Scalar, 3, Eigen::Dynamic, Options > Matrix3x
The 3d jacobian type (temporary)
Definition: multibody/data.hpp:94
pinocchio::computePotentialEnergyRegressor
const DataTpl< Scalar, Options, JointCollectionTpl >::RowVectorXs & computePotentialEnergyRegressor(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
data.hpp
pinocchio::context::Vector3
Eigen::Matrix< Scalar, 3, 1, Options > Vector3
Definition: context/generic.hpp:53
pinocchio::jointBodyRegressor
DataTpl< Scalar, Options, JointCollectionTpl >::BodyRegressorType & jointBodyRegressor(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, JointIndex joint_id)
Computes the regressor for the dynamic parameters of a rigid body attached to a given joint,...
pinocchio::computeJointKinematicRegressor
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)
pinocchio::q
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
Definition: joint-configuration.hpp:1083
a
Vec3f a
contact-cholesky.frame_id
frame_id
Definition: contact-cholesky.py:19
pinocchio::v
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
Definition: joint-configuration.hpp:1084
pinocchio::computeFrameKinematicRegressor
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)
pinocchio::DataTpl::BodyRegressorType
Eigen::Matrix< Scalar, 6, 10, Options > BodyRegressorType
The type of the body regressor.
Definition: multibody/data.hpp:102
pinocchio::bodyRegressor
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::computeStaticRegressor
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 ...
pinocchio::JointIndex
Index JointIndex
Definition: multibody/fwd.hpp:26
pinocchio::DataTpl::Matrix6x
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > Matrix6x
The 6d jacobian type (temporary)
Definition: multibody/data.hpp:92
pinocchio::PINOCCHIO_EIGEN_PLAIN_TYPE
PINOCCHIO_EIGEN_PLAIN_TYPE(ConfigVectorType) integrate(const ModelTpl< Scalar
Integrate a configuration vector for the specified model for a tangent vector during one unit time.
pinocchio::DataTpl::RowVectorXs
Eigen::Matrix< Scalar, 1, Eigen::Dynamic, Options|Eigen::RowMajor > RowVectorXs
Definition: multibody/data.hpp:76
append-urdf-model-with-another-model.joint_id
joint_id
Definition: append-urdf-model-with-another-model.py:34
pinocchio::ModelTpl
Definition: context/generic.hpp:20
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:1082
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Mon Dec 16 2024 03:41:04