13 #include <gtest/gtest.h>
36 EXPECT_NEAR(.0, (
CPose3D(interp_good).getHomogeneousMatrixVal() -
CPose3D(
interp).getHomogeneousMatrixVal()).array().abs().
sum(), 1e-4);
TEST(CPose3DInterpolator, interp)
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
This class stores a time-stamped trajectory in SE(3) (CPose3D poses).
void insert(mrpt::system::TTimeStamp t, const pose_t &p)
Inserts a new pose in the sequence.
pose_t & interpolate(mrpt::system::TTimeStamp t, pose_t &out_interp, bool &out_valid_interp) const
Returns the pose at a given time, or interpolates using splines if there is not an exact match.
mrpt::system::TTimeStamp BASE_IMPEXP secondsToTimestamp(const double nSeconds)
Transform a time interval (in seconds) into TTimeStamp (e.g.
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
mrpt::system::TTimeStamp now()
A shortcut for system::getCurrentTime.
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...
double DEG2RAD(const double x)
Degrees to radians.
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).