Go to the documentation of this file.
67 using TPath = std::map<mrpt::Clock::time_point, pose_t>;
85 return m_path.lower_bound(t);
89 return m_path.lower_bound(t);
94 return m_path.upper_bound(t);
98 return m_path.upper_bound(t);
103 m_path.erase(element_to_erase++);
104 return element_to_erase;
138 bool& out_valid_interp)
const;
142 bool& out_valid_interp)
const;
203 void filter(
unsigned int component,
unsigned int samples);
218 pose_t& out_interp)
const;
typename Lie::Euclidean< DIM >::light_type point_t
TPoint2D or TPoint3D.
const_iterator cbegin() const
iterator find(const mrpt::Clock::time_point &t)
bool loadFromTextFile(const std::string &s)
Loads from a text file, in the format described by saveToTextFile.
typename TPath::reverse_iterator reverse_iterator
std::chrono::duration< rep, period > duration
#define MRPT_ENUM_TYPE_END()
typename Lie::SE< DIM >::light_type pose_t
TPose2D or TPose3D.
Base class for SE(2)/SE(3) interpolators.
const_iterator end() const
void impl_interpolation(const TTimePosePair &p1, const TTimePosePair &p2, const TTimePosePair &p3, const TTimePosePair &p4, const TInterpolatorMethod method, const mrpt::Clock::time_point &td, pose_t &out_interp) const
TPath m_path
The sequence of poses.
typename Lie::SE< DIM >::type cpose_t
CPose2D or CPose3D.
bool getPreviousPoseWithMinDistance(const mrpt::Clock::time_point &t, double distance, pose_t &out_pose)
Get the previous CPose3D in the map with a minimum defined distance.
CPoseInterpolatorBase()
Default ctor: empty sequence of poses.
const pose_t & at(const mrpt::Clock::time_point &t) const
iterator erase(iterator element_to_erase)
double distance(const TPoint2D &p1, const TPoint2D &p2)
Gets the distance between two points in a 2D space.
TInterpolatorMethod m_method
typename TPath::iterator iterator
pose_t & interpolate(const mrpt::Clock::time_point &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_FILL_ENUM_MEMBER(mrpt::poses, imSpline)
#define MRPT_ENUM_TYPE_BEGIN(_ENUM_TYPE_WITH_NS)
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
void setInterpolationMethod(TInterpolatorMethod method)
Change the method used to interpolate the robot path.
const_iterator begin() const
reverse_iterator rbegin()
bool saveToTextFile(const std::string &s) const
Saves the points in the interpolator to a text file, with this format: Each row contains these elemen...
void insert(const mrpt::Clock::time_point &t, const pose_t &p)
Inserts a new pose in the sequence.
TInterpolatorMethod
Type to select the interpolation method in CPoseInterpolatorBase derived classes.
const_iterator find(const mrpt::Clock::time_point &t) const
void clear()
Clears the current sequence of poses.
typename TPath::const_iterator const_iterator
TInterpolatorMethod getInterpolationMethod() const
Returns the currently set interpolation method.
std::chrono::time_point< Clock > time_point
iterator lower_bound(const mrpt::Clock::time_point &t)
Traits for SE(n), rigid-body transformations in R^n space.
const_iterator cend() const
void getBoundingBox(point_t &minCorner, point_t &maxCorner) const
Computes the bounding box in all Euclidean coordinates of the whole path.
const_iterator lower_bound(const mrpt::Clock::time_point &t) const
iterator upper_bound(const mrpt::Clock::time_point &t)
Traits for Euclidean R^N space.
const_reverse_iterator rbegin() const
void filter(unsigned int component, unsigned int samples)
Filters by averaging one of the components of the pose data within the interpolator.
mrpt::Clock::duration maxTimeInterpolation
Maximum time considered to interpolate.
mrpt::Clock::duration getMaxTimeInterpolation()
Set value of the maximum time to consider interpolation.
const_reverse_iterator rend() const
typename TPath::const_reverse_iterator const_reverse_iterator
bool saveInterpolatedToTextFile(const std::string &s, const mrpt::Clock::duration &period) const
Saves the points in the interpolator to a text file, with the same format that saveToTextFile,...
std::map< mrpt::Clock::time_point, pose_t > TPath
const_iterator upper_bound(const mrpt::Clock::time_point &t) const
std::pair< mrpt::Clock::time_point, pose_t > TTimePosePair
pose_t & at(const mrpt::Clock::time_point &t)
void setMaxTimeInterpolation(const mrpt::Clock::duration &time)
Set value of the maximum time to consider interpolation.
Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Thu May 21 21:53:32 UTC 2020 | |