expose-impulse-dynamics.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020-2021 CNRS INRIA
3 //
4 
8 
9 namespace bp = boost::python;
10 
11 namespace pinocchio
12 {
13  namespace python
14  {
15 
16 #ifndef PINOCCHIO_PYTHON_SKIP_ALGORITHM_IMPULSE_DYNAMICS
18  RigidConstraintModelVector;
20  RigidConstraintDataVector;
21 
23  const context::Model & model,
25  const context::VectorXs & q,
26  const context::VectorXs & v,
27  const RigidConstraintModelVector & contact_models,
28  RigidConstraintDataVector & contact_datas,
31  {
32  return impulseDynamics(
34  }
35 #endif // PINOCCHIO_PYTHON_SKIP_ALGORITHM_IMPULSE_DYNAMICS
36 
38  {
39 #ifndef PINOCCHIO_PYTHON_SKIP_ALGORITHM_IMPULSE_DYNAMICS
40  bp::def(
41  "impulseDynamics", impulseDynamics_proxy,
42  (bp::arg("model"), bp::arg("data"), bp::arg("q"), bp::arg("v"), bp::arg("contact_models"),
43  bp::arg("contact_datas"), bp::arg("r_coeff") = 0,
44  bp::arg("prox_settings") = context::ProximalSettings()),
45  "Computes the impulse dynamics with contact constraints according to a given list of "
46  "Contact information.\n"
47  "When using impulseDynamics for the first time, you should call first "
48  "initConstraintDynamics to initialize the internal memory used in the algorithm.\n"
49  "This function returns the after-impulse velocity of the system. The impulses acting "
50  "on the contacts are stored in the list data.contact_forces.");
51 #endif // PINOCCHIO_PYTHON_SKIP_ALGORITHM_IMPULSE_DYNAMICS
52  }
53  } // namespace python
54 } // namespace pinocchio
boost::python
pinocchio::python::context::RigidConstraintData
RigidConstraintDataTpl< Scalar, Options > RigidConstraintData
Definition: bindings/python/context/generic.hpp:146
pinocchio::DataTpl
Definition: context/generic.hpp:25
setup.data
data
Definition: cmake/cython/setup.in.py:48
pinocchio::python::impulseDynamics_proxy
static const context::VectorXs impulseDynamics_proxy(const context::Model &model, context::Data &data, const context::VectorXs &q, const context::VectorXs &v_before, const context::MatrixXs &J, const context::Scalar r_coeff=context::Scalar(0.), const context::Scalar inv_damping=context::Scalar(0.))
Definition: expose-contact-dynamics.cpp:45
pinocchio::python::exposeImpulseDynamics
void exposeImpulseDynamics()
Definition: expose-impulse-dynamics.cpp:37
bindings_dynamics.r_coeff
float r_coeff
Definition: bindings_dynamics.py:10
simulation-contact-dynamics.contact_datas
list contact_datas
Definition: simulation-contact-dynamics.py:60
pinocchio::context::VectorXs
Eigen::Matrix< Scalar, Eigen::Dynamic, 1, Options > VectorXs
Definition: context/generic.hpp:47
pinocchio::ProximalSettingsTpl
Structure containing all the settings parameters for the proximal algorithms.
Definition: algorithm/fwd.hpp:13
algorithms.hpp
python
pinocchio::python::v
const Vector3Like & v
Definition: bindings/python/spatial/explog.hpp:66
pinocchio::q
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
Definition: joint-configuration.hpp:1083
impulse-dynamics.hpp
pinocchio::python::PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR
typedef PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(context::RigidConstraintModel) RigidConstraintModelVector
pinocchio::impulseDynamics
const PINOCCHIO_DEPRECATED 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.
contact-cholesky.contact_models
list contact_models
Definition: contact-cholesky.py:22
std-vector.hpp
pinocchio::ModelTpl
Definition: context/generic.hpp:20
simulation-closed-kinematic-chains.prox_settings
prox_settings
Definition: simulation-closed-kinematic-chains.py:163
pinocchio::python::context::RigidConstraintModel
RigidConstraintModelTpl< Scalar, Options > RigidConstraintModel
Definition: bindings/python/context/generic.hpp:145
pinocchio::python::context::Scalar
PINOCCHIO_PYTHON_SCALAR_TYPE Scalar
Definition: bindings/python/context/generic.hpp:37
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:1082
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:29