Directory: | ./ |
---|---|
File: | examples/overview-simple.cpp |
Date: | 2025-02-12 21:03:38 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 10 | 10 | 100.0% |
Branches: | 13 | 26 | 50.0% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | #include <iostream> | ||
2 | |||
3 | #include "pinocchio/multibody/sample-models.hpp" | ||
4 | #include "pinocchio/algorithm/joint-configuration.hpp" | ||
5 | #include "pinocchio/algorithm/rnea.hpp" | ||
6 | |||
7 | 1 | int main() | |
8 | { | ||
9 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | pinocchio::Model model; |
10 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | pinocchio::buildModels::manipulator(model); |
11 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | pinocchio::Data data(model); |
12 | |||
13 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | Eigen::VectorXd q = pinocchio::neutral(model); |
14 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
1 | Eigen::VectorXd v = Eigen::VectorXd::Zero(model.nv); |
15 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
1 | Eigen::VectorXd a = Eigen::VectorXd::Zero(model.nv); |
16 | |||
17 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | const Eigen::VectorXd & tau = pinocchio::rnea(model, data, q, v, a); |
18 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
|
1 | std::cout << "tau = " << tau.transpose() << std::endl; |
19 | 1 | } | |
20 |