GCC Code Coverage Report


Directory: ./
File: bindings/python/algorithm/expose-cat.cpp
Date: 2025-04-30 16:14:33
Exec Total Coverage
Lines: 11 11 100.0%
Branches: 6 13 46.2%

Line Branch Exec Source
1 //
2 // Copyright (c) 2015-2021 CNRS INRIA
3 //
4
5 #include "pinocchio/bindings/python/algorithm/algorithms.hpp"
6 #include "pinocchio/algorithm/compute-all-terms.hpp"
7 #include "pinocchio/bindings/python/utils/model-checker.hpp"
8
9 namespace pinocchio
10 {
11 namespace python
12 {
13 6 static void computeAllTerms_proxy(
14 const context::Model & model,
15 context::Data & data,
16 const context::VectorXs & q,
17 const context::VectorXs & v)
18 {
19
1/3
✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
6 data.M.fill(context::Scalar(0));
20 6 computeAllTerms(model, data, q, v);
21
1/2
✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
6 data.M.triangularView<Eigen::StrictlyLower>() =
22
2/4
✓ Branch 2 taken 6 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 6 times.
✗ Branch 6 not taken.
12 data.M.transpose().triangularView<Eigen::StrictlyLower>();
23 6 }
24
25 72 void exposeCAT()
26 {
27
1/2
✓ Branch 1 taken 72 times.
✗ Branch 2 not taken.
72 bp::def(
28
1/2
✓ Branch 1 taken 72 times.
✗ Branch 2 not taken.
144 "computeAllTerms", computeAllTerms_proxy, bp::args("model", "data", "q", "v"),
29 "Compute all the terms M, non linear effects, center of mass quantities, centroidal "
30 "quantities and Jacobians in"
31 "in the same loop and store the results in data.\n"
32 "This algorithm is equivalent to calling:\n"
33 "\t- forwardKinematics\n"
34 "\t- crba\n"
35 "\t- nonLinearEffects\n"
36 "\t- computeJointJacobians\n"
37 "\t- centerOfMass\n"
38 "\t- jacobianCenterOfMass\n"
39 "\t- ccrba\n"
40 "\t- computeKineticEnergy\n"
41 "\t- computePotentialEnergy\n"
42 "\t- computeGeneralizedGravity\n"
43 "Parameters:\n"
44 "\tmodel: model of the kinematic tree\n"
45 "\tdata: data related to the model\n"
46 "\tq: the joint configuration vector (size model.nq)\n"
47 "\tv: the joint velocity vector (size model.nv)\n",
48 72 mimic_not_supported_function<>(0));
49 72 }
50 } // namespace python
51 } // namespace pinocchio
52