5#ifndef __pinocchio_algorithm_constrained_dynamics_derivatives_hpp__
6#define __pinocchio_algorithm_constrained_dynamics_derivatives_hpp__
8#include "pinocchio/algorithm/contact-info.hpp"
9#include "pinocchio/algorithm/proximal.hpp"
17 template<
typename,
int>
class JointCollectionTpl,
18 class ConstraintModelAllocator,
19 class ConstraintDataAllocator,
26 PINOCCHIO_UNSUPPORTED_MESSAGE(
"The API will change towards more flexibility")
27 inline
void computeConstraintDynamicsDerivatives(
28 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
29 DataTpl<Scalar, Options, JointCollectionTpl> & data,
30 const std::vector<RigidConstraintModelTpl<Scalar, Options>, ConstraintModelAllocator> &
32 std::vector<RigidConstraintDataTpl<Scalar, Options>, ConstraintDataAllocator> & contact_data,
33 const ProximalSettingsTpl<Scalar> & settings,
34 const Eigen::MatrixBase<MatrixType1> & ddq_partial_dq,
35 const Eigen::MatrixBase<MatrixType2> & ddq_partial_dv,
36 const Eigen::MatrixBase<MatrixType3> & ddq_partial_dtau,
37 const Eigen::MatrixBase<MatrixType4> & lambda_partial_dq,
38 const Eigen::MatrixBase<MatrixType5> & lambda_partial_dv,
39 const Eigen::MatrixBase<MatrixType6> & lambda_partial_dtau);
44 template<typename,
int> class JointCollectionTpl,
45 class ConstraintModelAllocator,
46 class ConstraintDataAllocator,
53 PINOCCHIO_UNSUPPORTED_MESSAGE("The API will change towards more flexibility")
54 inline
void computeConstraintDynamicsDerivatives(
55 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
56 DataTpl<Scalar, Options, JointCollectionTpl> & data,
57 const std::vector<RigidConstraintModelTpl<Scalar, Options>, ConstraintModelAllocator> &
59 std::vector<RigidConstraintDataTpl<Scalar, Options>, ConstraintDataAllocator> & contact_data,
60 const Eigen::MatrixBase<MatrixType1> & ddq_partial_dq,
61 const Eigen::MatrixBase<MatrixType2> & ddq_partial_dv,
62 const Eigen::MatrixBase<MatrixType3> & ddq_partial_dtau,
63 const Eigen::MatrixBase<MatrixType4> & lambda_partial_dq,
64 const Eigen::MatrixBase<MatrixType5> & lambda_partial_dv,
65 const Eigen::MatrixBase<MatrixType6> & lambda_partial_dtau)
67 ProximalSettingsTpl<Scalar> settings;
68 computeConstraintDynamicsDerivatives(
69 model, data, contact_models, contact_data, settings, ddq_partial_dq.const_cast_derived(),
70 ddq_partial_dv.const_cast_derived(), ddq_partial_dtau.const_cast_derived(),
71 lambda_partial_dq.const_cast_derived(), lambda_partial_dv.const_cast_derived(),
72 lambda_partial_dtau.const_cast_derived());
78 template<
typename,
int>
class JointCollectionTpl,
79 class ConstraintModelAllocator,
80 class ConstraintDataAllocator>
81 PINOCCHIO_UNSUPPORTED_MESSAGE(
"The API will change towards more flexibility")
82 inline
void computeConstraintDynamicsDerivatives(
83 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
84 DataTpl<Scalar, Options, JointCollectionTpl> & data,
85 const std::vector<RigidConstraintModelTpl<Scalar, Options>, ConstraintModelAllocator> &
87 std::vector<RigidConstraintDataTpl<Scalar, Options>, ConstraintDataAllocator> & contact_data,
88 const ProximalSettingsTpl<Scalar> & settings)
90 computeConstraintDynamicsDerivatives(
91 model, data, contact_models, contact_data, settings, data.ddq_dq, data.ddq_dv, data.ddq_dtau,
92 data.dlambda_dq, data.dlambda_dv, data.dlambda_dtau);
98 template<
typename,
int>
class JointCollectionTpl,
99 class ConstraintModelAllocator,
100 class ConstraintDataAllocator>
101 PINOCCHIO_UNSUPPORTED_MESSAGE(
"The API will change towards more flexibility")
102 inline
void computeConstraintDynamicsDerivatives(
103 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
104 DataTpl<Scalar, Options, JointCollectionTpl> & data,
105 const std::vector<RigidConstraintModelTpl<Scalar, Options>, ConstraintModelAllocator> &
107 std::vector<RigidConstraintDataTpl<Scalar, Options>, ConstraintDataAllocator> & contact_data)
109 ProximalSettingsTpl<Scalar> settings;
110 computeConstraintDynamicsDerivatives(model, data, contact_models, contact_data, settings);
115#include "pinocchio/algorithm/constrained-dynamics-derivatives.hxx"
117#if PINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION
118 #include "pinocchio/algorithm/constrained-dynamics-derivatives.txx"
Main pinocchio namespace.