introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
1.01k stars 558 forks source link

Wrong map optimization after loop closure #791

Open abylikhsanov opened 2 years ago

abylikhsanov commented 2 years ago

Hi,

Most of the time, if you map a large area (almost does not matter how big the environment is) and aftert accumilating a significant amount of drift, the map optimization (thus 2d occupancy map stitching) works perfectly after 1st loop closure.

However, afterwards when continuing the mapping session and especially when going in the mapped area but in opposite direction (so occupancy map is mapped but camera feature map isn't as it is the opposite direction), the odometry drift will occur and you could see that the new mapped occupancy map being shifted which is okay. Then, when you try to loop close that area and for example rotate back to the previously mapped area (camera feature map) and get the loop closure, it could be that 2D occupancy map is not aligned.

Why is that and what could be done here?

matlabbe commented 2 years ago

Avoid traversing an area in opposite direction for a long time, make a 180 deg at some places to make loop closure detection possible, then continue. Another way is to use backward and forward cameras.