rtabmap not getting data

asked 2020-05-16 01:55:53 -0600

Batstru gravatar image

Dear all, I’m making my first steps with ROS, and I’m hitting a problem to which I need some help.

My setup consists of a roomba that I equipped with a kinect, a picamera and a raspi3b, and a remote machine with roscore plus some other things. In both I have ROS Melodic installed. The environment works well. from the robot I can communicate to the master, and I can make vision working via the kinect.

The problem arises with rtabmap, as I want to have mapping and localization working. Please see the logs, I need an help to understand to which direction point my investigations.

I’m following this tutorial: https://github.com/Choitek/mmmros-doc...

Output from the roomba:

marco@roomba2:~$ roslaunch freenect_launch freenect.launch depth_registration:=true
… logging to /home/marco/.ros/log/56a34f04-96df-11ea-9f93-080027d394db/roslaunch-roomba2-2759.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://roomba2:41037/



SUMMARY

========



PARAMETERS

 * /camera/camera_nodelet_manager/num_worker_threads: 4

 * /camera/depth_rectify_depth/interpolation: 0

 * /camera/depth_registered_rectify_depth/interpolation: 0

 * /camera/disparity_depth/max_range: 4.0

 * /camera/disparity_depth/min_range: 0.5

 * /camera/disparity_registered_hw/max_range: 4.0

 * /camera/disparity_registered_hw/min_range: 0.5

 * /camera/disparity_registered_sw/max_range: 4.0

 * /camera/disparity_registered_sw/min_range: 0.5

 * /camera/driver/data_skip: 0

 * /camera/driver/debug: False

 * /camera/driver/depth_camera_info_url: 

 * /camera/driver/depth_frame_id: camera_depth_opti...

 * /camera/driver/depth_registration: True

 * /camera/driver/device_id: #1

 * /camera/driver/diagnostics_max_frequency: 30.0

 * /camera/driver/diagnostics_min_frequency: 30.0

 * /camera/driver/diagnostics_tolerance: 0.05

 * /camera/driver/diagnostics_window_time: 5.0

 * /camera/driver/enable_depth_diagnostics: False

 * /camera/driver/enable_ir_diagnostics: False

 * /camera/driver/enable_rgb_diagnostics: False

 * /camera/driver/rgb_camera_info_url: 

 * /camera/driver/rgb_frame_id: camera_rgb_optica...

 * /rosdistro: melodic

 * /rosversion: 1.14.5



NODES

  /camera/

    camera_nodelet_manager (nodelet/nodelet)

    depth_metric (nodelet/nodelet)

    depth_metric_rect (nodelet/nodelet)

    depth_points (nodelet/nodelet)

    depth_rectify_depth (nodelet/nodelet)

    depth_registered_hw_metric_rect (nodelet/nodelet)

    depth_registered_metric (nodelet/nodelet)

    depth_registered_rectify_depth (nodelet/nodelet)

    depth_registered_sw_metric_rect (nodelet/nodelet)

    disparity_depth (nodelet/nodelet)

    disparity_registered_hw (nodelet/nodelet)

    disparity_registered_sw (nodelet/nodelet)

    driver (nodelet/nodelet)

    ir_rectify_ir (nodelet/nodelet)

    points_xyzrgb_hw_registered (nodelet/nodelet)

    points_xyzrgb_sw_registered (nodelet/nodelet)

    register_depth_rgb (nodelet/nodelet)

    rgb_debayer (nodelet/nodelet)

    rgb_rectify_color (nodelet/nodelet)

    rgb_rectify_mono (nodelet/nodelet)

  /

    camera_base_link (tf2_ros/static_transform_publisher)

    camera_base_link1 (tf2_ros/static_transform_publisher)

    camera_base_link2 (tf2_ros/static_transform_publisher)

    camera_base_link3 (tf2_ros/static_transform_publisher)



ROS_MASTER_URI=http://rb02-master.zurich:11311



process[camera/camera_nodelet_manager-1]: started with pid [2768]

process[camera/driver-2]: started with pid [2769]

process[camera/rgb_debayer-3]: started with pid [2770]

process[camera/rgb_rectify_mono-4]: started with pid [2771]

process[camera/rgb_rectify_color-5]: started with pid [2772]

process[camera/ir_rectify_ir-6]: started with pid [2773]

process[camera/depth_rectify_depth-7]: started with pid [2774]

process[camera/depth_metric_rect-8]: started with pid [2775]

process[camera/depth_metric-9]: started with pid [2776]

process[camera/depth_points-10]: started with pid [2777]

process[camera/register_depth_rgb-11]: started with pid [2778]

process[camera/points_xyzrgb_sw_registered-12]: started with pid [2779]

process[camera/depth_registered_sw_metric_rect-13]: started with pid [2780]

process[camera/depth_registered_rectify_depth-14]: started with pid [2781]

process[camera/points_xyzrgb_hw_registered-15]: started with pid [2782]

process[camera/depth_registered_hw_metric_rect-16]: started with pid [2783]

process[camera/depth_registered_metric-17]: started with pid [2784]

process[camera/disparity_depth-18]: started with pid [2785]

process[camera/disparity_registered_sw-19]: started with pid [2786]

process[camera/disparity_registered_hw-20]: started with pid [2848 ...
(more)
edit retag flag offensive close merge delete

Comments

The problem would be coming from this warning:

/rtabmap/rgbd_odometry subscribed to (approx sync):
/camera/rgb/image_rect_color,
/camera/depth_registered/image_raw,
/camera/rgb/camera_info

Check if those topics are published at a good rate:

$ rostopic hz /camera/rgb/image_rect_color /camera/depth_registered/image_raw /camera/rgb/camera_info
matlabbe gravatar image matlabbe  ( 2020-05-25 17:42:35 -0600 )edit

Hi, I missed you answer - just noticed, thanks for answering. So... rate is terrible:

              topic                   rate    min_delta   max_delta   std_dev   window
======================================================================================
/camera/rgb/image_rect_color         0.5902   1.385       1.954       0.2316    9     
/camera/depth_registered/image_raw   0.9451   0.9444      1.383       0.1007    9     
/camera/rgb/camera_info              29.95    1.478e-05   0.1875      0.05431   15

How to improve it? What should be a reasonable value? I also folllowed this one: http://wiki.ros.org/rtabmap_ros/Tutor... but not big results.

Thanks

Batstru gravatar image Batstru  ( 2020-06-13 13:38:36 -0600 )edit

Try launching rgbd_mapping.launch with compressed:=true. You may also compare with rostopic hz /camera/rgb/image_rect_color/compressed /camera/depth_registered/image_raw/compressedDepth /camera/rgb/camera_info. In your stats, the frame rate is too slow in comparison to camera_info, a larger queue_size would be required to be able to synchronize the topics. Based on that tutorial with rgbd_sync approach, what kind of frame rate you can get on topic /camera/rgbd_image/compressed?

matlabbe gravatar image matlabbe  ( 2020-06-30 13:13:51 -0600 )edit