The pose_listener package allows you to read a ROS topic and saves poses to a file. Poses are stored in TUM format, but code is straightforward and it is easily extensible to other formats.
It currently supports:
nav_msgs::Odometrygeometry_msgs::PoseStampedgeometry_msgs::PoseWithCovarianceStampedsensor_msgs::Imu(orientation only)
- ROS
Clone this repository to your workspace and catkin_make it.
Run:
rosrun pose_listener pose_listener _topic:=<TOPIC_NAME> _type:=<TOPIC_TYPE> [_output_file:=<PATH_TO_FILE>]
where
TOPIC_NAMEis the name of the topic, e.g./firefly_sbx/vio/odom. Runrostopic listto print a list of topic names.TOPIC_TYPEis the type of the topic. It must be one of the following values:Oif the type isnav_msgs::OdometryPSif the type isgeometry_msgs::PoseStampedPCSif the type isgeometry_msgs::PoseWithCovarianceStampedIif the type issensor_msgs::Imu(orientation only)
PATH_TO_FILEis a path to the output file._output_fileis an optional argument. Default value:trajectory.txt
- The type of the topic should be queried in runtime.
- Path of the output file should be taken as a command line parameter.
- Support KITTI formats (and many others)
- Support different ROS msgs.