14 #include <gtest/gtest.h> 23 TEST(SLERP_tests, correctShortestPath)
31 const CPose3D expected(0,0,0,0,0,0);
37 const CPose3D expected(0,0,0,0,0,0);
43 const CPose3D expected(0,0,0,0,0,0);
70 EXPECT_NEAR(.0,(
CPose3D(expected).getHomogeneousMatrixVal() -
CPose3D(pose_interp).getHomogeneousMatrixVal()).array().abs().
sum() , 1e-4 ) <<
"pose_a: " << pose_a.
asString() <<
"\npose_b: " << pose_b.
asString() <<
"\ninterp: " << pose_interp.
asString() << 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 BASE_IMPEXP 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]"...