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