Faster-than-realtime mapping in ROS 2

asked 2021-09-15 10:26:01 -0500

Hi,

I am transitioning my navigation courses and labs from ROS 1 (melodic) + Cartographer to ROS 2 (foxy) + SLAM toolbox.

Synchronous mapping seems fine, whether on a real robot or a Gazebo simulation, but i cannot find how to map "as fast as possible" from a rosbag.

Previously, the bag file was given to Cartographer to read it, instead of just playing it with rosbag, through the cartographer_offline_node capabilities.

Is a similar feature available in ROS 2 with SLAM toolbox? If not, are there any rosbag2 readers that may be used to play data faster than it was recorded? It may do the trick as long as the mapping process can deal with higher rate for the incoming data to process.

edit retag flag offensive close merge delete

Comments

2

For "are there any rosbag2 readers that may be used to play data faster than it was recorded?", have you tried the -x or --rate flags?

-x RATE, --rate RATE  rate at which to play back messages

Source : https://github.com/ros2/rosbag2/pull/304

janindu gravatar image janindu  ( 2021-09-15 22:43:33 -0500 )edit

Thanks, the --rate / -r indeed can speed up the replay and mapping can be done in much less time.

Fortunately, SLAM toolbox does not seem to care about any simulated clock, which is fine because my bags are all from ROS 1 and do not include the /clock messages.

Olivier Kermorgant gravatar image Olivier Kermorgant  ( 2021-09-17 02:09:05 -0500 )edit