test/partial_inverse.cpp
Go to the documentation of this file.
1 
8 /*****************************************************************************
9 ** Includes
10 *****************************************************************************/
11 
12 #include <iostream>
13 #include <gtest/gtest.h>
14 #include <ecl/linear_algebra.hpp>
16 #include <ecl/geometry/pose2d.hpp>
17 #include <ecl/math.hpp>
18 #include "../../include/ecl/mobile_robot/differential_drive.hpp"
19 
20 /*****************************************************************************
21 ** Using
22 *****************************************************************************/
23 
24 using std::cout;
25 using std::endl;
26 using ecl::RightAlign;
27 using ecl::Format;
28 using ecl::Pose2D;
29 using ecl::linear_algebra::Vector2d;
30 using ecl::linear_algebra::Vector3d;
31 
32 /*****************************************************************************
33 ** Tests
34 *****************************************************************************/
35 
36 TEST(DifferentialDriveTests,allEggsInOneBasket) {
37  // Haven't got around to running this properly through gtests yet.
38  SUCCEED();
39 }
40 /*****************************************************************************
41 ** Main program
42 *****************************************************************************/
43 
44 int main(int argc, char **argv) {
45 
46  Format<double> format; format.width(8); format.precision(2); format.align(RightAlign);
47 
48  cout << endl;
49  cout << "***********************************************************" << endl;
50  cout << " Partial Inverse" << endl;
51  cout << "***********************************************************" << endl;
52  cout << endl;
53 
54 // Vector3d pose_a; pose_a << 1.0, 2.0, ecl::pi/2.0;
55 // Vector3d pose_b; pose_b << 2.0, 3.0, ecl::pi;
56  Pose2D<double> a(1.0, 2.0, ecl::pi/2.0);
57  Pose2D<double> b(2.0, 3.0, ecl::pi);
58 
59  Vector2d partial_inverse;
60 // partial_inverse = ecl::DifferentialDrive::Kinematics::Inverse(pose_a, pose_b);
61 // std::cout << partial_inverse << std::endl;
62  partial_inverse = ecl::DifferentialDrive::Kinematics::PartialInverse(a, b);
63  std::cout << partial_inverse << std::endl;
64 
65  cout << endl;
66  cout << "***********************************************************" << endl;
67  cout << " Passed" << endl;
68  cout << "***********************************************************" << endl;
69  cout << endl;
70 
71  testing::InitGoogleTest(&argc,argv);
72  return RUN_ALL_TESTS();
73 }
74 
75 
double const pi
int main(int argc, char **argv)
TEST(DifferentialDriveTests, allEggsInOneBasket)
Eigen::Vector3f Pose2D
RightAlign


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