Class CPose2DInterpolator
Defined in File CPose2DInterpolator.h
Inheritance Relationships
Base Types
public mrpt::serialization::CSerializablepublic mrpt::poses::CPoseInterpolatorBase< 2 >(Template Class CPoseInterpolatorBase)
Class Documentation
-
class CPose2DInterpolator : public mrpt::serialization::CSerializable, public mrpt::poses::CPoseInterpolatorBase<2>
This class stores a time-stamped trajectory in SE(2) (mrpt::math::TPose2D poses). It can also interpolate SE(2) poses over time using linear, splines or SLERP interpolation, as set in CPose2DInterpolator::setInterpolationMethod() Usage:
Insert new poses into the sequence with CPose2DInterpolator::insert()
Query an exact/interpolated pose with CPose2DInterpolator::interpolate(). Example:
CPose2DInterpolator path; path.setInterpolationMethod( CPose2DInterpolator::imSplineSlerp ); path.insert( t0, mrpt::math::TPose2D(...) ); path.insert( t1, mrpt::math::TPose2D(...) ); mrpt::math::TPose2D p; bool valid; std::cout << "Pose at t: " << path.interpolate(t,p,valid).asString() << "\n";
Time is represented with mrpt::Clock::time_point. See mrpt::system for methods and utilities to manage these time references.
See TInterpolatorMethod for the list of interpolation methods. The default method at constructor is “imLinearSlerp”.
See also