Line |
Branch |
Exec |
Source |
1 |
|
|
#include <iostream> |
2 |
|
|
#include "pinocchio/multibody/liegroup/liegroup.hpp" |
3 |
|
|
|
4 |
|
|
using namespace pinocchio; |
5 |
|
|
|
6 |
|
✗ |
int main() |
7 |
|
|
{ |
8 |
|
|
typedef double Scalar; |
9 |
|
|
|
10 |
|
|
typedef SpecialEuclideanOperationTpl<3, Scalar> SE3Operation; |
11 |
|
✗ |
SE3Operation aSE3; |
12 |
|
✗ |
SE3Operation::ConfigVector_t pose_s, pose_g; |
13 |
|
✗ |
SE3Operation::TangentVector_t delta_u; |
14 |
|
|
|
15 |
|
|
// Starting configuration |
16 |
|
✗ |
pose_s(0) = 1.0; |
17 |
|
✗ |
pose_s(1) = 1.0; |
18 |
|
✗ |
pose_s(2) = 1; |
19 |
|
✗ |
pose_s(3) = -0.13795; |
20 |
|
✗ |
pose_s(4) = 0.13795; |
21 |
|
✗ |
pose_s(5) = 0.69352; |
22 |
|
✗ |
pose_s(6) = 0.69352; |
23 |
|
✗ |
aSE3.normalize(pose_s); |
24 |
|
|
|
25 |
|
|
// Goal configuration |
26 |
|
✗ |
pose_g(0) = 4; |
27 |
|
✗ |
pose_g(1) = 3; |
28 |
|
✗ |
pose_g(2) = 3; |
29 |
|
✗ |
pose_g(3) = -0.46194; |
30 |
|
✗ |
pose_g(4) = 0.331414; |
31 |
|
✗ |
pose_g(5) = 0.800103; |
32 |
|
✗ |
pose_g(6) = 0.191342; |
33 |
|
✗ |
aSE3.normalize(pose_g); |
34 |
|
|
|
35 |
|
✗ |
SE3Operation::ConfigVector_t pole_u; |
36 |
|
✗ |
aSE3.interpolate(pose_s, pose_g, 0.5, pole_u); |
37 |
|
✗ |
std::cout << "Interpolated configuration: " << pole_u.transpose() << std::endl; |
38 |
|
|
|
39 |
|
✗ |
return 0; |
40 |
|
|
} |
41 |
|
|
|