introlab / rtabmap_ros

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

Identify environment changes #1000

Open kojokaro opened 1 year ago

kojokaro commented 1 year ago

Hi Mathieu

What would be the best way to identify changes in the environment when running in localization mode? It seems that numbers of Loop/Visual matches and Loop/Visual inliers are decreasing when we go through an area that has changed since mapping. Are there other indicators? Can we distinguish between a case of entering a new area and a case of entering a mapped area that went through some changes?

Thanks Keren

matlabbe commented 1 year ago

If the environment changed, there would be indeed less loop closures detected, or less inliers/matches between images of a loop closure. rtabmap/localization_pose is now always published and its covariance may increase over time when loop closures are not detected for some time.

To distinguish between a new area and an area that just changed, rtabmap/localization_pose could give an idea how close from the map's graph (/rtabmap/mapGraph) the robot is. If the robot is far from the map's graph, we may assume it is a new area, but if it is close to graph and we don't localize, maybe the area changed (or the robot point of view is different than when the environment was mapped). This assumes that rtabmap/localization_pose is reliable and its error matches the reality. In case of kidnapped robot problem or gross odometry error (e.g., wheels slipping, wheels not touching the ground), if the robot doesn't localize but is close to graph, it may not mean that the environment changed, the robot could be just in a new area but it thinks it is in the map.

Mathieu