pinocchio  3.5.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
contact-dynamics.hpp
1 //
2 // Copyright (c) 2016-2020 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_algorithm_contact_dynamics_hpp__
6 #define __pinocchio_algorithm_contact_dynamics_hpp__
7 
8 #include "pinocchio/multibody/model.hpp"
9 #include "pinocchio/multibody/data.hpp"
10 
11 namespace pinocchio
12 {
13 
38 
55  template<
56  typename Scalar,
57  int Options,
58  template<typename, int> class JointCollectionTpl,
59  typename ConfigVectorType,
60  typename TangentVectorType1,
61  typename TangentVectorType2,
62  typename ConstraintMatrixType,
63  typename DriftVectorType>
64  PINOCCHIO_DEPRECATED inline const typename DataTpl<Scalar, Options, JointCollectionTpl>::
65  TangentVectorType &
69  const Eigen::MatrixBase<ConfigVectorType> & q,
70  const Eigen::MatrixBase<TangentVectorType1> & v,
71  const Eigen::MatrixBase<TangentVectorType2> & tau,
72  const Eigen::MatrixBase<ConstraintMatrixType> & J,
73  const Eigen::MatrixBase<DriftVectorType> & gamma,
74  const Scalar inv_damping = 0.);
75 
83 
101 
117  template<
118  typename Scalar,
119  int Options,
120  template<typename, int> class JointCollectionTpl,
121  typename TangentVectorType,
122  typename ConstraintMatrixType,
123  typename DriftVectorType>
124  PINOCCHIO_DEPRECATED inline const typename DataTpl<Scalar, Options, JointCollectionTpl>::
125  TangentVectorType &
129  const Eigen::MatrixBase<TangentVectorType> & tau,
130  const Eigen::MatrixBase<ConstraintMatrixType> & J,
131  const Eigen::MatrixBase<DriftVectorType> & gamma,
132  const Scalar inv_damping = 0.);
133 
149  template<
150  typename Scalar,
151  int Options,
152  template<typename, int> class JointCollectionTpl,
153  typename ConfigVectorType,
154  typename ConstraintMatrixType,
155  typename KKTMatrixType>
159  const Eigen::MatrixBase<ConfigVectorType> & q,
160  const Eigen::MatrixBase<ConstraintMatrixType> & J,
161  const Eigen::MatrixBase<KKTMatrixType> & KKTMatrix_inv,
162  const Scalar & inv_damping = 0.);
163 
186  template<
187  typename Scalar,
188  int Options,
189  template<typename, int> class JointCollectionTpl,
190  typename ConstraintMatrixType,
191  typename KKTMatrixType>
192  PINOCCHIO_DEPRECATED void getKKTContactDynamicMatrixInverse(
195  const Eigen::MatrixBase<ConstraintMatrixType> & J,
196  const Eigen::MatrixBase<KKTMatrixType> & KKTMatrix_inv);
197 
232  template<
233  typename Scalar,
234  int Options,
235  template<typename, int> class JointCollectionTpl,
236  typename ConfigVectorType,
237  typename TangentVectorType,
238  typename ConstraintMatrixType>
239  PINOCCHIO_DEPRECATED inline const typename DataTpl<Scalar, Options, JointCollectionTpl>::
240  TangentVectorType &
244  const Eigen::MatrixBase<ConfigVectorType> & q,
245  const Eigen::MatrixBase<TangentVectorType> & v_before,
246  const Eigen::MatrixBase<ConstraintMatrixType> & J,
247  const Scalar r_coeff = 0.,
248  const Scalar inv_damping = 0.);
249 
283  template<
284  typename Scalar,
285  int Options,
286  template<typename, int> class JointCollectionTpl,
287  typename ConfigVectorType,
288  typename TangentVectorType,
289  typename ConstraintMatrixType>
290  PINOCCHIO_DEPRECATED inline const typename DataTpl<Scalar, Options, JointCollectionTpl>::
291  TangentVectorType &
295  const Eigen::MatrixBase<TangentVectorType> & v_before,
296  const Eigen::MatrixBase<ConstraintMatrixType> & J,
297  const Scalar r_coeff = 0.,
298  const Scalar inv_damping = 0.);
299 
300 } // namespace pinocchio
301 
302 #include "pinocchio/algorithm/contact-dynamics.hxx"
303 
304 #if PINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION
305  #include "pinocchio/algorithm/contact-dynamics.txx"
306 #endif // PINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION
307 
308 #endif // ifndef __pinocchio_algorithm_contact_dynamics_hpp__
Main pinocchio namespace.
Definition: treeview.dox:11
PINOCCHIO_DEPRECATED 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...
PINOCCHIO_DEPRECATED 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...
PINOCCHIO_DEPRECATED 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.