Skip to content

Experiments in Multi-Agent Pathfinding

License

Notifications You must be signed in to change notification settings

robotics-laboratory/mapf

Repository files navigation

MAPF

Experiments in Multi-Agent Pathfinding

Getting started

Clone repository

git clone git@github.com:robotics-laboratory/mapf.git

Docker

Build and Run container

# Build and Run
docker compose build mapf
docker compose up -d mapf

# Attach to shell
docker exec -it mapf-${username} zsh

# Stop container
docker stop mapf-${username}

Bazel

Build and Run target

# Build 
bazel build //...

# Run 
bazel run //... -- ${binary options}

# Test
bazel test --test_output=all //...

Running solver

Show information about solver binary options

bazel run //solver:main -- --help

List available solver names

bazel run //solver:main -- --list-solvers

Solver input is a file with text formated MAPFProblem protobuf message. See example of file structure.

Solver output is a file with text formated MAPFSolution protobuf message.

Use paths, relative to MODULE directory.

Solver run command example

bazel run //solver:main -- -s bfs_solver -i data/mapf_problem_1.pb.txt -o data/mapf_solution_1.pb.txt

Running simulator

Show information about simulator binary options

bazel run //simulator:main -- --help

List available solver names

bazel run //simulator:main -- --list-solvers

Simulator input is a file with text formated MAPFProblem protobuf message. See example of file structure.

Simulator output is a MCAP file with serialized Scene protobuf message.

Use paths, relative to MODULE directory.

Simulator run command example

bazel run //simulator:main -- -s bfs_solver -i data/mapf_problem_1.pb.txt -o data/scene.mcap

Repository contents

Guide to packages:

  • geom: Package with geometry primitives (Vec2, floating point number comparators, etc.). See geom/tests for usage examples, geom/proto for available proto-definitions.

  • graph: Package with graph primitives (Node, Edge, Endpoints, etc.). See graph/test for usage examples, graph/proto for available proto-definitions.

  • models: Package with MAPF-problem specific primitives (AgentState, AgentTask, AgentPath, MAPFProblem, MAPFSolution, etc.). See models/test for usage examples, models/proto for available proto-definitions.

  • scene: Package with scene primitive, being recorded during simulation. See models/proto for available proto-definitions.

  • simulator: Package with simulator primitives. The simulator is implemented using a single-threaded actor model.

    • simulator/acotrs: Available actors declarations, Actor interface is defined here.

    • simulator/context: Global simulation context, holding current timestamp and EventBus, which is an object, that encapsulates interaction between different actors.

    • simulator/event: Event primitives, which encapsulates messages handling in runtime.

    • simulator/launcher: Simulation launcher, running event loop.

    • simulator/main: Simulator binary. See CLI-options to determine available running modes.

    • simulator/messages: Available messages declarations. Message interface is defined here.

  • solver: Package with available MAPF-problem solvers.

    • solver/solvers: Available solvers declarations, Solver interface is defined here.

    • solver/factory: Factory with registered solvers. After registering solver in factory constructor, it automatically becomes available in CLI-options.

    • solver/main: Sover binary. See CLI-options to determine available running modes.

About

Experiments in Multi-Agent Pathfinding

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published