13 #include <boost/fusion/container/vector.hpp>
15 #include "pinocchio/macros.hpp"
16 #include "pinocchio/eigen-common.hpp"
18 #include "pinocchio/math.hpp"
20 #include "pinocchio/spatial.hpp"
22 #include "pinocchio/multibody.hpp"
23 #include "pinocchio/multibody/joint.hpp"
25 #include "pinocchio/algorithm/check.hpp"
26 #include "pinocchio/algorithm/kinematics.hpp"
43 template<
typename,
int>
class JointCollectionTpl,
44 typename Matrix6xReturnType>
46 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
47 const DataTpl<Scalar, Options, JointCollectionTpl> & data,
48 const JointIndex joint_id,
49 const ReferenceFrame rf,
50 const SE3Tpl<Scalar, Options> & placement,
51 const Eigen::MatrixBase<Matrix6xReturnType> & kinematic_regressor);
69 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
71 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
72 const DataTpl<Scalar, Options, JointCollectionTpl> & data,
73 const JointIndex joint_id,
74 const ReferenceFrame rf,
75 const SE3Tpl<Scalar, Options> & placement)
77 typedef typename DataTpl<Scalar, Options, JointCollectionTpl>::Matrix6x ReturnType;
78 ReturnType res(ReturnType::Zero(6, (model.njoints - 1) * 6));
95 template<
typename,
int>
class JointCollectionTpl,
96 typename Matrix6xReturnType>
98 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
99 const DataTpl<Scalar, Options, JointCollectionTpl> & data,
100 const JointIndex joint_id,
101 const ReferenceFrame rf,
102 const Eigen::MatrixBase<Matrix6xReturnType> & kinematic_regressor);
119 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
121 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
122 const DataTpl<Scalar, Options, JointCollectionTpl> & data,
123 const JointIndex joint_id,
124 const ReferenceFrame rf)
126 typedef typename DataTpl<Scalar, Options, JointCollectionTpl>::Matrix6x ReturnType;
127 ReturnType res(ReturnType::Zero(6, (model.njoints - 1) * 6));
144 template<
typename,
int>
class JointCollectionTpl,
145 typename Matrix6xReturnType>
147 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
148 DataTpl<Scalar, Options, JointCollectionTpl> & data,
149 const FrameIndex frame_id,
150 const ReferenceFrame rf,
151 const Eigen::MatrixBase<Matrix6xReturnType> & kinematic_regressor);
168 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
170 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
171 DataTpl<Scalar, Options, JointCollectionTpl> & data,
172 const FrameIndex frame_id,
173 const ReferenceFrame rf)
175 typedef typename DataTpl<Scalar, Options, JointCollectionTpl>::Matrix6x ReturnType;
176 ReturnType res(ReturnType::Zero(6, (model.njoints - 1) * 6));
205 template<
typename,
int>
class JointCollectionTpl,
206 typename ConfigVectorType>
208 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
209 DataTpl<Scalar, Options, JointCollectionTpl> & data,
210 const Eigen::MatrixBase<ConfigVectorType> & q);
222 template<
typename MotionVelocity,
typename MotionAcceleration,
typename OutputType>
224 const MotionDense<MotionVelocity> & v,
225 const MotionDense<MotionAcceleration> & a,
226 const Eigen::MatrixBase<OutputType> & regressor);
239 template<
typename MotionVelocity,
typename MotionAcceleration>
240 inline Eigen::Matrix<
241 typename MotionVelocity::Scalar,
244 PINOCCHIO_EIGEN_PLAIN_TYPE(
typename MotionVelocity::Vector3)::Options>
245 bodyRegressor(const MotionDense<MotionVelocity> & v, const MotionDense<MotionAcceleration> & a);
265 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
266 inline typename DataTpl<Scalar, Options, JointCollectionTpl>::BodyRegressorType &
268 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
269 DataTpl<Scalar, Options, JointCollectionTpl> & data,
270 JointIndex joint_id);
290 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
291 inline typename DataTpl<Scalar, Options, JointCollectionTpl>::BodyRegressorType &
293 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
294 DataTpl<Scalar, Options, JointCollectionTpl> & data,
295 FrameIndex frame_id);
324 template<
typename,
int>
class JointCollectionTpl,
325 typename ConfigVectorType,
326 typename TangentVectorType1,
327 typename TangentVectorType2>
328 inline typename DataTpl<Scalar, Options, JointCollectionTpl>::MatrixXs &
330 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
331 DataTpl<Scalar, Options, JointCollectionTpl> & data,
332 const Eigen::MatrixBase<ConfigVectorType> & q,
333 const Eigen::MatrixBase<TangentVectorType1> & v,
334 const Eigen::MatrixBase<TangentVectorType2> & a);
357 template<
typename,
int>
class JointCollectionTpl,
358 typename ConfigVectorType,
359 typename TangentVectorType>
360 const typename DataTpl<Scalar, Options, JointCollectionTpl>::RowVectorXs &
361 computeKineticEnergyRegressor(
362 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
363 DataTpl<Scalar, Options, JointCollectionTpl> & data,
364 const Eigen::MatrixBase<ConfigVectorType> & q,
365 const Eigen::MatrixBase<TangentVectorType> & v);
386 template<
typename,
int>
class JointCollectionTpl,
387 typename ConfigVectorType>
388 const typename DataTpl<Scalar, Options, JointCollectionTpl>::RowVectorXs &
390 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
391 DataTpl<Scalar, Options, JointCollectionTpl> & data,
392 const Eigen::MatrixBase<ConfigVectorType> & q);
396 #include "pinocchio/src/algorithm/regressor.hxx"
Main pinocchio namespace.
void bodyRegressor(const MotionDense< MotionVelocity > &v, const MotionDense< MotionAcceleration > &a, const Eigen::MatrixBase< OutputType > ®ressor)
Computes the regressor for the dynamic parameters of a single rigid body.
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 ...
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)
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)
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...
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,...
const DataTpl< Scalar, Options, JointCollectionTpl >::RowVectorXs & computePotentialEnergyRegressor(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
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,...