Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to harmonic #206

Merged
merged 17 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
rmf_demos_dashboard_resources
rmf_demos_fleet_adapter
rmf_demos_gz
rmf_demos_gz_classic
rmf_demos_maps
rmf_demos_panel
rmf_demos_tasks
Expand Down
34 changes: 14 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ This repository contains demonstrations of the above mentioned capabilities of R

These demos were built and tested on

* [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/)
* [Ubuntu 24.04 LTS](https://releases.ubuntu.com/24.04/)

* [ROS 2 - Humble](https://docs.ros.org/en/humble/Releases/Release-Humble-Hawksbill.html)
* [ROS 2 - Jazzy](https://docs.ros.org/en/jazzy/Releases/Release-Jazzy-Jalisco.html)

* [Gazebo Fortress](https://gazebosim.org/docs/fortress)
> Note: RMF is fully supported on ROS 2 Foxy as well
* [Gazebo Harmonic](https://gazebosim.org/docs/harmonic)
> Note: RMF is fully supported on ROS 2 Humble and Iron as well, but those will require [ros_gz](https://github.com/gazebosim/ros_gz) to be built from source.

## Installation
Instructions can be found [here](https://github.com/open-rmf/rmf).
Expand Down Expand Up @@ -54,11 +54,6 @@ By specifying `server_uri`, the fleetadapter will update `rmf-web` `api-server`
* [Campus World](#Campus-World)
* [Manufacturing & Logistics World](#Manufacturing-&-Logistics-World)

> Note: When running the demos on Ubuntu 18.04 (not officially supported), you are required to explicitly supply gazebo_version launch argument. Eg:
ros2 launch rmf_demos_gz_classic office.launch.xml gazebo_version:=9

> To run the demos using Ignition instead of Gazebo, change the commands from `ros2 launch rmf_demos_gz_classic [...]` to `ros2 launch rmf_demos_gz [...]`

**RMF Panel**
![](../media/RMF_Panel.png?raw=true)

Expand All @@ -77,7 +72,7 @@ There are two main modes of submitting tasks to Open-RMF via the Panel:

`task_state_uptates` are now published via websocket. To display task states on `rmf-panel`, specify `server_uri:="ws://localhost:7878"` during ros2 launch. Example:
```
ros2 launch rmf_demos_gz_classic office.launch.xml server_uri:="ws://localhost:7878"
ros2 launch rmf_demos_gz office.launch.xml server_uri:="ws://localhost:7878"
```

This will let Open-RMF (websocket clients) to publish their states to port `7878`. In this case, rmf-panel's `api_simple_server` is the websocket server.
Expand All @@ -97,7 +92,7 @@ To launch the world and the schedule visualizer,

```bash
source ~/rmf_ws/install/setup.bash
ros2 launch rmf_demos_gz_classic hotel.launch.xml
ros2 launch rmf_demos_gz hotel.launch.xml

# Or, run with ignition simulator
ros2 launch rmf_demos_gz hotel.launch.xml
Expand Down Expand Up @@ -131,7 +126,7 @@ An indoor office environment for robots to navigate around. It includes a bevera

```bash
source ~/rmf_demos_ws/install/setup.bash
ros2 launch rmf_demos_gz_classic office.launch.xml
ros2 launch rmf_demos_gz office.launch.xml

# Or, run with ignition simulator
ros2 launch rmf_demos_gz office.launch.xml
Expand Down Expand Up @@ -172,7 +167,7 @@ In the airport world, we introduce a new task type to rmf: `Clean`. To launch th

```bash
source ~/rmf_ws/install/setup.bash
ros2 launch rmf_demos_gz_classic airport_terminal.launch.xml
ros2 launch rmf_demos_gz airport_terminal.launch.xml
```

Open [RMF Panel](https://open-rmf.github.io/rmf-panel-js/). Load the [airport_terminal_tasks.json](https://github.com/open-rmf/rmf_demos/blob/main/rmf_demos_panel/task_lists/airport_terminal_tasks.json) list and click submit to begin a collection of loop, delivery and cleaning tasks.
Expand All @@ -186,7 +181,7 @@ ros2 run rmf_demos_tasks dispatch_clean -cs zone_3 --use_sim_time

To see crowd simulation in action, enable crowd sim by:
```bash
ros2 launch rmf_demos_gz_classic airport_terminal.launch.xml use_crowdsim:=1
ros2 launch rmf_demos_gz airport_terminal.launch.xml use_crowdsim:=1
```

Non-autonomous vehicles can also be integrated with Open-RMF provided their positions can be localized in the world. This may be of value at facilities where space is shared by autonomous robots as well as manually operated vehicles such as forklifts or transporters. In this demo, we can introduce a vehicle (caddy) which can be driven around through keyboard/joystick teleop. In Open-RMF nomenclature, this vehicle is classified as a `read_only` type, ie, Open-RMF can only infer its position in the world but does not have control over its motion. Here, the goal is to have other controllable robots avoid this vehicle's path by replanning their routes if needed. The model is fitted with a plugin which generates a prediction of the vehicle's path based on its current heading. It is configured to occupy the same lanes as the `tinyRobot` robots. Here, a `read_only_fleet_adapter` submits the prediction from the plugin to the Open-RMF schedule.
Expand All @@ -198,7 +193,6 @@ Run `teleop_twist_keyboard` to control the `caddy` with your keyboard:
# Default launch with gazebo
ros2 run teleop_twist_keyboard teleop_twist_keyboard

# if launched with the Ignition simulator
ros2 launch rmf_demos_gz airport_terminal_caddy.launch.xml
```

Expand All @@ -219,7 +213,7 @@ To launch the world and the schedule visualizer,

```bash
source ~/rmf_ws/install/setup.bash
ros2 launch rmf_demos_gz_classic clinic.launch.xml
ros2 launch rmf_demos_gz clinic.launch.xml
```

Open [RMF Panel](https://open-rmf.github.io/rmf-panel-js/). Load the [clinic_tasks.json](https://github.com/open-rmf/rmf_demos/blob/main/rmf_demos_panel/task_lists/clinic_tasks.json) list and click submit to begin a collection of loop and delivery tasks.
Expand Down Expand Up @@ -296,20 +290,20 @@ Open-RMF can also manage fleets whose API or fleet managers only offer pause and

#### Triple-H scenario:
```bash
$ ros2 launch rmf_demos_gz_classic triple_H.launch.xml
$ ros2 launch rmf_demos_gz triple_H.launch.xml
(new terminal) $ ros2 launch rmf_demos the_pedigree.launch.xml
```
#### Battle Royale Scenario:

```bash
$ ros2 launch rmf_demos_gz_classic battle_royale.launch.xml
$ ros2 launch rmf_demos_gz battle_royale.launch.xml
(new terminal) $ ros2 launch rmf_demos battle_go.launch.xml
```

#### Office Scenario:
Note that `tinyRobot1` is a standard "full control" robot, while `tinyRobot2` "traffic light" robot.
```bash
$ ros2 launch rmf_demos_gz_classic office_mock_traffic_light.launch.xml
$ ros2 launch rmf_demos_gz office_mock_traffic_light.launch.xml
(new terminal) $ ros2 launch rmf_demos office_traffic_light_test.launch.xml
```

Expand All @@ -322,7 +316,7 @@ $ ros2 launch rmf_demos_gz_classic office_mock_traffic_light.launch.xml
- Command lines:
```bash
# run hotel world with lift_watch_dog enabled
ros2 launch rmf_demos_gz_classic hotel.launch.xml enable_experimental_lift_watchdog:=1
ros2 launch rmf_demos_gz hotel.launch.xml enable_experimental_lift_watchdog:=1

## On a separate terminal, set lift as crowded
ros2 launch rmf_demos experimental_crowded_lift.launch.xml
Expand Down
6 changes: 2 additions & 4 deletions rmf_demos_gz/launch/airport_terminal.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
<launch>
<arg name="use_sim_time" default="true"/>
<arg name="failover_mode" default="false"/>
<arg name="use_tpe" default="false"/>
<arg name="ignition_version" default='6'/>
<arg name="gazebo_version" default='8'/>

<!-- Common launch -->
<include file="$(find-pkg-share rmf_demos)/airport_terminal.launch.xml">
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="failover_mode" value="$(var failover_mode)"/>
<arg name="use_tpe" value="$(var use_tpe)"/>
</include>

<!-- Simulation launch -->
<include file="$(find-pkg-share rmf_demos_gz)/simulation.launch.xml">
<arg name="map_name" value="airport_terminal" />
<arg name="ignition_version" value="$(var ignition_version)" />
<arg name="gazebo_version" value="$(var gazebo_version)" />
</include>

</launch>
6 changes: 2 additions & 4 deletions rmf_demos_gz/launch/battle_royale.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@

<launch>
<arg name="use_sim_time" default="true"/>
<arg name="use_tpe" default="false"/>
<arg name="ignition_version" default='6'/>
<arg name="gazebo_version" default='8'/>
<arg name="use_traffic_light" default="false"/>

<!-- Common launch -->
<include file="$(find-pkg-share rmf_demos)/battle_royale.launch.xml">
<arg name="use_traffic_light" value="$(var use_traffic_light)"/>
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="use_tpe" value="$(var use_tpe)"/>
</include>

<!-- Simulation launch -->
<include file="$(find-pkg-share rmf_demos_gz)/simulation.launch.xml">
<arg name="map_name" value="battle_royale" />
<arg name="ignition_version" value="$(var ignition_version)" />
<arg name="gazebo_version" value="$(var gazebo_version)" />
</include>

</launch>
6 changes: 2 additions & 4 deletions rmf_demos_gz/launch/campus.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
<launch>
<arg name="use_sim_time" default="true"/>
<arg name="failover_mode" default="false"/>
<arg name="use_tpe" default="false"/>
<arg name="ignition_version" default='6'/>
<arg name="gazebo_version" default='8'/>

<!-- Common launch -->
<include file="$(find-pkg-share rmf_demos)/campus.launch.xml">
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="failover_mode" value="$(var failover_mode)"/>
<arg name="use_tpe" value="$(var use_tpe)"/>
</include>

<!-- Simulation launch -->
<include file="$(find-pkg-share rmf_demos_gz)/simulation.launch.xml">
<arg name="map_name" value="campus" />
<arg name="ignition_version" value="$(var ignition_version)" />
<arg name="gazebo_version" value="$(var gazebo_version)" />
</include>

</launch>
6 changes: 2 additions & 4 deletions rmf_demos_gz/launch/clinic.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
<launch>
<arg name="use_sim_time" default="true"/>
<arg name="failover_mode" default="false"/>
<arg name="use_tpe" default="false"/>
<arg name="ignition_version" default='6'/>
<arg name="gazebo_version" default='8'/>

<!-- Common launch -->
<include file="$(find-pkg-share rmf_demos)/clinic.launch.xml">
<arg name="use_sim_time" value="true"/>
<arg name="failover_mode" value="$(var failover_mode)"/>
<arg name="use_tpe" value="$(var use_tpe)"/>
</include>

<!-- Simulation launch -->
<include file="$(find-pkg-share rmf_demos_gz)/simulation.launch.xml">
<arg name="map_name" value="clinic" />
<arg name="ignition_version" value="$(var ignition_version)" />
<arg name="gazebo_version" value="$(var gazebo_version)" />
</include>

</launch>
6 changes: 2 additions & 4 deletions rmf_demos_gz/launch/hotel.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@
<launch>
<arg name="use_sim_time" default="true"/>
<arg name="failover_mode" default="false"/>
<arg name="use_tpe" default="false"/>
<arg name="ignition_version" default='6'/>
<arg name="gazebo_version" default='8'/>

<!-- Common launch -->
<include file="$(find-pkg-share rmf_demos)/hotel.launch.xml">
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="failover_mode" value="$(var failover_mode)"/>
<arg name="use_tpe" value="$(var use_tpe)"/>
</include>

<!-- Simulation launch -->
<include file="$(find-pkg-share rmf_demos_gz)/simulation.launch.xml">
<arg name="map_name" value="hotel" />
<arg name="ignition_version" value="$(var ignition_version)" />
<arg name="gazebo_version" value="$(var gazebo_version)" />
</include>
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<group>
<!-- Launch keyboard control for Caddy -->
<node pkg="teleop_twist_keyboard" exec="teleop_twist_keyboard" output="screen" launch-prefix="gnome-terminal --">
<remap from="/cmd_vel" to="/model/caddy/cmd_vel"/> <!-- remap topic name for the diff_drive ignition plugin -->
<remap from="/cmd_vel" to="/model/caddy/cmd_vel"/> <!-- remap topic name for the diff_drive gazebo plugin -->
</node>
<!-- Let diff drive ignition plugin read from /model/caddy/cmd_vel topic published to by the teleop_twist_keyboard -->
<node pkg="ros_gz_bridge" exec="parameter_bridge" args="/model/caddy/cmd_vel@geometry_msgs/msg/Twist@ignition.msgs.Twist"></node>
<!-- Let diff drive gazebo plugin read from /model/caddy/cmd_vel topic published to by the teleop_twist_keyboard -->
<node pkg="ros_gz_bridge" exec="parameter_bridge" args="/model/caddy/cmd_vel@geometry_msgs/msg/Twist@gz.msgs.Twist"></node>
</group>
</launch>
6 changes: 2 additions & 4 deletions rmf_demos_gz/launch/office.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
<launch>
<arg name="use_sim_time" default="true"/>
<arg name="failover_mode" default="false"/>
<arg name="use_tpe" default="false"/>
<arg name="ignition_version" default='6'/>
<arg name="gazebo_version" default='8'/>

<!-- Common launch -->
<include file="$(find-pkg-share rmf_demos)/office.launch.xml">
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="failover_mode" value="$(var failover_mode)"/>
<arg name="use_tpe" value="$(var use_tpe)"/>
</include>

<!-- Simulation launch -->
<include file="$(find-pkg-share rmf_demos_gz)/simulation.launch.xml">
<arg name="map_name" value="office" />
<arg name="ignition_version" value="$(var ignition_version)" />
<arg name="gazebo_version" value="$(var gazebo_version)" />
</include>

</launch>
6 changes: 2 additions & 4 deletions rmf_demos_gz/launch/office_mock_traffic_light.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@

<launch>
<arg name="use_sim_time" default="true"/>
<arg name="use_tpe" default="false"/>
<arg name="ignition_version" default='6'/>
<arg name="gazebo_version" default='8'/>

<!-- Common launch -->
<include file="$(find-pkg-share rmf_demos)/office_mock_traffic_light.launch.xml">
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="use_tpe" value="$(var use_tpe)"/>
</include>

<!-- Simulation launch -->
<include file="$(find-pkg-share rmf_demos_gz)/simulation.launch.xml">
<arg name="map_name" value="office" />
<arg name="ignition_version" value="$(var ignition_version)" />
<arg name="gazebo_version" value="$(var gazebo_version)" />
</include>

</launch>
40 changes: 12 additions & 28 deletions rmf_demos_gz/launch/simulation.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,29 @@
<arg name="map_package" default="rmf_demos_maps" description="Name of the map package" />
<arg name="map_name" description="Name of the rmf_demos map to simulate" />
<arg name="use_crowdsim" default='0'/>
<arg name="use_tpe" default='0'/>
<arg name="ignition_version" default='6'/>
<arg name="gazebo_version" default='8'/>

<let name="world_path" value="$(find-pkg-share $(var map_package))/maps/$(var map_name)_ign/$(var map_name).world" />
<let name="model_path" value="$(find-pkg-share $(var map_package))/maps/$(var map_name)/models:$(find-pkg-share $(var map_package))/maps/$(var map_name)_ign/models:$(find-pkg-share rmf_demos_assets)/models:$(env HOME)/.gazebo/models" />
<let name="world_path" value="$(find-pkg-share $(var map_package))/maps/$(var map_name)/$(var map_name).world" />
<let name="model_path" value="$(find-pkg-share $(var map_package))/maps/$(var map_name)/models:$(find-pkg-share $(var map_package))/maps/$(var map_name)/models:$(find-pkg-share rmf_demos_assets)/models:$(env HOME)/.gazebo/models" />
<let name="plugin_path" value="$(find-pkg-prefix rmf_robot_sim_gz_plugins)/lib/rmf_robot_sim_gz_plugins:$(find-pkg-prefix rmf_building_sim_gz_plugins)/lib/rmf_building_sim_gz_plugins" />
<!-- Use TPE if` use_tpe` is set to true-->
<!-- TODO use the variable below and remove code duplication (second ign gazebo command) when substitution in XML with ignition gazebo works -->
<let name="tpe_engine" value="\-\-physics-engine ignition-physics-tpe-plugin" />
<let name="tpe_engine" unless="$(var use_tpe)" value="" />

<!-- Use crowd sim if `use_crowdsim` is true-->
<let name="menge_resource_path" if="$(var use_crowdsim)" value="$(find-pkg-share $(var map_package))/maps/$(var map_name)/config_resource"/>
<let name="menge_resource_path" unless="$(var use_crowdsim)" value="" />

<let name="ign_headless" if="$(var headless)" value="-s"/>
<let name="ign_headless" unless="$(var headless)" value="" />
<let name="gz_headless" if="$(var headless)" value="-s"/>
<let name="gz_headless" unless="$(var headless)" value="" />

<group unless="$(var use_tpe)">
<executable cmd="ign gazebo --force-version $(var ignition_version) $(var ign_headless) $(var tpe_engine) -r -v 4 $(var world_path)" output="both">
<env name="IGN_GAZEBO_RESOURCE_PATH" value="$(var model_path):$(var world_path)" />
<env name="IGN_GAZEBO_SYSTEM_PLUGIN_PATH" value="$(var plugin_path)"/>
<env name="IGN_GUI_PLUGIN_PATH" value="$(var plugin_path)"/>
<env name="MENGE_RESOURCE_PATH" value="$(var menge_resource_path)"/>
</executable>
</group>

<group if ="$(var use_tpe)">
<executable cmd="ign gazebo $(var ign_headless) --physics-engine ignition-physics-tpe-plugin -r -v 4 $(var world_path)" output="both">
<env name="IGN_GAZEBO_RESOURCE_PATH" value="$(var model_path):$(var world_path)" />
<env name="IGN_GAZEBO_SYSTEM_PLUGIN_PATH" value="$(var plugin_path)"/>
<env name="IGN_GUI_PLUGIN_PATH" value="$(var plugin_path)"/>
<env name="MENGE_RESOURCE_PATH" value="$(var menge_resource_path)"/>
</executable>
</group>
<executable cmd="gz sim --force-version $(var gazebo_version) $(var gz_headless) -r -v 3 $(var world_path)" output="both">
<env name="GZ_SIM_RESOURCE_PATH" value="$(var model_path):$(var world_path)" />
<env name="GZ_SIM_SYSTEM_PLUGIN_PATH" value="$(var plugin_path)"/>
<env name="GZ_GUI_PLUGIN_PATH" value="$(var plugin_path)"/>
<env name="MENGE_RESOURCE_PATH" value="$(var menge_resource_path)"/>
</executable>

<!-- ros_gz bridge for simulation clock -->
<node pkg="ros_gz_bridge" exec="parameter_bridge"
args="/clock@rosgraph_msgs/msg/Clock[ignition.msgs.Clock"
args="/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock"
/>

</launch>
6 changes: 2 additions & 4 deletions rmf_demos_gz/launch/triple_H.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@

<launch>
<arg name="use_sim_time" default="true"/>
<arg name="use_tpe" default="false"/>
<arg name="ignition_version" default='6'/>
<arg name="gazebo_version" default='8'/>

<!-- Common launch -->
<include file="$(find-pkg-share rmf_demos)/triple_H.launch.xml">
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="use_tpe" value="$(var use_tpe)"/>
</include>

<!-- Simulation launch -->
<include file="$(find-pkg-share rmf_demos_gz)/simulation.launch.xml">
<arg name="map_name" value="triple_H" />
<arg name="ignition_version" value="$(var ignition_version)" />
<arg name="gazebo_version" value="$(var gazebo_version)" />
</include>

</launch>
3 changes: 2 additions & 1 deletion rmf_demos_gz/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

<exec_depend>teleop_twist_keyboard</exec_depend>
<exec_depend>launch_xml</exec_depend>
<exec_depend>ignition-fortress</exec_depend>
<exec_depend>ros2launch</exec_depend>
<exec_depend>gz_sim_vendor</exec_depend>

<exec_depend>ros_gz_bridge</exec_depend>

Expand Down
Loading
Loading