Robotics StackExchange | Archived questions

Faster-than-realtime mapping in ROS 2

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 cartographerofflinenode 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.

Asked by Olivier Kermorgant on 2021-09-15 10:26:01 UTC

Comments

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

Asked by janindu on 2021-09-15 22:43:33 UTC

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.

Asked by Olivier Kermorgant on 2021-09-17 02:09:05 UTC

Answers