This began as a fork of David Portugal's patrolling_sim, but has evolved into a rewrite of the original. This version makes use of the Grex Machina multi-agent framework and ROS 2, allowing for far more capabilities than the original patrolling_sim.
This repository is used in multiple papers. See below for the revisions associated with specific submissions:
-
A. Goeckner, Y. Sui, N. Martinet, X. Li, and Q. Zhu, “Graph Neural Network-based Multi-agent Reinforcement Learning for Resilient Distributed Coordination of Multi-Robot Systems,” under review.
- Commit 357e9a47064d67a6b6f66f41f73424933f86e345
-
A. Goeckner, X. Li, E. Wei, and Q. Zhu, “Attrition-Aware Adaptation for Multi-Agent Patrolling.” arXiv, Jan. 12, 2024. doi: 10.48550/arXiv.2304.01386.
- Commit 36e474b734c9682798e0f0260ba9fda632c3b6ca
First install all prerequisites of the Grex Machina repository.
Then, perform the following:
- Install Python dependencies.
pip install networkx[default] numpy matplotlib zarr
Once prerequisites are installed, perform the following:
-
Use Git to download the patrolling sim repository.
git clone --recurse https://github.com/NU-IDEAS-Lab/patrolling_sim.git
-
Change to the
patrolling_sim
folder:cd ./patrolling_sim/
-
Source the correct ROS 2 installation.
source /opt/ros/humble/setup.bash
-
Build the patrolling sim using Colcon, the ROS 2 build system.
colcon build
-
Follow instructions below to run the simulation.
To operate the simulator, perform the following steps:
-
Change to the
patrolling_sim
root directory:cd ./patrolling_sim/
-
Source the installed packages, plus the Gazebo simulator, and set environment variables.
source ./install/setup.bash source /usr/share/gazebo/setup.sh export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
Run the simulation:
ros2 launch patrolling_sim simulation.launch.py agent_count:=2
- Note: To view available launch arguments, add a
-s
flag to the end of the command.
- Note: To view available launch arguments, add a