| Directory: | ./ |
|---|---|
| File: | bindings/python/algorithm/expose-kinematic-regressor.cpp |
| Date: | 2025-04-30 16:14:33 |
| Exec | Total | Coverage | |
|---|---|---|---|
| Lines: | 11 | 11 | 100.0% |
| Branches: | 6 | 12 | 50.0% |
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // | ||
| 2 | // Copyright (c) 2020 INRIA | ||
| 3 | // | ||
| 4 | #include "pinocchio/bindings/python/utils/model-checker.hpp" | ||
| 5 | |||
| 6 | #include "pinocchio/bindings/python/algorithm/algorithms.hpp" | ||
| 7 | #include "pinocchio/algorithm/regressor.hpp" | ||
| 8 | |||
| 9 | namespace pinocchio | ||
| 10 | { | ||
| 11 | namespace python | ||
| 12 | { | ||
| 13 | |||
| 14 | 72 | void exposeKinematicRegressor() | |
| 15 | { | ||
| 16 | typedef context::Scalar Scalar; | ||
| 17 | enum | ||
| 18 | { | ||
| 19 | Options = context::Options | ||
| 20 | }; | ||
| 21 | |||
| 22 |
1/2✓ Branch 1 taken 72 times.
✗ Branch 2 not taken.
|
72 | bp::def( |
| 23 | "computeJointKinematicRegressor", | ||
| 24 | (context::Data::Matrix6x(*)( | ||
| 25 | const context::Model &, const context::Data &, const JointIndex, const ReferenceFrame, | ||
| 26 | const context:: | ||
| 27 | SE3 &))&computeJointKinematicRegressor<Scalar, Options, JointCollectionDefaultTpl>, | ||
| 28 |
1/2✓ Branch 1 taken 72 times.
✗ Branch 2 not taken.
|
144 | bp::args("model", "data", "joint_id", "reference_frame", "placement"), |
| 29 | "Computes the kinematic regressor that links the joint placements variations of the whole " | ||
| 30 | "kinematic tree to the placement variation of the frame rigidly attached to the joint and " | ||
| 31 | "given by its placement w.r.t. to the joint frame.\n\n" | ||
| 32 | "Parameters:\n" | ||
| 33 | "\tmodel: model of the kinematic tree\n" | ||
| 34 | "\tdata: data related to the model\n" | ||
| 35 | "\tjoint_id: index of the joint\n" | ||
| 36 | "\treference_frame: reference frame in which the result is expressed (LOCAL, " | ||
| 37 | "LOCAL_WORLD_ALIGNED or WORLD)\n" | ||
| 38 | "\tplacement: relative placement to the joint frame\n", | ||
| 39 | 72 | mimic_not_supported_function<>(0)); | |
| 40 | |||
| 41 |
1/2✓ Branch 1 taken 72 times.
✗ Branch 2 not taken.
|
72 | bp::def( |
| 42 | "computeJointKinematicRegressor", | ||
| 43 | (context::Data::Matrix6x(*)( | ||
| 44 | const context::Model &, const context::Data &, const JointIndex, | ||
| 45 | const ReferenceFrame))&computeJointKinematicRegressor<Scalar, Options, JointCollectionDefaultTpl>, | ||
| 46 |
1/2✓ Branch 1 taken 72 times.
✗ Branch 2 not taken.
|
144 | bp::args("model", "data", "joint_id", "reference_frame"), |
| 47 | "Computes the kinematic regressor that links the joint placement variations of the " | ||
| 48 | "whole kinematic tree to the placement variation of the joint given as input.\n\n" | ||
| 49 | "Parameters:\n" | ||
| 50 | "\tmodel: model of the kinematic tree\n" | ||
| 51 | "\tdata: data related to the model\n" | ||
| 52 | "\tjoint_id: index of the joint\n" | ||
| 53 | "\treference_frame: reference frame in which the result is expressed (LOCAL, " | ||
| 54 | "LOCAL_WORLD_ALIGNED or WORLD)\n", | ||
| 55 | 72 | mimic_not_supported_function<>(0)); | |
| 56 | |||
| 57 |
1/2✓ Branch 1 taken 72 times.
✗ Branch 2 not taken.
|
72 | bp::def( |
| 58 | "computeFrameKinematicRegressor", | ||
| 59 | (context::Data::Matrix6x(*)( | ||
| 60 | const context::Model &, context::Data &, const FrameIndex, | ||
| 61 | const ReferenceFrame))&computeFrameKinematicRegressor<Scalar, Options, JointCollectionDefaultTpl>, | ||
| 62 |
1/2✓ Branch 1 taken 72 times.
✗ Branch 2 not taken.
|
144 | bp::args("model", "data", "frame_id", "reference_frame"), |
| 63 | "Computes the kinematic regressor that links the joint placement variations of the " | ||
| 64 | "whole kinematic tree to the placement variation of the frame given as input.\n\n" | ||
| 65 | "Parameters:\n" | ||
| 66 | "\tmodel: model of the kinematic tree\n" | ||
| 67 | "\tdata: data related to the model\n" | ||
| 68 | "\tframe_id: index of the frame\n" | ||
| 69 | "\treference_frame: reference frame in which the result is expressed (LOCAL, " | ||
| 70 | "LOCAL_WORLD_ALIGNED or WORLD)\n", | ||
| 71 | 72 | mimic_not_supported_function<>(0)); | |
| 72 | 72 | } | |
| 73 | |||
| 74 | } // namespace python | ||
| 75 | } // namespace pinocchio | ||
| 76 |