13 #include <gtest/gtest.h> 22 TEST(SLERP_tests, correctShortestPath)
30 const CPose3D expected(0, 0, 0, 0, 0, 0);
38 <<
"pose_a: " << pose_a <<
"\npose_b: " << pose_b
39 <<
"\ninterp: " << pose_interp << endl;
44 const CPose3D expected(0, 0, 0, 0, 0, 0);
52 <<
"pose_a: " << pose_a <<
"\npose_b: " << pose_b
53 <<
"\ninterp: " << pose_interp << endl;
58 const CPose3D expected(0, 0, 0, 0, 0, 0);
66 <<
"pose_a: " << pose_a <<
"\npose_b: " << pose_b
67 <<
"\ninterp: " << pose_interp << endl;
84 <<
"pose_a: " << pose_a <<
"\npose_b: " << pose_b
85 <<
"\ninterp: " << pose_interp << endl;
100 <<
"pose_a: " << pose_a <<
"\npose_b: " << pose_b
101 <<
"\ninterp: " << pose_interp << endl;
110 .0, (
CPose3D(expected).getHomogeneousMatrixVal() -
111 CPose3D(pose_interp).getHomogeneousMatrixVal())
117 <<
"\npose_b: " << pose_b.
asString()
118 <<
"\ninterp: " << pose_interp.
asString() << endl;
134 <<
"pose_a: " << pose_a <<
"\npose_b: " << pose_b
135 <<
"\ninterp: " << pose_interp << endl;
150 <<
"pose_a: " << pose_a <<
"\npose_b: " << pose_b
151 <<
"\ninterp: " << pose_interp << endl;
167 <<
"pose_a: " << pose_a <<
"\npose_b: " << pose_b
168 <<
"\ninterp: " << pose_interp << endl;
183 <<
"pose_a: " << pose_a <<
"\npose_b: " << pose_b
184 <<
"\ninterp: " << pose_interp << endl;
200 <<
"pose_a: " << pose_a <<
"\npose_b: " << pose_b
201 <<
"\ninterp: " << pose_interp << endl;
216 <<
"pose_a: " << pose_a <<
"\npose_b: " << pose_b
217 <<
"\ninterp: " << pose_interp << endl;
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
void slerp(const CQuaternion< T > &q0, const CQuaternion< T > &q1, const double t, CQuaternion< T > &q)
SLERP interpolation between two quaternions.
TEST(SLERP_tests, correctShortestPath)
void slerp_ypr(const mrpt::math::TPose3D &q0, const mrpt::math::TPose3D &q1, const double t, mrpt::math::TPose3D &p)
This base provides a set of functions for maths stuff.
mrpt::math::CMatrixDouble44 getHomogeneousMatrixVal() const
CONTAINER::Scalar sum(const CONTAINER &v)
Computes the sum of all the elements.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
void asString(std::string &s) const
Returns a human-readable textual representation of the object (eg: "[x y z yaw pitch roll]"...