Always update the map using RTABmap
Hi,
My environment is very dynamic and I know that RTABmap uses ICP to localize using the laserscans under Reg/Strategy = 1. So is it possible to always update the map where laserscans/camera scan the area and reuse the updated map at the next turn? So in that case, ICP will still be accurate under a dynamic environment.
Asked by EdwardNur on 2019-12-03 17:44:40 UTC
Answers
So is it possible to always update the map where laserscans/camera scan the area and reuse the updated map at the next turn?
Yes, if --delete_db_on_start
argument is not set, rtabmap re-uses the previous map and will update it. By default when restarting, the robot assumes that it is starting from the last position of the previous session. If the robot moved when offline, it will localize automatically only if the camera is used. With or without camera, we can still set the localization manually by sending a pose on /rtabmap/initialpose
topic (similar to AMCL).
Under dynamic environment, it depends if most of the scan's rays hit static obstacles. I suggest to build rtabmap with libpointmatcher support to have more robust ICP in dynamic environments, particularly by tuning Icp/PMOutlierRatio
parameter.
cheers,
Mathieu
Asked by matlabbe on 2019-12-04 10:53:40 UTC
Comments
I have encountered the problem that RTABmap always adds the new obstacles but does not delete the old ones, is that correct?
Asked by EdwardNur on 2019-12-13 09:12:46 UTC
@matlabbe How can I turn on this feature? After creating a map, new objects were not included in the map
Asked by EdwardNur on 2019-12-13 10:59:31 UTC
It depends on which sensor you are using, because ray tracing is not enabled by default for camera input, just for 2D lidar. To turn on ray tracing (to clear obstacles), set Grid/RayTracing=true
. After creating a map, if you restart in localization mode only, new obstacles won't be added in the static map. If you restart in SLAM mode, new obstacles would be added to the map.
Asked by matlabbe on 2019-12-13 14:31:21 UTC
@matlabbe I am using 2D lidar. So will it be possible to use SLAM but making publish_tf_map
to false, because I am using my own localization?
Asked by EdwardNur on 2019-12-13 14:35:51 UTC
You can set publish_tf
to false for rtabmap node so that /map
frame is not published.
Asked by matlabbe on 2019-12-19 09:52:08 UTC
Comments