ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to detect cliffs or steep descents as obstacles for autonomous navigation?

asked 2022-03-05 11:23:35 -0500

updated 2022-03-06 10:10:41 -0500

Hi, I am encountering a problem during the generation of an obstacle map to use in an autonomous navigation task. My robot has a stereo camera and uses the Rtabmap nodes to generate the map from the images.

The robot is not able to recognize a steep descent as obstacle and it falls into it. I tried to change the max_ground_angle parameter but this only change how some slopes are perceived, here instead the camera does not see the slope, but it should perceive that there is a place in which it can fall.

With the following images should be clearer what is the problem: From Rviz

Notice how what should be an obstacle is not detected, so when the autonomous navigation is activated the robot goes straight into the cliff. The only obstacle that is detected it the wall on the other side.

Also from the depth image you can see how the depth change abruptly, this should tell to Rtabmap that there is a cliff.

On Gazebo this is the situation: From Gazebo

From here it's clear how this is a dangerous situation and the robot should stop.

In the launch file, I launch rtabmap using the following parameters, it's basically the same from the mapping tutorial:

   <group ns="rtabmap">   
      <!-- Visual SLAM: args: "delete_db_on_start" and "udebug" -->
      <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
         <param name="frame_id" type="string" value="zed2_camera_center"/>
         <param name="subscribe_stereo" type="bool" value="false"/> 
         <param name="subscribe_depth" type="bool" value="true"/>
         <!-- <remap from="odom" to="/zed2/odom"/> -->
         <remap from="odom" to="/odom"/>

         <remap from="rgb/image"         to="/zed2/right/image_rect_color"/>
         <remap from="depth/image"         to="/zed2/depth/depth_registered"/>
         <remap from="rgb/camera_info"   to="/zed2/depth/camera_info"/>

         <param name="queue_size" type="int" value="30"/>

         <param name="rgb_topic" type="string" value="/zed2/right/image_rect_color"/>
         <param name="depth_topic" type="string" value="/zed2/depth/depth_registered"/>
         <param name="camera_info_topic" type="string" value="/zed2/depth/camera_info"/>

         <!--      Not used
         <remap from="left/image_rect" to="/zed2/left/image_rect_color"/>
         <remap from="right/image_rect" to="/zed2/right/image_rect_color"/>
         <remap from="left/camera_info" to="/zed2/left/camera_info"/>
         <remap from="right/camera_info" to="/zed2/right/camera_info"/> -->

         <!-- RTAB-Map's parameters -->
         <param name="Rtabmap/TimeThr" type="string" value="700"/>
         <param name="Rtabmap/DetectionRate" type="string" value="1"/>

         <param name="Kp/MaxFeatures" type="string" value="200"/>
         <param name="Kp/RoiRatios" type="string" value="0.03 0.03 0.04 0.04"/>
         <param name="Kp/DetectorStrategy" type="string" value="0"/>   <!-- use SURF -->
         <param name="Kp/NNStrategy" type="string" value="1"/>         <!-- kdTree -->

         <param name="SURF/HessianThreshold" type="string" value="1000"/>

         <param name="Vis/MinInliers" type="string" value="10"/>
         <param name="Vis/EstimationType" type="string" value="1"/> <!-- 3D->2D (PnP) -->

         <param name="RGBD/LoopClosureReextractFeatures" type="string" value="true"/>
         <param name="Vis/MaxWords" type="string" value="500"/>
         <param name="Vis ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-03-06 23:49:18 -0500

matlabbe gravatar image

Maybe don't let the planner plan trajectories in "unknown" cells. If you are using move_base, search for allow_unknown parameter and set it to false. Otherwise, the emptyness is difficult to detect, unless your robot is equipped with some cliff sensors like the roomba to not fall in stairs.

edit flag offensive delete link more


Thank you for answering! Actually I already tried to use allow_unknown=false but using this workaround I encounter the problem of not being able to send a goal on an unknown cell and sending a goal on a known cell everytime waiting for the right cell to be "discovered" is not the best way to proceed. Thank you anyway, I'll look into this :)

AlessioParmeggiani gravatar image AlessioParmeggiani  ( 2022-04-04 10:27:08 -0500 )edit

Question Tools

1 follower


Asked: 2022-03-05 11:23:35 -0500

Seen: 249 times

Last updated: Mar 06 '22