A Rust-based coordination prototype for collision avoidance among agents following predefined paths.
A centralized monitor receives agent state over RabbitMQ, detects geometric intersections, and instructs agents to stop or resume. A REST API exposes the monitor's current view of each agent.
Robot 1 ----\
Robot 2 -----\ RabbitMQ +-------------------+
Robot 3 ------+--------------------->| Collision monitor |
Robot 4 -----/ +---------+---------+
|
v
REST state API
monitor— ingests state updates, detects collisions, and publishes control actionsrobot— simulates an agent moving on a predefined routeexecution_scripts— Docker and RabbitMQ setup/cleanup scripts
- Agents are represented as rectangles.
- Paths are predetermined.
- A collision is a geometric intersection between two agent rectangles.
- Supported control actions are
StopandResume.
Prerequisites:
- Rust
- Docker
- Docker Compose v2
cd execution_scripts
chmod +x run.sh cleanup.sh
./run.shQuery a robot:
curl http://localhost:9000/state/robot1Clean up:
./cleanup.shcd monitor
cargo test- Central monitor is a single coordination point.
- Configuration is currently optimized for four agents.
- Agent generation/configuration should be automated for larger simulations.
- Network delays, stale state, monitor failure, and conflicting control messages require additional handling.
- This is a coordination experiment, not a certified robotics safety controller.