Re: RTAB Error

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/RTAB-Error-tp4596p4623.html

Hi,

I can reproduce on Kinetic the very slow compressed depth topic (~2 Hz instead of 30 Hz), just by doing (even on same computer):
$ roslaunch freenect_launch freenect.launch depth_registration:=true
$ rostopic hz /camera/depth_registered/image_raw/compressedDepth
subscribed to [/camera/depth_registered/image_raw/compressedDepth]
no new messages
average rate: 2.363
	min: 0.405s max: 0.441s std dev: 0.01802s window: 3
average rate: 2.446
	min: 0.396s max: 0.441s std dev: 0.01651s window: 6

$ rostopic hz /camera/depth_registered/image_raw
subscribed to [/camera/depth_registered/image_raw]
average rate: 30.065
	min: 0.032s max: 0.035s std dev: 0.00118s window: 10
average rate: 29.968
	min: 0.031s max: 0.035s std dev: 0.00109s window: 40
There is maybe a bug in the compressedDepth plugin of image_transport causing its very low performance.

Just tested on Indigo, there is no such problem!

I updated rtabmap.launch for a workaround by using compressed rgbd_image topic instead. Example on the robot, launch:
# I use kinect
$ roslaunch freenect_launch freenect.launch depth_registration:=true
$ rosrun nodelet nodelet load rtabmap_ros/rgbd_sync camera/camera_nodelet_manager \
__name:=rgbd_sync \
camera/rgb/image:=/camera/rgb/image_rect_color \
camera/depth/image:=/camera/depth_registered/image_raw \
camera/rgb/camera_info:=/camera/rgb/camera_info

Verify on remote computer that compressed rgbd_image is received at 30 Hz:
$ rostopic hz /camera/rgbd_image/compressed
subscribed to [/camera/rgbd_image/compressed]
average rate: 29.869
	min: 0.030s max: 0.038s std dev: 0.00186s window: 28
average rate: 29.936
	min: 0.029s max: 0.039s std dev: 0.00229s window: 58

Launch rtabmap.launch with subscribing to compressed rgbd_image topic:
$ roslaunch rtabmap_ros rtabmap.launch subscribe_rgbd:=true rgbd_topic:=/camera/rgbd_image/compressed args:="-d"

cheers,
Mathieu