Closed jash101 closed 3 years ago
The problem here is that MBF is just offering the plugins the option of providing detailed outcomes, instead of just success or failure. But it's up to the plugins (planner in this case) to implement the richer interface and provide the error codes. GlobalPlanner is not currently implementing MBF interface, so it won't provide things like INVALID GOAL, just success or failure.
What you can do is to clone the navigation repo and implement the MBF interface, and return the error codes you consider appropriate.
Oh, now I get it. Thanks for the reply. Is there a repo/pkg which already does this? Could you help me to understand where I need to make the changes in the planner code?
Hi, sorry for the delay. Indeed, yes! I modified long time ago global_planner here And here I added a MBF interface to TEB local planner while maintainng the original nav_core one, so you can now load TEB on both MBF and have the extended interface, but also on old good move base (with the old, very limited interface, only true/false result)
I close this as solved; please reopen if u have further issues
I like that move_base_flex's GetPath action has extensive outcome codes which can give great additional information on why the path planning failed, which I want to make use of to add case specific recovery. For example, if GetPath outcome is 52 (INVALID START), the robot should back off. If outcome is 53 (INVALID GOAL), then it should plan the path to a nearby pose. But after setting up move_base_flex and echoing move_base_flex/get_path/result, while publishing goal to a pose which has an obstacle (the black region), the get path fails with code 55 (PAT_EXCEEDED), although it should be 53 (INVALID GOAL).
Am I missing something in the setup? Or is it a bug/unfinished feature? I really want to use these outcomes to design state machine to handle each case accordingly using move_base_flex.
Here's my
planners.yaml
file contents:Here's the message which gets published: