14 #include <boost/fusion/container/vector.hpp>
16 #include "pinocchio/config.hpp"
17 #include "pinocchio/context.hpp"
18 #include "pinocchio/unsupported.hpp"
19 #include "pinocchio/macros.hpp"
21 #include "pinocchio/utils/check.hpp"
23 #include "pinocchio/math.hpp"
25 #include "pinocchio/spatial.hpp"
27 #include "pinocchio/multibody.hpp"
28 #include "pinocchio/multibody/joint.hpp"
30 #include "pinocchio/algorithm/fwd.hpp"
31 #include "pinocchio/algorithm/proximal.hpp"
32 #include "pinocchio/algorithm/check-model.hpp"
33 #include "pinocchio/constraints.hpp"
34 #include "pinocchio/algorithm/crba.hpp"
35 #include "pinocchio/algorithm/cholesky.hpp"
36 #include "pinocchio/algorithm/constraint-cholesky.hpp"
60 template<
typename,
int>
class JointCollectionTpl,
61 class ConstraintModel,
62 class ConstraintModelAllocator,
64 class ConstraintDataAllocator>
66 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
67 DataTpl<Scalar, Options, JointCollectionTpl> & data,
68 const std::vector<ConstraintModel, ConstraintModelAllocator> & contact_models,
69 const std::vector<ConstraintData, ConstraintDataAllocator> & contact_datas);
114 template<
typename,
int>
class JointCollectionTpl,
115 typename ConfigVectorType,
116 typename TangentVectorType1,
117 typename TangentVectorType2,
118 class ConstraintModelAllocator,
119 class ConstraintDataAllocator>
120 PINOCCHIO_UNSUPPORTED_MESSAGE(
"The API will change towards more flexibility")
123 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
124 DataTpl<Scalar, Options, JointCollectionTpl> & data,
125 const Eigen::MatrixBase<ConfigVectorType> & q,
126 const Eigen::MatrixBase<TangentVectorType1> & v,
127 const Eigen::MatrixBase<TangentVectorType2> & tau,
128 const std::vector<RigidConstraintModelTpl<Scalar, Options>, ConstraintModelAllocator> &
130 std::vector<RigidConstraintDataTpl<Scalar, Options>, ConstraintDataAllocator> & contact_datas,
131 ProximalSettingsTpl<Scalar> & settings);
173 template<typename,
int> class JointCollectionTpl,
174 typename ConfigVectorType,
175 typename TangentVectorType1,
176 typename TangentVectorType2,
177 class ConstraintModelAllocator,
178 class ConstraintDataAllocator>
179 PINOCCHIO_UNSUPPORTED_MESSAGE("The API will change towards more flexibility")
182 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
183 DataTpl<Scalar, Options, JointCollectionTpl> & data,
184 const Eigen::MatrixBase<ConfigVectorType> & q,
185 const Eigen::MatrixBase<TangentVectorType1> & v,
186 const Eigen::MatrixBase<TangentVectorType2> & tau,
187 const std::vector<RigidConstraintModelTpl<Scalar, Options>, ConstraintModelAllocator> &
189 std::vector<RigidConstraintDataTpl<Scalar, Options>, ConstraintDataAllocator> & contact_datas)
191 ProximalSettingsTpl<Scalar> settings;
192 return constraintDynamics(model, data, q, v, tau, contact_models, contact_datas, settings);
198 template<
typename,
int>
class JointCollectionTpl,
199 typename ConfigVectorType,
200 typename TangentVectorType1,
201 typename TangentVectorType2,
202 class ModelAllocator,
204 PINOCCHIO_UNSUPPORTED_MESSAGE(
"The API will change towards more flexibility")
206 typename DataTpl<Scalar, Options, JointCollectionTpl>::TangentVectorType & contactABA(
207 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
208 DataTpl<Scalar, Options, JointCollectionTpl> & data,
209 const Eigen::MatrixBase<ConfigVectorType> & q,
210 const Eigen::MatrixBase<TangentVectorType1> & v,
211 const Eigen::MatrixBase<TangentVectorType2> & tau,
212 const std::vector<RigidConstraintModelTpl<Scalar, Options>, ModelAllocator> & contact_models,
213 std::vector<RigidConstraintDataTpl<Scalar, Options>, DataAllocator> & contact_data)
215 ProximalSettingsTpl<Scalar> settings = ProximalSettingsTpl<Scalar>();
217 model, data, q.derived(), v.derived(), tau.derived(), contact_models, contact_data, settings);
223 #include "pinocchio/src/algorithm/constrained-dynamics.hxx"
Main pinocchio namespace.
const DataTpl< Scalar, Options, JointCollectionTpl >::TangentVectorType & constraintDynamics(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 std::vector< RigidConstraintModelTpl< Scalar, Options >, ConstraintModelAllocator > &contact_models, std::vector< RigidConstraintDataTpl< Scalar, Options >, ConstraintDataAllocator > &contact_datas, ProximalSettingsTpl< Scalar > &settings)
Computes the forward dynamics with contact constraints according to a given list of contact informati...
void initConstraintDynamics(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const std::vector< ConstraintModel, ConstraintModelAllocator > &contact_models, const std::vector< ConstraintData, ConstraintDataAllocator > &contact_datas)
Init the forward dynamics data according to the contact information contained in contact_models.