Code Monkey home page Code Monkey logo

pymapf's Introduction

Logo

PyMAPF

✨ A Python toolbox for Multi-Agents Planning (Centralized and Decentralized) ✨

tests pip-package codecov CodeFactor Percentage of issues still open PipPerMonths Pip version fury.io GitHub license GitHub contributors

Report Bug Β· Request Feature

Loved the project? Please consider donating 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*...)
Logo

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 πŸ—ΊοΈ

from pymapf.decentralized import MultiAgentNMPC
from pymapf.decentralized.position import Position
import numpy as np

sim = 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)
from pymapf.decentralized.velocity_obstacle import MultiAgentVelocityObstacle
from pymapf.decentralized.position import Position

sim = 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):

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

pymapf's People

Contributors

guilyx avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pymapf's Issues

Concurrency

Implement threading for decentralized planners

Does Cooperative A* work?

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):

  • OS: Ubuntu 20.04
  • Browser Chrome

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

CA*

Cooperative A* (A* with a reservation table)

States are defined by adding another dimension: time.

CA*

If two agents are walking towards each other, one of them should find another next best node

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/format.yml
  • actions/checkout v2
  • actions/checkout v2
  • actions/setup-python v2
  • stefanzweifel/git-auto-commit-action v4.12.0
.github/workflows/pip-tests.yml
  • actions/checkout v2
  • actions/setup-python v2
  • actions/checkout v2.4.0
  • snickerbockers/submodules-init v4
.github/workflows/tests.yml
  • actions/checkout v2
  • actions/setup-python v2
  • actions/checkout v2.4.0
  • snickerbockers/submodules-init v4
  • actions/checkout v2
  • actions/setup-python v2
  • actions/checkout v2.4.0
  • snickerbockers/submodules-init v4
  • codecov/codecov-action v2
pip_requirements
requirements.txt
  • numpy ==1.21.4
  • scipy ==1.7.2
  • coloredlogs ==15.0.1
  • matplotlib ==3.5.0
  • termcolor ==1.1.0

  • Check this box to trigger a request for Renovate to run again on this repository

CA* Reservation Table not reliable

Describe the bug
the reservation table seems to not work at times as we still get collisions: maybe when an agent stops it's position is not kept within the reservation table.

To Reproduce
Steps to reproduce the behavior:
Not sure, tried random positions and it collided

Expected behavior
No collision

Screenshots
Woops no data

DevOps Roadmap

  • Upload package on Pypi
    • Create setup.py
    • Find a name
    • Tag version
  • Setup Github Actions
    • Build from repo
    • Test from repo
    • Build from pypi
  • Setup Contributing.md
  • Setup issue templates
  • Setup PR templates

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.