Go to the documentation of this file.
29 p1.getAsQuaternion(q1);
32 p2.getAsQuaternion(q2);
39 cout <<
"q1 = " << q1 << endl;
40 cout <<
"q1 as CPose3D = " <<
CPose3D(q1, 0, 0, 0) << endl;
42 cout <<
"q2 = " << q2 << endl;
43 cout <<
"q2 as CPose3D = " <<
CPose3D(q2, 0, 0, 0) << endl;
45 cout <<
"q3 = q1 * q2 = " << q3 << endl;
46 cout <<
"q3 as CPose3D = " <<
CPose3D(q3, 0, 0, 0) << endl;
48 cout << endl <<
"Should be equal to p3 = p1 (+) p2 = " << p3 << endl;
55 cout <<
"Dump with iterators: ";
61 int main(
int argc,
char** argv)
70 catch (std::exception& e)
72 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
77 printf(
"Another exception!!");
GLdouble GLdouble GLdouble GLdouble q
void TestQuaternionsIterators()
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,...
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void crossProduct(const CQuaternion &q1, const CQuaternion &q2)
Calculate the "cross" product (or "composed rotation") of two quaternion: this = q1 x q2 After the op...
A quaternion, which can represent a 3D rotation as pair , with a real part "r" and a 3D vector ,...
CQuaternion< double > CQuaternionDouble
A quaternion of data type "double".
This base provides a set of functions for maths stuff.
double DEG2RAD(const double x)
Degrees to radians.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |