Go to the documentation of this file.
9 #ifndef CPose3DInterpolator_H
10 #define CPose3DInterpolator_H
111 size_t size()
const {
return m_path.size(); }
112 bool empty()
const {
return m_path.empty(); }
194 void filter(
unsigned int component,
unsigned int samples );
void setInterpolationMethod(TInterpolatorMethod method)
Change the method used to interpolate the robot path.
void clear()
Clears the current sequence of poses.
const Scalar * const_iterator
void setMaxTimeInterpolation(double time)
Set value of the maximum time to consider interpolation.
void insert(mrpt::system::TTimeStamp t, const CPose3D &p)
Inserts a new pose in the sequence.
reverse_iterator rbegin()
const_iterator upper_bound(const mrpt::system::TTimeStamp &t) const
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE(class_name, base_name)
double BASE_IMPEXP distance(const TPoint2D &p1, const TPoint2D &p2)
Gets the distance between two points in a 2D space.
A bidirectional version of std::map, declared as bimap<KEY,VALUE> and which actually contains two std...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void filter(unsigned int component, unsigned int samples)
Filters by averaging one of the components of the CPose3D data within the interpolator.
std::pair< mrpt::system::TTimeStamp, mrpt::poses::CPose3D > TTimePosePair
poses::CPose3DInterpolator::TInterpolatorMethod enum_t
TPath::const_reverse_iterator const_reverse_iterator
This class stores a time-stamped trajectory in SE(3) (CPose3D poses).
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
mrpt::aligned_containers< mrpt::system::TTimeStamp, CPose3D >::map_t TPath
EIGEN_STRONG_INLINE const AdjointReturnType t() const
Transpose.
double maxTimeInterpolation
Maximum time considered to interpolate. If the difference between the desired timestamp where to inte...
const_reverse_iterator rbegin() const
void insert(const KEY &k, const VALUE &v)
Insert a new pair KEY<->VALUE in the bi-map.
double getMaxTimeInterpolation()
Set value of the maximum time to consider interpolation.
std::map< TYPE1, TYPE2, std::less< TYPE1 >, Eigen::aligned_allocator< std::pair< const TYPE1, TYPE2 > > > map_t
CPose3DInterpolator()
Creates an empty interpolator (with no points).
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
TPath::const_iterator const_iterator
TInterpolatorMethod
Type to select the interpolation method in CPose3DInterpolator::setInterpolationMethod.
TPath::reverse_iterator reverse_iterator
TInterpolatorMethod m_method
The virtual base class which provides a unified interface for all persistent objects in MRPT.
const_iterator begin() const
TInterpolatorMethod getInterpolationMethod() const
Returns the currently set interpolation method.
bool loadFromTextFile(const std::string &s)
Loads from a text file, in the format described by saveToTextFile.
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...
iterator upper_bound(const mrpt::system::TTimeStamp &t)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
CPose3D & interpolate(mrpt::system::TTimeStamp t, CPose3D &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.
const_iterator lower_bound(const mrpt::system::TTimeStamp &t) const
TPath m_path
The sequence of poses.
bool saveInterpolatedToTextFile(const std::string &s, double period) const
Saves the points in the interpolator to a text file, with the same format that saveToTextFile,...
A class used to store a 3D point.
void getBoundingBox(CPoint3D &minCorner, CPoint3D &maxCorner) const
Computes the bounding box in X,Y,Z of the whole vehicle path.
bool getPreviousPoseWithMinDistance(const mrpt::system::TTimeStamp &t, double distance, CPose3D &out_pose)
Get the previous CPose3D in the map with a minimum defined distance.
static void fill(bimap< enum_t, std::string > &m_map)
void getBoundingBox(mrpt::math::TPoint3D &minCorner, mrpt::math::TPoint3D &maxCorner) const
Computes the bounding box in X,Y,Z of the whole vehicle path.
iterator erase(iterator element_to_erase)
const_iterator end() const
Only specializations of this class are defined for each enum type of interest.
iterator lower_bound(const mrpt::system::TTimeStamp &t)
const_reverse_iterator rend() const
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE(class_name, base_name)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
Page generated by Doxygen 1.8.20 for MRPT 1.4.0 SVN: at Thu Aug 27 02:40:23 UTC 2020 | | |