partial_inverse.cpp
Go to the documentation of this file.
00001 
00008 /*****************************************************************************
00009 ** Includes
00010 *****************************************************************************/
00011 
00012 #include <iostream>
00013 #include <gtest/gtest.h>
00014 #include <ecl/linear_algebra.hpp>
00015 #include <ecl/formatters/floats.hpp>
00016 #include <ecl/geometry/pose2d.hpp>
00017 #include <ecl/math.hpp>
00018 #include "../../include/ecl/mobile_robot/differential_drive.hpp"
00019 
00020 /*****************************************************************************
00021 ** Using
00022 *****************************************************************************/
00023 
00024 using std::cout;
00025 using std::endl;
00026 using ecl::RightAlign;
00027 using ecl::Format;
00028 using ecl::Pose2D;
00029 using ecl::linear_algebra::Vector2d;
00030 using ecl::linear_algebra::Vector3d;
00031 
00032 /*****************************************************************************
00033 ** Tests
00034 *****************************************************************************/
00035 
00036 TEST(DifferentialDriveTests,allEggsInOneBasket) {
00037         // Haven't got around to running this properly through gtests yet.
00038         SUCCEED();
00039 }
00040 /*****************************************************************************
00041 ** Main program
00042 *****************************************************************************/
00043 
00044 int main(int argc, char **argv) {
00045 
00046     Format<double> format; format.width(8); format.precision(2); format.align(RightAlign);
00047 
00048     cout << endl;
00049     cout << "***********************************************************" << endl;
00050     cout << "                 Partial Inverse" << endl;
00051     cout << "***********************************************************" << endl;
00052     cout << endl;
00053 
00054 //    Vector3d pose_a; pose_a << 1.0, 2.0, ecl::pi/2.0;
00055 //    Vector3d pose_b; pose_b << 2.0, 3.0, ecl::pi;
00056     Pose2D<double> a(1.0, 2.0, ecl::pi/2.0);
00057     Pose2D<double> b(2.0, 3.0, ecl::pi);
00058 
00059     Vector2d partial_inverse;
00060 //    partial_inverse = ecl::DifferentialDrive::Kinematics::Inverse(pose_a, pose_b);
00061 //    std::cout << partial_inverse << std::endl;
00062     partial_inverse = ecl::DifferentialDrive::Kinematics::PartialInverse(a, b);
00063     std::cout << partial_inverse << std::endl;
00064 
00065     cout << endl;
00066     cout << "***********************************************************" << endl;
00067     cout << "                      Passed" << endl;
00068     cout << "***********************************************************" << endl;
00069     cout << endl;
00070 
00071     testing::InitGoogleTest(&argc,argv);
00072     return RUN_ALL_TESTS();
00073 }
00074 
00075 


ecl_mobile_robot
Author(s): Daniel Stonier
autogenerated on Sun Oct 5 2014 23:35:30