# OpenRMF Example

> Testing navigability in OpenRMF

---

Site [llms.txt](/llms.txt)

---

# OpenRMF Example

[Demo available here.](https://app.artefacts.com/artefacts-demos/open-rmf-demo/). Note: Registration required.

## Overview

[OpenRMF](https://www.open-rmf.org/) is a framework for multi robot interoperability in large buildings. One common configuration task in OpenRMF is to set up Places and navigation lanes for the robots in a building.

Here we run the OpenRMF demo on [the `office` world.](https://github.com/open-rmf/rmf_demos?tab=readme-ov-file#office-world)

As shown below, this map has 14 waypoints where a robot can go. It also comes with 2 "tinyRobot"s starting on their respective chargers.

![Map of the office world.](/images/example-projects/openrmf/office_map.png)

The goal of this test demo is to send every robot to every waypoint, and assert that it arrives. Failure indicates that a robot is unable to reach a place on the map. 

The test is parametrized to run through all robots and waypoints, resetting the simulation between each run.

![Gif of the robots going everywhere](/images/example-projects/openrmf/map.gif)

## Quick analysis

### "tinyRobot2" going to "patrol_A1"

"tinyRobot2" successfully reached "patrol_A1" in ~40s. The video offers additional information on the how well the test executed.

![](/images/example-projects/openrmf/succ_vid.gif)

![](/images/example-projects/openrmf/succ_run.png)

### "tinyRobot1" going to "patrol_B"

However, "tinyRobot1" could not reach "patrol_B" before the timeout of 120 s. Using the video, we notice that there is a trashcan on the way, so the robot gets stuck on it. The distance graph also points towards the robot being stuck somewhere.

![](/images/example-projects/openrmf/fail_vid.gif)

![](/images/example-projects/openrmf/fail_graph.png)

![](/images/example-projects/openrmf/fail_run.png)

## Data available after the tests

The tests record a few metrics:
- Time to reach the goal (simtime)
- Total distance traveled
- Average speed

The tests record multiple data:
- ROSbag.
- Video of the active robot in Gazebo.
- Graph of:
    - The XY position.
    - The distance to the goal.
    - The distance traveled over time.
- Custom data dump from python to record data not available in the ROSbag.
- Debug log from the tests files.
- (Optional) stdout of the simulation and OpenRMF terminal.
