class mrpt::poses::CPose3DInterpolator
This class stores a time-stamped trajectory in SE(3) (CPose3D poses).
It can also interpolate SE(3) poses over time using linear, splines or SLERP interpolation, as set in CPose3DInterpolator::setInterpolationMethod() Usage:
Insert new poses into the sequence with CPose3DInterpolator::insert()
Query an exact/interpolated pose with CPose3DInterpolator::interpolate(). Example:
CPose3DInterpolator path; path.setInterpolationMethod( mrpt::poses::imSplineSlerp ); path.insert( t0, mrpt::poses::CPose3D(...) ); path.insert( t1, mrpt::math::TPose3D(...) ); // prefered (faster) mrpt::math::TPose3D p; bool valid; cout << "Pose at t: " << path.interpolate(t,p,valid).asString() << endl;
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:
#include <mrpt/poses/CPose3DInterpolator.h> class CPose3DInterpolator: public mrpt::serialization::CSerializable, public mrpt::poses::CPoseInterpolatorBase { };
Inherited Members
public: // typedefs typedef std::pair<mrpt::Clock::time_point, pose_t> TTimePosePair; typedef std::map<mrpt::Clock::time_point, pose_t> TPath; typedef typename TPath::iterator iterator; typedef typename TPath::const_iterator const_iterator; typedef typename TPath::reverse_iterator reverse_iterator; typedef typename TPath::const_reverse_iterator const_reverse_iterator; // methods iterator begin(); const_iterator begin() const; const_iterator cbegin() const; iterator end(); const_iterator end() const; const_iterator cend() const; reverse_iterator rbegin(); const_reverse_iterator rbegin() const; reverse_iterator rend(); const_reverse_iterator rend() const; iterator lower_bound(const mrpt::Clock::time_point& t); const_iterator lower_bound(const mrpt::Clock::time_point& t) const; iterator upper_bound(const mrpt::Clock::time_point& t); const_iterator upper_bound(const mrpt::Clock::time_point& t) const; iterator erase(iterator element_to_erase); size_t size() const; bool empty() const; iterator find(const mrpt::Clock::time_point& t); const_iterator find(const mrpt::Clock::time_point& t) const; pose_t& at(const mrpt::Clock::time_point& t); const pose_t& at(const mrpt::Clock::time_point& t) const;