proroklab / magat_pathplanning

MIT License
100 stars 29 forks source link

Testing a scenario without needing ECBS solutions #5

Closed Rishi-V closed 11 months ago

Rishi-V commented 11 months ago

Thanks for the open source codebase! I am hoping to use MAGAT for some experiments and have got the codebase to work on custom maps and start-goal scenarios. However I want to use MAGAT on some instances where the provided ECBS script is not finding a solution. Is there a way to run MAGAT without needing ECBS solutions? I have spent a non-trivial amount of time trying to figure it out but have been unsuccessful so far.

Please let me know if there is an easy way to run MAGAT without needing ECBS to find a solution.

Best, Rishi

LinWeizheDragon commented 11 months ago

Hi, MAGAT is designed to imitate the behaviour of a centralised controller and migrate its intelligence into an offline decentralised network. Therefore, running MAGAT without the supervision signals of a centralised controller is non-trivial. In your case, if ECBS can not find a solution, the case itself might be impossible or too difficult...? If you can find (by any means, beyond ECBS) a possible movement plan for your case, you can use the new plan to replace ECBS solutions.

Rishi-V commented 11 months ago

To clarify: PIBT and EECBS are able to find a solution so the case is definitely solvable. I don't quite know where / how to place those plans to replace the ECBS solution, so pointers here are appreciated.

Also, if I am just using MAGAT for inference (i.e. using one of your provided pre-trained model), I am unsure why a solution path is required. I see in the code that it wants a maximum makespan to limit execution and I was hoping to just make that a sufficiently high constant, but that doesn't work because the codebase uses the solution paths elsewhere.

LinWeizheDragon commented 11 months ago

It has been really quite a long time since I worked on this codebase. I can barely remember the details. But an easy implementation would be:

  1. generate ECBS solutions if successful, otherwise skip
  2. use your PIBT and EECBS solutions to replace - keep them in the same format
  3. run the whole framework as if all solutions were generated by ECBS

And if you use it for inference only, unfortunately, we did not provide a pure inference mode - our inference mode comes with metrics computation, which uses the ECBS solutions. In this case, you may want to modify the codebase to leave out metrics and ground-truth solutions.

Rishi-V commented 11 months ago

Ah sad, okay. This is what I was thinking conceptually but in practice it is more complicated. Thanks for the help!