From 2326af861fa206e692ba6d03cd607d9fa47703d1 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 8 Sep 2022 12:32:11 +0800 Subject: [PATCH 1/5] Minimal actions / docs update for Humble Signed-off-by: Luca Della Vedova --- .github/workflows/nightly.yaml | 22 +++++++------ Dockerfile | 6 +--- README.md | 58 ++++++++++++++++++++++++++++++---- rmf.repos | 5 --- 4 files changed, 65 insertions(+), 26 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 295dffad..8b44dc7b 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -8,19 +8,23 @@ on: jobs: build_and_test: name: Nightly build and test - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest 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/action-ros-ci@v0.2 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 @@ -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 diff --git a/Dockerfile b/Dockerfile index 62865976..1dd7bf90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ @@ -11,7 +11,6 @@ RUN apt-get update \ git \ python3-colcon-common-extensions \ python3-vcstool \ - qt5-default \ wget \ python3-pip \ && pip3 install flask-socketio fastapi uvicorn \ @@ -38,9 +37,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 diff --git a/README.md b/README.md index 1ab7f1c2..353e6b9d 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,42 @@ 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--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, @@ -28,7 +62,6 @@ 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* @@ -62,23 +95,34 @@ Ensure all ROS 2 prerequisites are fulfilled, you can subsutitute your distro name for `` 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`: + +#### Install clang + +```bash +sudo apt update +sudo apt install clang lldb lld +``` + +**NOTE: RMF does not support building on gcc.** -Compiling on `Ubuntu 20.04`: +#### Compile using clang ```bash cd ~/rmf_ws -source /opt/ros//setup.bash -colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release +source /opt/ros/humble/setup.bash +CXX=clang++ LDFLAGS='-fuse-ld=lld' colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release ``` > 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. diff --git a/rmf.repos b/rmf.repos index bc308d28..18ece443 100644 --- a/rmf.repos +++ b/rmf.repos @@ -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 - From f2bb5afdff0082c203314eabcaf2eb18e2a8adff Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 8 Sep 2022 12:35:37 +0800 Subject: [PATCH 2/5] Change to explicit ubuntu jammy Signed-off-by: Luca Della Vedova --- .github/workflows/nightly.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 8b44dc7b..bd09e07e 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -8,7 +8,7 @@ on: jobs: build_and_test: name: Nightly build and test - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: deps uses: ros-tooling/setup-ros@v0.4 From 6afe9d0f176dea8927e75b1b9ea81a12d6316d52 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 8 Sep 2022 15:29:46 +0800 Subject: [PATCH 3/5] Change to clang Signed-off-by: Luca Della Vedova --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1dd7bf90..5d215a0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,9 @@ RUN apt-get update \ python3-vcstool \ wget \ python3-pip \ + clang-13 lldb-13 lld-13 \ && pip3 install flask-socketio fastapi uvicorn \ + && update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-13 100; \ && rm -rf /var/lib/apt/lists/* # setup keys From 7ed6167dc17dbdb673415ad7ad8512cd151c59a5 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 8 Sep 2022 15:34:57 +0800 Subject: [PATCH 4/5] Fix semicolon Signed-off-by: Luca Della Vedova --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5d215a0b..9abad09b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update \ python3-pip \ clang-13 lldb-13 lld-13 \ && pip3 install flask-socketio fastapi uvicorn \ - && update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-13 100; \ + && update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-13 100 \ && rm -rf /var/lib/apt/lists/* # setup keys From f7dc7c43e2e0b7aed5a794ba37b0fc9e386e4b87 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Thu, 8 Sep 2022 18:10:02 +0800 Subject: [PATCH 5/5] Address review feedback Signed-off-by: Luca Della Vedova --- Dockerfile | 4 ++-- README.md | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9abad09b..f3951844 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,9 @@ RUN apt-get update \ python3-vcstool \ wget \ python3-pip \ - clang-13 lldb-13 lld-13 \ + clang lldb lld \ && pip3 install flask-socketio fastapi uvicorn \ - && update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-13 100 \ + && update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100 \ && rm -rf /var/lib/apt/lists/* # setup keys diff --git a/README.md b/README.md index 353e6b9d..e112e290 100644 --- a/README.md +++ b/README.md @@ -115,14 +115,26 @@ sudo apt update sudo apt install clang lldb lld ``` -**NOTE: RMF does not support building on gcc.** +**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/humble/setup.bash -CXX=clang++ LDFLAGS='-fuse-ld=lld' colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release + +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.