pinocchio  2.1.3
rnea-derivatives.hpp
1 //
2 // Copyright (c) 2017-2018 CNRS, INRIA
3 //
4 
5 #ifndef __pinocchio_rnea_derivatives_hpp__
6 #define __pinocchio_rnea_derivatives_hpp__
7 
8 #include "pinocchio/multibody/model.hpp"
9 #include "pinocchio/multibody/data.hpp"
10 
11 #include "pinocchio/container/aligned-vector.hpp"
12 
13 namespace pinocchio
14 {
15 
33  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename ReturnMatrixType>
34  inline void
35  computeGeneralizedGravityDerivatives(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
36  DataTpl<Scalar,Options,JointCollectionTpl> & data,
37  const Eigen::MatrixBase<ConfigVectorType> & q,
38  const Eigen::MatrixBase<ReturnMatrixType> & gravity_partial_dq);
39 
66  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType1, typename TangentVectorType2,
67  typename MatrixType1, typename MatrixType2, typename MatrixType3>
68  inline void
69  computeRNEADerivatives(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
70  DataTpl<Scalar,Options,JointCollectionTpl> & data,
71  const Eigen::MatrixBase<ConfigVectorType> & q,
72  const Eigen::MatrixBase<TangentVectorType1> & v,
73  const Eigen::MatrixBase<TangentVectorType2> & a,
74  const Eigen::MatrixBase<MatrixType1> & rnea_partial_dq,
75  const Eigen::MatrixBase<MatrixType2> & rnea_partial_dv,
76  const Eigen::MatrixBase<MatrixType3> & rnea_partial_da);
77 
105  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType1, typename TangentVectorType2,
106  typename MatrixType1, typename MatrixType2, typename MatrixType3>
107  inline void
108  computeRNEADerivatives(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
109  DataTpl<Scalar,Options,JointCollectionTpl> & data,
110  const Eigen::MatrixBase<ConfigVectorType> & q,
111  const Eigen::MatrixBase<TangentVectorType1> & v,
112  const Eigen::MatrixBase<TangentVectorType2> & a,
113  const container::aligned_vector< ForceTpl<Scalar,Options> > fext,
114  const Eigen::MatrixBase<MatrixType1> & rnea_partial_dq,
115  const Eigen::MatrixBase<MatrixType2> & rnea_partial_dv,
116  const Eigen::MatrixBase<MatrixType3> & rnea_partial_da);
117 
139  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType1, typename TangentVectorType2>
140  inline void
143  const Eigen::MatrixBase<ConfigVectorType> & q,
144  const Eigen::MatrixBase<TangentVectorType1> & v,
145  const Eigen::MatrixBase<TangentVectorType2> & a)
146  {
147  computeRNEADerivatives(model,data,q.derived(),v.derived(),a.derived(),
148  data.dtau_dq, data.dtau_dv, data.M);
149  }
150 
173  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType1, typename TangentVectorType2>
174  inline void
177  const Eigen::MatrixBase<ConfigVectorType> & q,
178  const Eigen::MatrixBase<TangentVectorType1> & v,
179  const Eigen::MatrixBase<TangentVectorType2> & a,
181  {
182  computeRNEADerivatives(model,data,q.derived(),v.derived(),a.derived(),fext,
183  data.dtau_dq, data.dtau_dv, data.M);
184  }
185 
186 
187 } // namespace pinocchio
188 
189 #include "pinocchio/algorithm/rnea-derivatives.hxx"
190 
191 #endif // ifndef __pinocchio_rnea_derivatives_hpp__
MatrixXs dtau_dq
Partial derivative of the joint torque vector with respect to the joint configuration.
Definition: data.hpp:268
MatrixXs M
The joint space inertia matrix (a square matrix of dim model.nv).
Definition: data.hpp:140
void computeRNEADerivatives(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, const Eigen::MatrixBase< MatrixType1 > &rnea_partial_dq, const Eigen::MatrixBase< MatrixType2 > &rnea_partial_dv, const Eigen::MatrixBase< MatrixType3 > &rnea_partial_da)
Computes the derivatives of the Recursive Newton Euler Algorithms with respect to the joint configura...
Specialization of an std::vector with an aligned allocator. This specialization might be used when th...
MatrixXs dtau_dv
Partial derivative of the joint torque vector with respect to the joint velocity. ...
Definition: data.hpp:271
void computeGeneralizedGravityDerivatives(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< ReturnMatrixType > &gravity_partial_dq)
Computes the derivative of the generalized gravity contribution with respect to the joint configurati...
Main pinocchio namespace.
Definition: treeview.dox:24