Administrator
|
Hi,
localization mode in rtabmap is not the same than AMCL. It doesn't modify the map like AMCL, but it is not a MonteCarlo localization.
AMCL uses many particles (many possible localizations) spread in the static occupancy grid, then updates its particles depending on the current laser scan. Current localization is where there are the most particles with most probability to be there. In theory, the robot could start anywhere in the environment, with particles spread everywhere in the map, could eventually converge to a single location while moving. In practice, it is still better to give a initial pose to AMCL to converge faster and to avoid aliasing problems. In RVIZ, the 2D pose estimate button can publish over /initialpose topic that would be connected to AMCL node.
RTAB-Map can also use 2D pose estimate button when it is in localization mode, just make sure to update the topic name in Tool Properties to match the one rtabmap is using ("rosnode info rtabmap | grep initialpose"). For example, if rtabmap node is started in rtabmap namespace, set topic for 2D pose estimate button to /rtabmap/initialpose. For the localization approach used by rtabmap, 1) it assumes it is restarted in the map where it shut down previously, 2) global visual relocalization is done using its loop closure detection approach (bag-of-words), 3) can do proximity detection (e.g., scan matching) to refine its current position with closes nodes in the map. If you send an initialpose with RVIZ, step 3 will be able to work properly. If initialpose is not used, the robot could eventually relocalize globally with the step 2 (it the robot is using a camera).
cheers,
Mathieu
|