Obstacle detection for RTABMAP

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Obstacle detection for RTABMAP

ktucker
Hey all,

Is there any way to use the RTABMAP software to publish locations of nearby obstacles? I have been using the occupancy grid for the time being but was thinking about an alternative setup.

Secondly, is there a way for me to do the following:
1. Map a room in advance
2. Deploy a robot in room using this database, put it in localization mode only
3. Update the grid_map or 2d occupancy grid with dynamic obstructions it detects?

Basically if someone walks in front of my robot, is there a way to allow it to detect the obstacle but not permanently add it to the map?

For reference, I am using a ZEDm stereoscopic camera.

Thanks all, and thanks Matt for all of your work on this software
Reply | Threaded
Open this post in threaded view
|

Re: Obstacle detection for RTABMAP

Telemething
Interesting topic. Looking forward to seeing commentary.
- Telemething
Reply | Threaded
Open this post in threaded view
|

Re: Obstacle detection for RTABMAP

ktucker
me 2
Reply | Threaded
Open this post in threaded view
|

Re: Obstacle detection for RTABMAP

matlabbe
Administrator
Hi,

I think the easiest way is to derive nearby obstacles from the occupancy grid. Other approach could be to subscribe to /rtabmap/cloud_obstacles topic, which is a PointCloud2 type. The disadvantage is that dynamic obstacles or noisy obstacles will all appear in /rtabmap/cloud_obstacles, as there is no overwriting from empty cells like in occupancy grid (e.g., when we remap the same area but with an obstacle removed).

You can map first the environment, then switch in localization mode (Mem/IncrementalMemory=false).
For dealing with dynamic moving obstacles (like people, pets), I suggest to use the obstacle layer of the local costmap and/or global costmap instead of updating the static map published by rtabmap.

For dealing with "slowly" dynamic obstacles (like furnitures moved over time), it would be possible to start rtabmap again in mapping mode with the previous map, find a loop closure to merge the new map and the old one, move around to add/clear spaces where objects have moved, then go back after that in localization mode.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Obstacle detection for RTABMAP

ktucker
Does this work in ROS Kinetic?
Reply | Threaded
Open this post in threaded view
|

Re: Obstacle detection for RTABMAP

matlabbe
Administrator
Yes, it should.
Reply | Threaded
Open this post in threaded view
|

Re: Obstacle detection for RTABMAP

ktucker
Can you elaborate more on how to take advantage of the local/global costmaps and their obstacle layers? I have not worked with costmaps before and am unsure of how to access such information.
Reply | Threaded
Open this post in threaded view
|

Re: Obstacle detection for RTABMAP

matlabbe
Administrator
To know more about the costmaps, see ROS navigation stack:
http://wiki.ros.org/navigation?distro=melodic
http://wiki.ros.org/navigation/Tutorials/RobotSetup
Paper : http://wiki.ros.org/Papers/ICRA2010_Marder-Eppstein

Example of rtabmap integration with Turtlebot in Gazebo:
http://wiki.ros.org/rtabmap_ros/Tutorials/MappingAndNavigationOnTurtlebot#Simulation_.28Gazebo.29



The idea is that rtabmap will provide the static global map to global costmap. The obstacle layer could be configured only for the local costmap so that only local planner will be influenced by the obstacles. Example setuping the local costmap plugins here: https://github.com/introlab/rtabmap_ros/blob/master/launch/azimut3/config/local_costmap_params.yaml then setup the obstacle layer here:
https://github.com/introlab/rtabmap_ros/blob/master/launch/azimut3/config/costmap_common_params_2d.yaml. The files are used like this when starting move_base:
     <node pkg="move_base" type="move_base" respawn="true" name="move_base" output="screen">
        <param name="base_global_planner" value="navfn/NavfnROS"/>
    	<rosparam file="$(find rtabmap_ros)/launch/azimut3/config/costmap_common_params_2d.yaml" command="load" ns="global_costmap"/>
     	<rosparam file="$(find rtabmap_ros)/launch/azimut3/config/costmap_common_params_2d.yaml" command="load" ns="local_costmap" />
    	<rosparam file="$(find rtabmap_ros)/launch/azimut3/config/local_costmap_params.yaml" command="load" ns="local_costmap" />
    	<rosparam file="$(find rtabmap_ros)/launch/azimut3/config/global_costmap_params.yaml" command="load" ns="global_costmap"/>
    	<rosparam file="$(find rtabmap_ros)/launch/azimut3/config/base_local_planner_params.yaml" command="load" />
     </node>

The turtlebot example above uses only the fake laser scan in the obstacle layer.

cheers,
Mathieu