GCC Code Coverage Report


Directory: ./
File: bindings/python/algorithm/expose-kinematic-regressor.cpp
Date: 2024-08-27 18:20:05
Exec Total Coverage
Lines: 8 8 100.0%
Branches: 3 6 50.0%

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