Skip to main content

Pymapf is a library for decentralized and centralized multi-agent planning tools

Project description

tests codecov CodeFactor Percentage of issues still open GitHub license GitHub contributors

PyMAPF

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

Planners

Decentralized (distributed)

  • Velocity Obstacles
  • Nonlinear Model Predictive Control
  • TO DO:
    • Add parallelism
    • Replanning RRT*

Centralized

  • TO DO:
    • CBS
    • ECBS
    • SIPP

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 (Not yet available)

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymapf-0.1.1.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

pymapf-0.1.1-py3-none-any.whl (12.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page