[mrpt-poses]

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

Library mrpt-poses

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

sudo apt install libmrpt-poses-dev

Read also how to import MRPT into your CMake scripts.

Library contents

// global functions

void mrpt::poses::registerAllClasses_mrpt_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
    );

Global Functions

void mrpt::poses::registerAllClasses_mrpt_poses()

Forces manual RTTI registration of all serializable classes in this namespace.

Should never be required to be explicitly called by users, except if building MRPT as a static library.

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.

Parameters:

fname

Filename from which the timestamps and poses are read

poses_vec

std::vector which is to contain the 2D poses.

timestamps

std::vector which is to contain the timestamps for the corresponding ground truth poses. Ignore this argument if timestamps are not needed.

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.

See also:

https://www.mrpt.org/Collection_of_Kinect_RGBD_datasets_with_ground_truth_CVPR_TUM_2011