MRPT
2.0.4
|
SE(2)/SE(3) poses and probability distributions.
Back to list of all libraries | See all modules
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
Modules | |
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... | |
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] | fname | Filename from which the timestamps and poses are read |
[out] | poses_vec | std::vector which is to contain the 2D poses. |
[out] | timestamps | std::vector which is to contain the timestamps for the corresponding ground truth poses. Ignore this argument if timestamps are not needed. |
[in] | substract_init_offset | If 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. |
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.
Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020 |