GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: bindings/python/algorithm/expose-kinematic-regressor.cpp Lines: 8 8 100.0 %
Date: 2024-01-23 21:41:47 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
19
    void exposeKinematicRegressor()
14
    {
15
      using namespace Eigen;
16
17
19
      bp::def("computeJointKinematicRegressor",
18
              (Data::Matrix6x (*)(const Model &, const Data &, const JointIndex, const ReferenceFrame, const SE3 &))&computeJointKinematicRegressor<double,0,JointCollectionDefaultTpl>,
19
38
              bp::args("model","data","joint_id","reference_frame","placement"),
20
              "Computes the kinematic regressor that links the joint placements variations of the whole kinematic tree to the placement variation of the frame rigidly attached to the joint and given by its placement w.r.t. to the joint frame.\n\n"
21
              "Parameters:\n"
22
              "\tmodel: model of the kinematic tree\n"
23
              "\tdata: data related to the model\n"
24
              "\tjoint_id: index of the joint\n"
25
              "\treference_frame: reference frame in which the result is expressed (LOCAL, LOCAL_WORLD_ALIGNED or WORLD)\n"
26
              "\tplacement: relative placement to the joint frame\n");
27
28
19
      bp::def("computeJointKinematicRegressor",
29
              (Data::Matrix6x (*)(const Model &, const Data &, const JointIndex, const ReferenceFrame))&computeJointKinematicRegressor<double,0,JointCollectionDefaultTpl>,
30
38
              bp::args("model","data","joint_id","reference_frame"),
31
              "Computes the kinematic regressor that links the joint placement variations of the whole kinematic tree to the placement variation of the joint given as input.\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, LOCAL_WORLD_ALIGNED or WORLD)\n");
37
38
19
      bp::def("computeFrameKinematicRegressor",
39
              (Data::Matrix6x (*)(const Model &, Data &, const FrameIndex, const ReferenceFrame))&computeFrameKinematicRegressor<double,0,JointCollectionDefaultTpl>,
40
38
              bp::args("model","data","frame_id","reference_frame"),
41
              "Computes the kinematic regressor that links the joint placement variations of the whole kinematic tree to the placement variation of the frame given as input.\n\n"
42
              "Parameters:\n"
43
              "\tmodel: model of the kinematic tree\n"
44
              "\tdata: data related to the model\n"
45
              "\tframe_id: index of the frame\n"
46
              "\treference_frame: reference frame in which the result is expressed (LOCAL, LOCAL_WORLD_ALIGNED or WORLD)\n");
47
19
    }
48
49
  } // namespace python
50
} // namespace pinocchio