MRPT  2.0.5

Detailed Description

SE(2)/SE(3) poses and probability distributions.

Back to list of all libraries | See all modules

Library `mrpt-poses`

This library is part of MRPT and can be installed in Debian-based systems with:

    sudo apt install libmrpt-poses-dev

See: Using MRPT from your CMake project

Collaboration diagram for [mrpt-poses]:


 2D/3D points and poses
 2D/3D point and pose PDFs

Parsing of textfiles with poses

template<class POSE_T >
void readFileWithPoses (const std::string &fname, std::vector< POSE_T > *poses_vec, std::vector< mrpt::system::TTimeStamp > *timestamps=NULL, bool substract_init_offset=false)
 Parse the textfile and fill in the corresponding poses vector. More...

Function Documentation

◆ readFileWithPoses()

template<class POSE_T >
void readFileWithPoses ( const std::string &  fname,
std::vector< POSE_T > *  poses_vec,
std::vector< mrpt::system::TTimeStamp > *  timestamps = NULL,
bool  substract_init_offset = false 

Parse the textfile and fill in the corresponding poses vector.

The file to be parsed is to contain 2D or 3D poses along with their corresponding timestamps, one line for each.

The expected format is the following:

For 2D Poses: timestamp x y theta (in rad) For 3D Poses in RPY form : x y z yaw pitch roll For 3D Poses in Quaternion form : x y z qw qx qy qz For 3D Poses in Quaternion form [TUM Datasets] : x y z qx qy qz qw

The 2D format abides to the groundtruth file format used by the GridMapNavSimul application

The TUM format is compatible with the groundtruth format for the TUM RGBD datasets as generated by the * rgbd_dataset2rawlog MRPT tool.

[in]fnameFilename from which the timestamps and poses are read
[out]poses_vecstd::vector which is to contain the 2D poses.
[out]timestampsstd::vector which is to contain the timestamps for the corresponding ground truth poses. Ignore this argument if timestamps are not needed.
[in]substract_init_offsetIf true, the filled poses are to start from 0, that means, that if the first found pose is non-zero, it's going to be considered and offset and substracted from all poses in the file.
See also

Definition at line 134 of file pose_utils.h.

References ASSERTMSG_, mrpt::system::fileExists(), mrpt::format(), mrpt::poses::internal::getPoseFromString(), MRPT_END, and MRPT_START.

Here is the call graph for this function:

Page generated by Doxygen 1.8.14 for MRPT 2.0.5 Git: e84511500 Thu Jul 2 23:53:34 2020 +0200 at vie jul 3 00:00:10 CEST 2020