https://github.com/apla-toolbox/pymapf
ππΊοΈ A Python library for Multi-Agents Planning and Pathfinding (Centralized and Decentralized)
https://github.com/apla-toolbox/pymapf
control mapf muli-agent-pathfinding multi-agent multi-agent-planning multi-agent-system planning plannng robotics
Last synced: 6 months ago
JSON representation
ππΊοΈ A Python library for Multi-Agents Planning and Pathfinding (Centralized and Decentralized)
- Host: GitHub
- URL: https://github.com/apla-toolbox/pymapf
- Owner: APLA-Toolbox
- License: mit
- Created: 2021-01-16T13:16:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-02T12:02:34.000Z (6 months ago)
- Last Synced: 2025-04-02T13:22:18.817Z (6 months ago)
- Topics: control, mapf, muli-agent-pathfinding, multi-agent, multi-agent-planning, multi-agent-system, planning, plannng, robotics
- Language: Python
- Homepage:
- Size: 147 KB
- Stars: 72
- Watchers: 2
- Forks: 11
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
# PyMAPF
β¨ A Python toolbox for Multi-Agents Planning (Centralized and Decentralized) β¨


[](https://codecov.io/gh/APLA-Toolbox/pymapf)
[](https://www.codefactor.io/repository/github/apla-toolbox/pymapf)
[](http://isitmaintained.com/project/APLA-Toolbox/pymapf "Percentage of issues still open")

[](https://pypi.python.org/pypi/pymapf/)
[](https://github.com/Apla-Toolbox/pymapf/blob/master/LICENSE)
[](https://GitHub.com/Apla-Toolbox/pymapf/graphs/contributors/)
[Report Bug](https://github.com/APLA-Toolbox/pymapf/issues) Β· [Request Feature](https://github.com/APLA-Toolbox/pymapf/issues)Loved the project? Please consider [donating](https://www.buymeacoffee.com/dq01aOE) to help it improve!
## Features π±
- β¨ Built to be expanded: easy to add new planners
- π₯οΈ Supported on Ubuntu
- π Built with Python
- π Reactive Distributed Planners (Nonlinear Model Predictive Control, Velocity Obstacles)
- π§ Centralized Planners (Space-Time A*)
- π Benchmark Tools (Incoming...)
- π» Maintained (Incoming: Enhanced Conflict-Based Search, Local-Repair A*, Replanning RRT*...)
![]()
## Dependencies ποΈ
- Install Python (3.7.5 is the tested version)
- Install Pip: `sudo apt install python3-pip`
- Upgrade Pip: `python3 -m pip install --upgrade pip`### Using the repository πΎ
- Clone the repo: `git clone https://github.com/apla-toolbox/pymapf`
- Cd into the repo `cd pymapf`
- Install requirements: `python3 -m pip install -r requirements.txt`### Using the pip package π¦
- Install the package: `python3 -m pip install pymapf`
## Usage π
### Scripts π¨
Launch hub switch scripts using:
- `python3 scripts/switch_positions_nmpc.py`
- `python3 scripts/switch_positions_vel_obstacles.py` (broken)More to come...
### Library πΊοΈ
```python
from pymapf.decentralized import MultiAgentNMPC
from pymapf.decentralized.position import Position
import numpy as npsim = MultiAgentNMPC()
sim.register_agent("r2d2", Position(0, 3), Position(10, 7))
sim.register_agent("bb8", Position(0, 7), Position(5, 10))
sim.register_agent("c3po", Position(10, 7), Position(5, 0))
sim.register_obstacle(2, np.pi/4, Position(0, 0))
sim.run_simulation()
sim.visualize("filename_test", 10, 10)
``````python
from pymapf.decentralized.velocity_obstacle import MultiAgentVelocityObstacle
from pymapf.decentralized.position import Positionsim = MultiAgentVelocityObstacle(simulation_time=8.0)
sim.register_agent("r2d2", Position(0, 3), Position(10, 7))
sim.register_agent("bb8", Position(0, 7), Position(5, 10))
sim.register_agent("c3po", Position(10, 7), Position(5, 0))
sim.run_simulation()
sim.visualize("filename_test_2", 10, 10)
```## Cite π°
If you use the project in your work, please consider citing it with:
```
@misc{https://doi.org/10.13140/rg.2.2.14030.28486,
doi = {10.13140/RG.2.2.14030.28486},
url = {http://rgdoi.net/10.13140/RG.2.2.14030.28486},
author = {Erwin Lejeune and Sampreet Sarkar},
language = {en},
title = {Survey of the Multi-Agent Pathfinding Solutions},
publisher = {Unpublished},
year = {2021}
}
```List of publications & preprints using `pymapf` (please open a pull request to add missing entries):
* [Survey of MAPF solutions](https://www.researchgate.net/publication/348716625_Survey_of_the_Multi-Agent_Pathfinding_Solutions) (January 2021)
## Contribute π
Open an issue to state clearly the contribution you want to make. Upon aproval send in a PR with the Issue referenced. (Implement Issue #No / Fix Issue #No).
## Maintainers βοΈ
- Erwin Lejeune
- Sampreet Sarkar