APLA-Toolbox / pymapf

📍🗺️ A Python library for Multi-Agents Planning and Pathfinding (Centralized and Decentralized)
MIT License
71 stars 11 forks source link

Does Cooperative A* work? #42

Open yjkim046 opened 3 years ago

yjkim046 commented 3 years ago

Describe the bug WWWWWWWWWWWWWWWWWWWW WW___WWWWWW W_A_B__goalB_goalA_W WWWWWWWWWWWWWWWWWWWW

Robot A can't find its path in the scenario above.

To Reproduce Steps to reproduce the behavior:

  1. Set the wall and A,B in the above
  2. Run simulation

Expected behavior A and B finds its path, respectively.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context I see "WARNING Path not found for agent [A]" in the terminal.

guilyx commented 3 years ago

Hi there,

There's some significant work to be done on Cooperative A. This situation is one of them. If you switch B and A it will work. I'll see what I can do but I think it might just be re-running an A on the agents that failed to find a path after computing other's paths. Eitherway, I'll soon get going on Enhanced Conflict Based Search (ECBS) that will be significantly better than CA*, which to be honest I don't like at all.

guilyx commented 3 years ago

Hi again @yjkim046, can you share the snippet of code for initialization of the World/Agents so I can reproduce the same sequence ?

sampreets3 commented 3 years ago

Hi @yjkim046, from a first look at the problem it seems as if it is failing because there arises a case of "collision" during the plan. In the sense that once robot B has found the goal, it is acting like an obstacle for robot A's plan. I am not entirely sure if this is the exact cause of the problem, but maybe you can provide us with either the log or the application code for the bug to reproducable, as @guilyx said.