Recording rosbag in Gazebo simulation for RTABMAP (data_throttle)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Recording rosbag in Gazebo simulation for RTABMAP (data_throttle)

alexr
Hi,

How can i record rosbag from gazebo simulation using the data_throttle. I am trying to simulate the robot for different environments and want to do post processing later. I can successfully do rtabmapping real time but do not know how to use the data throttle launch with fake kinect data coming from ROS simulator.

Can you suggest the parameters I need to change to make it work.

Thanks

------ Alex
Reply | Threaded
Open this post in threaded view
|

Re: Recording rosbag in Gazebo simulation for RTABMAP (data_throttle)

matlabbe
Administrator

See 1.2 on this page. Here is a small example using the freenect_throttle.launch file in that tutorial:

# Recording raw images:
$ roslaunch freenect_throttle.launch rate:=10
$ rosbag record -O raw_images.bag /tf /camera/data_throttled_image /camera/data_throttled_image_depth /camera/data_throttled_camera_info

# Replaying with rtabmap:
$ roslaunch rtabmap_ros rtabmap.launch use_sim_time:=true rgb_topic:=/camera/data_throttled_image depth_topic:=/camera/data_throttled_image_depth camera_info_topic:=/camera/data_throttled_camera_info rtabmap_args:="--delete_db_on_start"
$ rosbag play --clock raw_images.bag

If you want to record compressed images to save some space:

# Recording compressed images:
$ roslaunch freenect_throttle.launch rate:=10
$ rosbag record -O compressed_images.bag /tf /camera/data_throttled_image/compressed /camera/data_throttled_image_depth/compressedDepth  /camera/data_throttled_camera_info

# Replaying with rtabmap:
$ roslaunch rtabmap_ros rtabmap.launch use_sim_time:=true rgb_topic:=/camera/data_throttled_image depth_topic:=/camera/data_throttled_image_depth camera_info_topic:=/camera/data_throttled_camera_info compressed:=true rtabmap_args:="--delete_db_on_start"
$ rosbag play --clock compressed_images.bag
cheers,
Mathieu