| Directory: | ./ |
|---|---|
| File: | bindings/python/multibody/joint/expose-joints.cpp |
| Date: | 2025-02-12 21:03:38 |
| Exec | Total | Coverage | |
|---|---|---|---|
| Lines: | 10 | 10 | 100.0% |
| Branches: | 6 | 12 | 50.0% |
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // | ||
| 2 | // Copyright (c) 2015-2021 CNRS INRIA | ||
| 3 | // | ||
| 4 | |||
| 5 | #include "pinocchio/bindings/python/fwd.hpp" | ||
| 6 | #include "pinocchio/bindings/python/multibody/joint/joint-derived.hpp" | ||
| 7 | #include "pinocchio/bindings/python/multibody/joint/joints-variant.hpp" | ||
| 8 | #include "pinocchio/bindings/python/multibody/joint/joint-model.hpp" | ||
| 9 | #include "pinocchio/bindings/python/multibody/joint/joint-data.hpp" | ||
| 10 | |||
| 11 | #include "pinocchio/bindings/python/utils/std-aligned-vector.hpp" | ||
| 12 | |||
| 13 | namespace pinocchio | ||
| 14 | { | ||
| 15 | namespace python | ||
| 16 | { | ||
| 17 | |||
| 18 | 69 | void exposeJoints() | |
| 19 | { | ||
| 20 | typedef context::JointCollectionDefault::JointModelVariant JointModelVariant; | ||
| 21 | 69 | boost::mpl::for_each<JointModelVariant::types>(JointModelExposer()); | |
| 22 | 69 | bp::to_python_converter<JointModelVariant, JointVariantVisitor<JointModelVariant>>(); | |
| 23 | 69 | JointModelPythonVisitor<context::JointModel>::expose(); | |
| 24 |
3/6✓ Branch 2 taken 69 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 69 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 69 times.
✗ Branch 10 not taken.
|
69 | StdAlignedVectorPythonVisitor<context::JointModel>::expose("StdVec_JointModelVector"); |
| 25 | |||
| 26 | typedef context::JointCollectionDefault::JointDataVariant JointDataVariant; | ||
| 27 | 69 | boost::mpl::for_each<JointDataVariant::types>(JointDataExposer()); | |
| 28 | 69 | bp::to_python_converter<JointDataVariant, JointVariantVisitor<JointDataVariant>>(); | |
| 29 | 69 | JointDataPythonVisitor<context::JointData>::expose(); | |
| 30 |
3/6✓ Branch 2 taken 69 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 69 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 69 times.
✗ Branch 10 not taken.
|
69 | StdAlignedVectorPythonVisitor<context::JointData>::expose("StdVec_JointDataVector"); |
| 31 | 69 | } | |
| 32 | |||
| 33 | } // namespace python | ||
| 34 | } // namespace pinocchio | ||
| 35 |