pinocchio  2.3.1-dirty
centroidal.hpp
1 //
2 // Copyright (c) 2015-2019 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_algorithm_centroidal_hpp__
6 #define __pinocchio_algorithm_centroidal_hpp__
7 
8 #include "pinocchio/multibody/model.hpp"
9 #include "pinocchio/multibody/data.hpp"
10 #include "pinocchio/algorithm/check.hpp"
11 
12 namespace pinocchio
13 {
14 
28  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
29  inline const typename DataTpl<Scalar,Options,JointCollectionTpl>::Force &
30  computeCentroidalMomentum(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
31  DataTpl<Scalar,Options,JointCollectionTpl> & data);
32 
50  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl,
51  typename ConfigVectorType, typename TangentVectorType>
52  inline const typename DataTpl<Scalar,Options,JointCollectionTpl>::Force &
55  const Eigen::MatrixBase<ConfigVectorType> & q,
56  const Eigen::MatrixBase<TangentVectorType> & v)
57  {
58  forwardKinematics(model,data,q.derived(),v.derived());
59  return computeCentroidalMomentum(model,data);
60  }
61 
68  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl,
69  typename ConfigVectorType, typename TangentVectorType>
70  PINOCCHIO_DEPRECATED
74  const Eigen::MatrixBase<ConfigVectorType> & q,
75  const Eigen::MatrixBase<TangentVectorType> & v)
76  {
77  return computeCentroidalMomentum(model,data,q,v);
78  }
79 
93  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
97 
117  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl,
118  typename ConfigVectorType, typename TangentVectorType1, typename TangentVectorType2>
122  const Eigen::MatrixBase<ConfigVectorType> & q,
123  const Eigen::MatrixBase<TangentVectorType1> & v,
124  const Eigen::MatrixBase<TangentVectorType2> & a)
125  {
126  forwardKinematics(model,data,q,v,a);
127  return computeCentroidalMomentumTimeVariation(model,data);
128  }
129 
136  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl,
137  typename ConfigVectorType, typename TangentVectorType1, typename TangentVectorType2>
138  PINOCCHIO_DEPRECATED
142  const Eigen::MatrixBase<ConfigVectorType> & q,
143  const Eigen::MatrixBase<TangentVectorType1> & v,
144  const Eigen::MatrixBase<TangentVectorType2> & a)
145  {
146  return computeCentroidalMomentumTimeVariation(model,data,q,v,a);
147  }
148 
166  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType>
170  const Eigen::MatrixBase<ConfigVectorType> & q,
171  const Eigen::MatrixBase<TangentVectorType> & v);
172 
187  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType>
191  const Eigen::MatrixBase<ConfigVectorType> & q);
192 
211  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType>
215  const Eigen::MatrixBase<ConfigVectorType> & q,
216  const Eigen::MatrixBase<TangentVectorType> & v);
217 
234  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType>
238  const Eigen::MatrixBase<ConfigVectorType> & q,
239  const Eigen::MatrixBase<TangentVectorType> & v);
240 
241 } // namespace pinocchio
242 
243 /* --- Details -------------------------------------------------------------------- */
244 #include "pinocchio/algorithm/centroidal.hxx"
245 
246 #endif // ifndef __pinocchio_algorithm_centroidal_hpp__
const DataTpl< Scalar, Options, JointCollectionTpl >::Matrix6x & computeCentroidalMapTimeVariation(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v)
Computes the Centroidal Momentum Matrix time derivative.
const DataTpl< Scalar, Options, JointCollectionTpl >::Matrix6x & computeCentroidalMap(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
Computes the Centroidal Momentum Matrix,.
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > Matrix6x
The 6d jacobian type (temporary)
const DataTpl< Scalar, Options, JointCollectionTpl >::Force & computeCentroidalMomentumTimeVariation(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data)
Computes the Centroidal momemtum and its time derivatives, a.k.a. the total momenta of the system and...
PINOCCHIO_DEPRECATED const DataTpl< Scalar, Options, JointCollectionTpl >::Force & computeCentroidalDynamics(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v)
This function has been renamed into computeCentroidalMomentum. This signature will be removed in a fu...
Definition: centroidal.hpp:72
const DataTpl< Scalar, Options, JointCollectionTpl >::Force & computeCentroidalMomentum(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data)
Computes the Centroidal momentum, a.k.a. the total momenta of the system expressed around the center ...
void forwardKinematics(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q)
Update the joint placements according to the current joint configuration.
const DataTpl< Scalar, Options, JointCollectionTpl >::Matrix6x & dccrba(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v)
Computes the time derivative of the Centroidal Momentum Matrix according to the current configuration...
const DataTpl< Scalar, Options, JointCollectionTpl >::Matrix6x & ccrba(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v)
Computes the Centroidal Momentum Matrix, the Composite Ridig Body Inertia as well as the centroidal m...
Main pinocchio namespace.
Definition: treeview.dox:24