in my application I would like to switch between manual navigation in areas outside the mapped environment, and autonomous navigation where the map is available. Hence I need to re-run global localization (and then scan localization) every time I enter the mapped area. There is no need to do it automatically, it can be triggered via web sight. I’ve tried using the behavior_tree components and the (deprecated) GroupSelectorBehavior.
I’m able to start (with the GroupSelectorBehavior) the localization behavior (global + scan localization) whenever I want, but only the first time. Then if I stop those nodes (with the GroupSelectorBehavior) and I try to restart the localization behavior I don’t understand what happens: the global localization node starts but it never succeeds/fails, and of course the scan localization doesn’t start.
It’s quite complicated to explain but I hope I was clear enough.
TL;DR: Is there a way to run/re-run the global GridSearchLocalizer when needed? (e.g. I manually drive the robot outside of the map and I need to relocalize it when I get back inside the map, or the scan localization gets too bad and I want to reset the robot pose with the global localization).
Thanks for your help.