12 #include <gtest/gtest.h>
27 pose_path.
insert( t0+2*dt, TPose2D(1.+3.,2.+4.,
DEG2RAD(30.0+20.0) ));
35 const TPose2D interp_good(1.+1.5,2.+2.0,
DEG2RAD(30.0+10.0) );
36 for (
unsigned int i=0;i<interp_good.size();i++) {
37 EXPECT_NEAR(interp_good[i],
interp[i], 1e-4);
TEST(CPose2DInterpolator, interp)
This class stores a time-stamped trajectory in SE(2) (mrpt::math::TPose2D 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.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
double DEG2RAD(const double x)
Degrees to radians.