Skip to content

Commit

Permalink
Port to harmonic (#206)
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>
Co-authored-by: Grey <grey@openrobotics.org>
Co-authored-by: Michael X. Grey <mxgrey@intrinsic.ai>
  • Loading branch information
3 people authored and xiyuoh committed Jun 19, 2024
1 parent 59fe1b9 commit f4844fe
Show file tree
Hide file tree
Showing 33 changed files with 57 additions and 577 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ 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
dist-matrix: '[{"ros_distribution": "rolling", "ubuntu_distribution": "jammy"}]'
dist-matrix: '[{"ros_distribution": "rolling", "ubuntu_distribution": "noble"}]'
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
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def update_loop():

# Connect to the extra ROS2 topics that are relevant for the adapter
connections = ros_connections(node, robots, fleet_handle)
connections # Avoid unused variable warning

# Create executor for the command handle node
rclpy_executor = rclpy.executors.SingleThreadedExecutor()
Expand Down
14 changes: 6 additions & 8 deletions rmf_demos_fleet_adapter/rmf_demos_fleet_adapter/manage_lane.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import argparse
import asyncio
import sys

import rclpy
from rclpy.duration import Duration
import rclpy.node
from rclpy.qos import QoSDurabilityPolicy as Durability
from rclpy.qos import QoSHistoryPolicy as History
from rclpy.qos import QoSProfile
from rclpy.qos import QoSReliabilityPolicy as Reliability
import rmf_adapter
import rmf_adapter.vehicletraits as traits
import rmf_adapter.geometry as geometry
import rmf_adapter.vehicletraits as traits

from rmf_fleet_msgs.msg import LaneRequest

import argparse
import threading
import sys
import asyncio


def main(argv=sys.argv):
rclpy.init(args=argv)
Expand Down Expand Up @@ -125,7 +123,7 @@ def main(argv=sys.argv):
request.close_lanes = lane_indices
request.fleet_name = args.fleet

node = rclpy.node.Node(f'manage_lane')
node = rclpy.node.Node('manage_lane')

transient_qos = QoSProfile(
history=History.KEEP_LAST,
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>
Loading

0 comments on commit f4844fe

Please sign in to comment.