examples/partial_inverse.cpp
Go to the documentation of this file.
1 
8 /*****************************************************************************
9 ** Platform Check
10 *****************************************************************************/
11 
12 #include <ecl/config.hpp>
13 
14 /*****************************************************************************
15 ** Includes
16 *****************************************************************************/
17 
18 #include <iostream>
19 #include <ecl/linear_algebra.hpp>
22 #include <ecl/math.hpp>
23 #include "../../include/ecl/mobile_robot/differential_drive.hpp"
24 
25 /*****************************************************************************
26 ** Using
27 *****************************************************************************/
28 
29 using std::cout;
30 using std::endl;
31 using ecl::RightAlign;
32 using ecl::Format;
33 using ecl::LegacyPose2D;
34 using ecl::linear_algebra::Vector2d;
35 using ecl::linear_algebra::Vector3d;
36 
37 /*****************************************************************************
38 ** Main program
39 *****************************************************************************/
40 
41 int main(int argc, char **argv) {
42 
43  Format<double> format; format.width(8); format.precision(2); format.align(RightAlign);
44 
45  cout << endl;
46  cout << "***********************************************************" << endl;
47  cout << " Partial Inverse" << endl;
48  cout << "***********************************************************" << endl;
49  cout << endl;
50 
51 // Vector3d pose_a; pose_a << 1.0, 2.0, ecl::pi/2.0;
52 // Vector3d pose_b; pose_b << 2.0, 3.0, ecl::pi;
53  LegacyPose2D<double> a(1.0, 2.0, ecl::pi/2.0);
54  LegacyPose2D<double> b(2.0, 3.0, ecl::pi);
55 
56  Vector2d partial_inverse;
57 // partial_inverse = ecl::DifferentialDrive::Kinematics::Inverse(pose_a, pose_b);
58 // std::cout << partial_inverse << std::endl;
59  partial_inverse = ecl::DifferentialDrive::Kinematics::PartialInverse(a, b);
60  std::cout << partial_inverse << std::endl;
61 
62  cout << endl;
63  cout << "***********************************************************" << endl;
64  cout << " Passed" << endl;
65  cout << "***********************************************************" << endl;
66  cout << endl;
67 
68  return 0;
69 }
int main(int argc, char **argv)
double const pi
RightAlign


ecl_mobile_robot
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:08:52