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