Robotics StackExchange | Archived questions

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

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 maxgroundangle 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/MaxDepth" type="string" value="0"/> 

         <param name="approx_sync" type="bool" value="true"/>

         <param name="RGBD/CreateOccupancyGrid" value="false"/>

         <param name="Grid/MaxGroundAngle" value="30"/>


      </node>

In the launch file I am passing to Rtabmap the depth image directly, I also tried to pass the two color images but there is no much difference.

How can I solve this problem? There are some parameters that I have to set or a different package that I can use?

I also tried to tell to the navigation setup to ignore unknown spaces and don't traverse them but I didn't managed to make it work and also it doesn't seem to be the correct solution.

Asked by AlessioParmeggiani on 2022-03-05 12:23:35 UTC

Comments

Answers

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.

Asked by matlabbe on 2022-03-07 00:49:18 UTC

Comments

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 :)

Asked by AlessioParmeggiani on 2022-04-04 10:27:08 UTC