introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
965 stars 557 forks source link

Rtabmap hangs at high speed and in dense environments #237

Open gutsy-robot opened 6 years ago

gutsy-robot commented 6 years ago

Hi,

I am using rtabmap_ros with a ZED stereo camera for my project on a self-driving car. I am using ZED SDK 2.1 and using the zed_ros_wrapper(commit: 3ea5cd1) as given here: http://wiki.ros.org/rtabmap_ros/Tutorials/HandHeldMapping.

I have observed that the rtabmap viz screen just freezes after a while and the screen just turns red after a few minutes. I have observed that this happens more quickly when we drive at speeds greater than 15kmph and in dense environments where there a lot of features for the SLAM to extract for e.g at narrow lanes with a lot of trees. Also, usually rtabmap works fine for a few minutes when we reboot the system, however when we kill and restart rtabmap after this, it hangs very quickly.

What can be the possible reasons for this? Also, would really appreciate if someone can tell which ZED SDK version and zed_ros_wrapper version is stable with rtabmap.

Thanks in advance!

matlabbe commented 6 years ago

On what computer are you doing the processing? Is it at 100% CPU usage?

Red screens are caused by many things, see Odometry Lost section here, in particular "iii" bullet point:

iii. Too fast camera motion for the framerate: If the camera is moved too fast, there will be less features to match between successive frames. RGB images can be also blurry depending of the camera, which decreases the number of good visual matches between frames.

For example, rtabmap works on all KITTI sequences, from 0 Km/h to ~90 km/h (make sure to have latest version built with g2o for the best results). Odometry should be done at least at 10 Hz. You can check the FPS of odometry by doing this:

$ rostopic hz /rtabmap/odom

If frame rate is below 10 Hz, you may look to upgrade the computation power. If framerate is over 10 Hz, you could try to increase the number of features extracted (Vis/MaxFeatures, default 1000).

cheers, Mathieu