| Directory: | ./ |
|---|---|
| File: | bindings/python/algorithm/expose-impulse-dynamics-derivatives.cpp |
| Date: | 2025-02-12 21:03:38 |
| Exec | Total | Coverage | |
|---|---|---|---|
| Lines: | 5 | 8 | 62.5% |
| Branches: | 14 | 30 | 46.7% |
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // | ||
| 2 | // Copyright (c) 2020-2021 CNRS INRIA | ||
| 3 | // | ||
| 4 | |||
| 5 | #include "pinocchio/bindings/python/algorithm/algorithms.hpp" | ||
| 6 | #include "pinocchio/algorithm/impulse-dynamics-derivatives.hpp" | ||
| 7 | #include "pinocchio/algorithm/proximal.hpp" | ||
| 8 | #include "pinocchio/bindings/python/utils/std-vector.hpp" | ||
| 9 | |||
| 10 | namespace bp = boost::python; | ||
| 11 | |||
| 12 | namespace pinocchio | ||
| 13 | { | ||
| 14 | namespace python | ||
| 15 | { | ||
| 16 | |||
| 17 | typedef PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(context::RigidConstraintModel) | ||
| 18 | RigidConstraintModelVector; | ||
| 19 | typedef PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(context::RigidConstraintData) | ||
| 20 | RigidConstraintDataVector; | ||
| 21 | |||
| 22 | ✗ | static void impulseDynamicsDerivatives_proxy( | |
| 23 | const context::Model & model, | ||
| 24 | context::Data & data, | ||
| 25 | const RigidConstraintModelVector & contact_models, | ||
| 26 | RigidConstraintDataVector & contact_datas, | ||
| 27 | const context::Scalar & r_coeff, | ||
| 28 | const context::ProximalSettings & prox_settings) | ||
| 29 | { | ||
| 30 | ✗ | computeImpulseDynamicsDerivatives( | |
| 31 | model, data, contact_models, contact_datas, r_coeff, prox_settings); | ||
| 32 | ✗ | return; | |
| 33 | } | ||
| 34 | |||
| 35 | 69 | void exposeImpulseDynamicsDerivatives() | |
| 36 | { | ||
| 37 |
1/2✓ Branch 1 taken 69 times.
✗ Branch 2 not taken.
|
69 | bp::def( |
| 38 | "computeImpulseDynamicsDerivatives", impulseDynamicsDerivatives_proxy, | ||
| 39 |
6/12✓ Branch 2 taken 69 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 69 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 69 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 69 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 69 times.
✗ Branch 15 not taken.
✓ Branch 17 taken 69 times.
✗ Branch 18 not taken.
|
138 | (bp::arg("model"), bp::arg("data"), bp::arg("contact_models"), bp::arg("contact_datas"), |
| 40 |
7/14✓ Branch 1 taken 69 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 69 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 69 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 69 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 69 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 69 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 69 times.
✗ Branch 20 not taken.
|
138 | bp::arg("r_coeff") = 0, bp::arg("prox_settings") = context::ProximalSettings()), |
| 41 | "Computes the impulse dynamics derivatives with contact constraints according to a " | ||
| 42 | "given list of Contact information.\n" | ||
| 43 | "impulseDynamics should have been called before."); | ||
| 44 | 69 | } | |
| 45 | } // namespace python | ||
| 46 | } // namespace pinocchio | ||
| 47 |