Avoid collision with "difficult to detect" obstacles : desk ...

asked 2019-10-03 07:51:39 -0500

luchko gravatar image

updated 2019-10-04 03:03:07 -0500

Hi everybody, Just wanted to share my experience on this and profit from yours. I'm using Ros melodic with full navigation stack and a Realsense RGBD camera. My main goal here is to avoid collision with "difficult to detect" object. As my robot height is around 1.2meters, I have to detect tables, desk (....).

To illustrate this, you'll find a screenshot from RVIZ here and the corresponding image here. NB: please, don't mind the bad position of the blue and red laserscans on the second pic. The laserscan frames are fixed for testing purposes. On this picture, you see 2 laserscans, when the robot is arround 2 meters away from a desk. My main goal is to avoid collision with the "right desk"


I'm using a depth camera and the depthimage_to_laserscan node (see here) to build the input of navigation stack (Slam, amcl ...). As I am in a constrained environment, I can't just take full height of depth image to generate the "full height" corresponding laserscan. Instead, I hacked depthimage_to_laserscan in order to generate 2 differents laserscans from the depthimage :

  • the red one is the "centered" laserscan (scan height of 100 px around the center of the depthimage)
  • the blue one is the "top" laserscan (same height, but from the top of the depth image)

I managed to get 2 topics : scan and scan_top.

During the slam phase:
- scan is used to build the map.
- scan_top is not used.

During the navigation :
- scan is used by both amcl (to compute actual pose) and move_base - obstacle layer to compute the costmap)
- scan_top is only used to add what it detect to the costmap.


I am currently wondering the next step to achieve the collision avoidance : As the desk is detected at a distance of 2 meters, but no longer detected as I move froward to it, can I "persist" it on the costmap ? Or do I have to merge the 2 laserscans into one? I will use it both for slam and navigation.

Thanks in advance :)

edit retag flag offensive close merge delete