Skip to content

Commit

Permalink
Docs / minimal CI update for Humble (open-rmf#215)
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Della Vedova <[email protected]>
  • Loading branch information
luca-della-vedova authored Sep 13, 2022
1 parent e60bb61 commit ee7edc3
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 26 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,23 @@ on:
jobs:
build_and_test:
name: Nightly build and test
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: deps
uses: ros-tooling/setup-ros@v0.2
uses: ros-tooling/setup-ros@v0.4
with:
required-ros-distributions: galactic
required-ros-distributions: humble
- name: setup clang
run: |
sudo apt update && sudo apt install -y clang lldb lld
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100
- uses: actions/checkout@v2
- name: build_and_test
uses: ros-tooling/[email protected]
env:
QT_QPA_PLATFORM: offscreen
with:
target-ros2-distro: galactic
target-ros2-distro: humble
# build all packages listed in the meta package
package-name: |
rmf_utils
Expand All @@ -37,18 +41,18 @@ jobs:
rmf_visualization_rviz2_plugins
rmf_visualization_schedule
rmf_building_sim_common
rmf_building_sim_gazebo_plugins
rmf_building_sim_ignition_plugins
rmf_building_sim_gz_plugins
rmf_building_sim_gz_classic_plugins
rmf_robot_sim_common
rmf_robot_sim_gazebo_plugins
rmf_robot_sim_ignition_plugins
rmf_robot_sim_gz_plugins
rmf_robot_sim_gz_classic_plugins
rmf_building_map_tools
rmf_traffic_editor
rmf_traffic_editor_assets
rmf_traffic_editor_test_maps
rmf_demos
rmf_demos_gz
rmf_demos_ign
rmf_demos_gz_classic
rmf_demos_assets
rmf_demos_dashboard_resources
rmf_demos_maps
Expand Down
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Stage 1 - Dependencies
#-----------------------

FROM ros:galactic AS builder
FROM ros:humble AS builder

RUN apt-get update \
&& apt-get install -y \
Expand All @@ -11,10 +11,11 @@ RUN apt-get update \
git \
python3-colcon-common-extensions \
python3-vcstool \
qt5-default \
wget \
python3-pip \
clang lldb lld \
&& pip3 install flask-socketio fastapi uvicorn \
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100 \
&& rm -rf /var/lib/apt/lists/*

# setup keys
Expand All @@ -38,9 +39,6 @@ RUN vcs import src < rmf.repos \
&& rosdep update \
&& rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO -yr \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install -y ignition-edifice \
&& rm -rf /var/lib/apt/lists/*

#-----------------
# Stage 2 - build
Expand Down
70 changes: 63 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,49 @@ These are the current Open-RMF binary releases available:
| ----------- | -------------------------------------------------------------------------------- | ---------------------------------------------------- | ----------------------- |
| 21.09 |  [Installation instructions](https://github.com/open-rmf/rmf/tree/release/21.09) | Ubuntu 20.04, Ubuntu 21.09, RHEL 8 (deployment only) | Foxy, Galactic |

## Install ROS 2 Humble

First, please follow the installation instructions for ROS 2 Humble.
If you are on an Ubuntu 22.04 LTS machine (as recommended), [here is the binary install page for ROS 2 Humble on Ubuntu 22.04](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html).

## Setup Gazebo repositories

Setup your computer to accept Gazebo packages from packages.osrfoundation.org.

```bash
sudo apt update
sudo apt install -y wget
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
```

## Binary install

Latest OpenRMF binary packages are available for Ubuntu Jammy 22.04 for the `Humble` and `Rolling` releases of ROS 2. Older releases are also available on Ubuntu Focal 20.04 for `Foxy` and `Galactic`. Most OpenRMF packages have the prefix `rmf` on their name, therefore, you can find them by them by searching for the pattern `ros-<ro2distro>-rmf`, e.g., for humble it would be:

```bash
apt-cache search ros-humble-rmf
```

### RMF Demos

A good way to install the `rmf` set of packages in one go is to install the one of the main [RMF Demos](https://github.com/open-rmf/rmf_demos) packages. This will pull all the rest of the OpenRMF packages as a dependency. The core of RMF demos is contained on the `rmf_demos` package. However, if you want to install it with simulation support, you should install the `rmf_demos_gz` or `rmf_demos_gz_classic` package which come with Gazebo or Gazebo Classic support respectively. As an example, to install the ROS 2 Humble release with Gazebo support package, you would run:

```bash
sudo apt install ros-humble-rmf-demos-gz-classic
```

## Building from sources

If you want to get the latest developments you might want to install from sources and compile OpenRMF yourself.

### Additional Dependencies

Install all non-ROS dependencies of OpenRMF packages,

```bash
sudo apt update && sudo apt install \
git cmake python3-vcstool curl \
qt5-default \
-y
python3 -m pip install flask-socketio fastapi uvicorn
sudo apt-get install python3-colcon*
Expand Down Expand Up @@ -62,23 +95,46 @@ Ensure all ROS 2 prerequisites are fulfilled,
you can subsutitute your distro name for `<your ros distro>`

Example:
for `galactic`
for `humble`

```bash
cd ~/rmf_ws
rosdep install --from-paths src --ignore-src --rosdistro galactic -y
rosdep install --from-paths src --ignore-src --rosdistro humble -y
```

### Compiling Instructions

> NOTE: Due to newer changes in the source build, there might be conflicts and compilation errors with older header files installed by the binaries. Please remove the binary installations before building from source, using `sudo apt remove ros-galactic-rmf*`.
> NOTE: Due to newer changes in the source build, there might be conflicts and compilation errors with older header files installed by the binaries. Please remove the binary installations before building from source, using `sudo apt remove ros-humble-rmf*`.
Compiling on `Ubuntu 22.04`:

Compiling on `Ubuntu 20.04`:
#### Install clang

```bash
sudo apt update
sudo apt install clang lldb lld
```

**NOTE: We strongly recommend compiling Open-RMF packages with `clang` as compiler and `lld` as linker.**

#### Compile using clang

Update colcon mixin which is a one time step:

```bash
colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
colcon mixin update default
```

Compile the workspace:

```bash
cd ~/rmf_ws
source /opt/ros/<your ros distro>/setup.bash
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
source /opt/ros/humble/setup.bash

export CXX=clang++
export CX=clang
colcon build --mixin "release lld"
```

> NOTE: The first time the build occurs, many simulation models will be downloaded from Ignition Fuel to populate the scene when the simulation is run.
Expand Down
5 changes: 0 additions & 5 deletions rmf.repos
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,3 @@ repositories:
type: git
url: https://github.com/open-rmf/pybind11_json_vendor.git
version: main
thirdparty/ros_ign:
type: git
url: https://github.com/ignitionrobotics/ros_ign.git
version: galactic

0 comments on commit ee7edc3

Please sign in to comment.