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


ecl_mobile_robot
Author(s): Daniel Stonier
autogenerated on Fri Aug 28 2015 10:34:58