|
The SLAM algorithm needs to create a local aggretated laser scan which necicitates moving around a little. If everything is configured properly, it should suffice to move 1m and rotate the robot (as much as possible).
Example:
Your map is likely outdated.
Have a look at ArViz. There you can see the red laser scanner points and the occupancy grid. If you compare the features as if the robot would be localized: do they match? Are there significant changes to the environment that can explain the behavior? If you have a hard time matching these points visually then you can also move the robot to the pose where the robot was spawned after starting the localization component.
In any case, you should first create a new map and try to localize the robot within this new map. By providing a better map, the localization will be more robust anyways.
Usually, this should not happen and most likely indicates that you have significant change in your environment (over time) that impacts the initial localization. Overall, the system is quite robust to a lot of noise as long as distinct features can be used to localize the robot. As an example, think of a demo in which many people block the laser scans into a certain direction. Then, the localizer can only rely on the remaining part of the map. Make sure that this area is as clean as possible (e.g., no dynamic obstacles blocking the laser scans to the walls). Do you notice any discrepancy between the map and these areas? If so, clean up the room and record a new map.
You need to tune some parameters of the localizer:
min_score
Threshold for the scan match score below which a match is not considered. Low scores indicate that the scan and map do not look similar.min_global_localization_score
Threshold below which global localizations are not trustedBoth scores might need to be reduced but it comes at a downside. E.g, if there are some ambiguities in the map then the localization can also jump during operation which might cause severe damage to the robot. Therefore, you should make sure that the map is as recent as possible before updating these scores.
Proceed as follows: 1) Enable log_matches
in pose_graph.lua
and restart the component. Now you get some information only in the command line (not in the ArmarX log). => "constraint found" -> min_score => "global constraints found" -> min_global_localization_score 2) **min_global_localization_score
** is used as a threshold for the correlative scan matcher (used for global constraints with the map). Incrementally reduce this value until you can localize within the map again. 3) min_sore
is used as a threshold for the fast correlative scan matcher (used for local matches in restricted surrounding). You should not have to update this parameter. However, if you notice that local scan matching is not working properly, reduce this value.