using move_base recovery for initial pose estimation
Hi,
I want my robot to find its initial pose on its own rather than providing it with rviz "2d pose estimate". For that I already figured out that you can call AMCLs /global_localization service, whicht distributes the particles over the whole map. Second I'd need to rotate the robot. Therefore move_base already has the recovery behaviour, but how to trigger that? I know there is the C++ API, but isn't there a service call for that? Something that smoothly integrates with move_base resp. nav stack? Or can I use the actionlib for that? Anything any trigger despite the cpp api?
I'm wondering for a long time why there isn't something out there for initial pose estimation with the widely used combination of amcl and move_base. Are you guys all using the rviz-button? all the time you start demos?
Update 1
As I could not find an answer to this, I wrote a node triggering a recovery-behaviour similar to the move_base.cpp implementation. However those behaviours (rotate_recovery, clear_costmap_recovery) need the global and local costmap as parameters. Just creating your own as suggested in the code snipples from the wiki doesnt seem to work as intended since those maps are not the ones used by move_base: Running clear_costmap_recovery then does not clear the costmap used by move_base. However, and this is strange, rotate_recovery sometimes is not carried out due to potential collision. How can there be collisions if the costmap is empty? Or IS there a connection between a costmap you create and name ('local_costmap', 'global_costmap') and the ones used by move_base? This is confusing ...
An alternative solution would be to use actionlib and send move_base_msgs/MoveBaseActionGoal, but how can I tell move_base to just use the local planner and ignore the global one?
so .. nobody has the problem of initial pose estimation with amcl?