Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #include <labust/tools/conversions.hpp>
00008 #include <iostream>
00009
00010 int main(int argc, char* argv[])
00011 {
00012 using namespace Eigen;
00013 typedef double T;
00014 double roll = 0;
00015 double pitch = 0;
00016 double yaw = M_PI/3;
00017 Quaternion<double> q;
00018 labust::tools::quaternionFromEulerZYX(roll,pitch,yaw,q);
00019 std::cout<<"quat:"<<q.x()<<" "<<q.y()<<" "<<q.z()<<" "<<q.w()<<std::endl;
00020 roll = pitch = yaw = 0;
00021 labust::tools::eulerZYXFromQuaternion(q, roll,pitch,yaw);
00022
00023
00024
00025
00026
00027 std::cout<<roll<<std::endl;
00028 std::cout<<pitch<<std::endl;
00029 std::cout<<yaw<<std::endl;
00030
00031
00032
00033
00034 return 0;
00035 }
00036
00037
00038
00039
00040