contact-dynamics.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016-2020 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_contact_dynamics_hpp__
6 #define __pinocchio_contact_dynamics_hpp__
7 
8 #include "pinocchio/multibody/model.hpp"
9 #include "pinocchio/multibody/data.hpp"
10 
11 namespace pinocchio
12 {
13 
29 
43  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType1, typename TangentVectorType2,
44  typename ConstraintMatrixType, typename DriftVectorType>
46  forwardDynamics(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
47  DataTpl<Scalar,Options,JointCollectionTpl> & data,
48  const Eigen::MatrixBase<ConfigVectorType> & q,
49  const Eigen::MatrixBase<TangentVectorType1> & v,
50  const Eigen::MatrixBase<TangentVectorType2> & tau,
51  const Eigen::MatrixBase<ConstraintMatrixType> & J,
52  const Eigen::MatrixBase<DriftVectorType> & gamma,
53  const Scalar inv_damping = 0.);
54 
70 
83  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename TangentVectorType,
84  typename ConstraintMatrixType, typename DriftVectorType>
86  forwardDynamics(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,
87  DataTpl<Scalar,Options,JointCollectionTpl> & data,
88  const Eigen::MatrixBase<TangentVectorType> & tau,
89  const Eigen::MatrixBase<ConstraintMatrixType> & J,
90  const Eigen::MatrixBase<DriftVectorType> & gamma,
91  const Scalar inv_damping = 0.);
92 
126  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType1, typename TangentVectorType2,
127  typename ConstraintMatrixType, typename DriftVectorType>
128  PINOCCHIO_DEPRECATED
132  const Eigen::MatrixBase<ConfigVectorType> & q,
133  const Eigen::MatrixBase<TangentVectorType1> & v,
134  const Eigen::MatrixBase<TangentVectorType2> & tau,
135  const Eigen::MatrixBase<ConstraintMatrixType> & J,
136  const Eigen::MatrixBase<DriftVectorType> & gamma,
137  const Scalar inv_damping,
138  const bool updateKinematics)
139  {
140  if(updateKinematics)
141  return forwardDynamics(model,data,q,v,tau,J,gamma,inv_damping);
142  else
143  return forwardDynamics(model,data,tau,J,gamma,inv_damping);
144  }
145 
157  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl,
158  typename ConfigVectorType, typename ConstraintMatrixType, typename KKTMatrixType>
161  const Eigen::MatrixBase<ConfigVectorType> & q,
162  const Eigen::MatrixBase<ConstraintMatrixType> & J,
163  const Eigen::MatrixBase<KKTMatrixType> & KKTMatrix_inv,
164  const Scalar & inv_damping = 0.);
165 
181  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl,
182  typename ConstraintMatrixType, typename KKTMatrixType>
185  const Eigen::MatrixBase<ConstraintMatrixType> & J,
186  const Eigen::MatrixBase<KKTMatrixType> & KKTMatrix_inv);
187 
211  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType, typename ConstraintMatrixType>
215  const Eigen::MatrixBase<ConfigVectorType> & q,
216  const Eigen::MatrixBase<TangentVectorType> & v_before,
217  const Eigen::MatrixBase<ConstraintMatrixType> & J,
218  const Scalar r_coeff = 0.,
219  const Scalar inv_damping = 0.);
220 
243  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType, typename ConstraintMatrixType>
247  const Eigen::MatrixBase<TangentVectorType> & v_before,
248  const Eigen::MatrixBase<ConstraintMatrixType> & J,
249  const Scalar r_coeff = 0.,
250  const Scalar inv_damping = 0.);
251 
279  template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType, typename ConstraintMatrixType>
280  PINOCCHIO_DEPRECATED
284  const Eigen::MatrixBase<ConfigVectorType> & q,
285  const Eigen::MatrixBase<TangentVectorType> & v_before,
286  const Eigen::MatrixBase<ConstraintMatrixType> & J,
287  const Scalar r_coeff,
288  const bool updateKinematics)
289  {
290  if(updateKinematics)
291  return impulseDynamics(model,data,q,v_before,J,r_coeff,Scalar(0));
292  else
293  return impulseDynamics(model,data,v_before,J,r_coeff,Scalar(0));
294  }
295 
296 } // namespace pinocchio
297 
298 #include "pinocchio/algorithm/contact-dynamics.hxx"
299 
300 #endif // ifndef __pinocchio_contact_dynamics_hpp__
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
void getKKTContactDynamicMatrixInverse(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConstraintMatrixType > &J, const Eigen::MatrixBase< KKTMatrixType > &KKTMatrix_inv)
Computes the inverse of the KKT matrix for dynamics with contact constraints. It computes the followi...
const DataTpl< Scalar, Options, JointCollectionTpl >::TangentVectorType & impulseDynamics(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v_before, const Eigen::MatrixBase< ConstraintMatrixType > &J, const Scalar r_coeff=0., const Scalar inv_damping=0.)
Compute the impulse dynamics with contact constraints. Internally, pinocchio::crba is called...
void computeKKTContactDynamicMatrixInverse(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< ConstraintMatrixType > &J, const Eigen::MatrixBase< KKTMatrixType > &KKTMatrix_inv, const Scalar &inv_damping=0.)
Computes the inverse of the KKT matrix for dynamics with contact constraints. It computes the followi...
data
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
SE3::Scalar Scalar
Definition: conversions.cpp:13
Main pinocchio namespace.
Definition: timings.cpp:30
const DataTpl< Scalar, Options, JointCollectionTpl >::TangentVectorType & forwardDynamics(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 > &tau, const Eigen::MatrixBase< ConstraintMatrixType > &J, const Eigen::MatrixBase< DriftVectorType > &gamma, const Scalar inv_damping=0.)
Compute the forward dynamics with contact constraints. Internally, pinocchio::computeAllTerms is call...
JointCollectionTpl & model
VectorXs TangentVectorType
Dense vectorized version of a joint tangent vector (e.g. velocity, acceleration, etc). It also handles the notion of co-tangent vector (e.g. torque, etc).


pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:02