-
Notifications
You must be signed in to change notification settings - Fork 59
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
Update docker image to humble #165
base: main
Are you sure you want to change the base?
Changes from all commits
52f636a
72f9c7f
7194afd
dcfef13
6fb3190
d51a65e
5675d94
207ca29
410ce84
6390c07
cca072c
6745045
e80b866
4c4b49f
eca8838
592c478
5b49845
a87cb70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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.3 | ||
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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/rmf_deployment_template/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,6 @@ | ||
#----------------------- | ||
# Stage 1 - Dependencies | ||
#----------------------- | ||
FROM ghcr.io/open-rmf/rmf_deployment_template/builder-rmf | ||
|
||
FROM ros:galactic AS builder | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
cmake \ | ||
curl \ | ||
git \ | ||
python3-colcon-common-extensions \ | ||
python3-vcstool \ | ||
qt5-default \ | ||
wget \ | ||
python3-pip \ | ||
&& pip3 install flask-socketio \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# setup keys | ||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2486D2DD83DB69272AFE98867170598AF249743 | ||
|
||
# setup sources.list | ||
RUN . /etc/os-release \ | ||
&& echo "deb http://packages.osrfoundation.org/gazebo/$ID-stable `lsb_release -sc` main" > /etc/apt/sources.list.d/gazebo-latest.list | ||
|
||
RUN mkdir $HOME/rmf_demos_ws | ||
WORKDIR $HOME/rmf_demos_ws | ||
RUN mkdir src | ||
RUN rosdep update --rosdistro $ROS_DISTRO | ||
|
||
# This replaces: wget https://raw.githubusercontent.com/open-rmf/rmf/main/rmf.repos | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
COPY rmf.repos rmf.repos | ||
RUN vcs import src < rmf.repos \ | ||
&& apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& 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 | ||
#----------------- | ||
|
||
# compile rmf_demo_panel gui | ||
# use wget | ||
# RUN npm install --prefix src/demonstrations/rmf_demos/rmf_demos_panel/rmf_demos_panel/static/ \ | ||
# && npm run build --prefix src/demonstrations/rmf_demos/rmf_demos_panel/rmf_demos_panel/static/ | ||
|
||
# colcon compilation | ||
RUN . /opt/ros/$ROS_DISTRO/setup.sh \ | ||
&& colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release | ||
|
||
#---------- | ||
# Stage 3 | ||
#---------- | ||
|
||
# TODO: rosdep doesn't support installing only exec dependencies (https://github.com/ros-infrastructure/rosdep/pull/727) | ||
# When the PR is merged, we can do a multi-stage build and include only whats needed at runtime. | ||
# FROM ros:foxy | ||
# COPY --from=0 /root/rmf/install /opt/rmf | ||
# RUN rosdep ... | ||
# COPY --from=builder /root/rmf/install /opt/rmf | ||
|
||
# cleanup | ||
RUN rm -rf build devel src \ | ||
&& sed -i '$isource "/rmf_demos_ws/install/setup.bash"' /ros_entrypoint.sh | ||
RUN sed -i '$isource "/opt/rmf/install/setup.bash"' /ros_entrypoint.sh | ||
|
||
ENTRYPOINT ["/ros_entrypoint.sh"] | ||
CMD ["bash"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,10 @@ | |
The OpenRMF platform for multi-fleet robot management. | ||
|
||
--- | ||
## Install ROS 2 Galactic | ||
## Install ROS 2 Humble | ||
|
||
First, please follow the installation instructions for ROS 2 Galactic. | ||
If you are on an Ubuntu 20.04 LTS machine (as recommended), [here is the binary install page for ROS 2 Galactic on Ubuntu 20.04](https://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html). | ||
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 | ||
|
||
|
@@ -26,18 +26,18 @@ wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - | |
|
||
## Binary install | ||
|
||
OpenRMF binary packages are available for Ubuntu Focal 20.04 for the `Foxy`, `Galactic` and `Rolling` releases of ROS 2. 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 galatic it would be: | ||
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 galatic it would be: | ||
|
||
```bash | ||
apt-cache search ros-galactic-rmf | ||
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_ign` package which come with gazebo or ignition support respectively. As an example, to install the ROS 2 Galactic release with gazebo support package, you would run: | ||
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_ign` package which come with gazebo or ignition support respectively. As an example, to install the ROS 2 Humble release with gazebo support package, you would run: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once it is finalized (i.e. this is merged) we should probably update this to the Gazebo renaming ( |
||
|
||
```bash | ||
sudo apt install ros-galactic-rmf-demos-gz | ||
sudo apt install ros-humble-rmf-demos-gz | ||
``` | ||
|
||
## Building from sources | ||
|
@@ -76,24 +76,37 @@ mkdir -p ~/rmf_ws/src | |
cd ~/rmf_ws | ||
wget https://raw.githubusercontent.com/open-rmf/rmf/main/rmf.repos | ||
vcs import src < rmf.repos | ||
wget https://raw.githubusercontent.com/open-rmf/rmf/main/rmf-simulation.repos | ||
vcs import src < rmf-simulation.repos | ||
``` | ||
|
||
Ensure all ROS 2 prerequisites are fulfilled, | ||
``` | ||
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 20.04`: | ||
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.** | ||
|
||
Compile using clang | ||
|
||
```bash | ||
cd ~/rmf_ws | ||
source /opt/ros/galactic/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. | ||
|
@@ -106,18 +119,8 @@ Demonstrations of OpenRMF are shown in [rmf_demos](https://github.com/open-rmf/r | |
### Docker Containers | ||
Alternatively, you can run RMF Demos by using [docker](https://docs.docker.com/engine/install/ubuntu/). | ||
|
||
Pull docker image from `open-rmf/rmf` github registry (setup refer [here](https://docs.github.com/en/free-pro-team@latest/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages#authenticating-with-a-personal-access-token)). | ||
|
||
```bash | ||
docker pull ghcr.io/open-rmf/rmf/rmf_demos:latest | ||
docker tag ghcr.io/open-rmf/rmf/rmf_demos:latest rmf:latest | ||
``` | ||
|
||
Run it! | ||
|
||
```bash | ||
|
||
docker run -it --network host rmf:latest bash -c "export ROS_DOMAIN_ID=9; ros2 launch rmf_demos_gz office.launch.xml headless:=1" | ||
docker run -it --network host ghcr.io/open-rmf/rmf/rmf_demos:latest bash -c "export ROS_DOMAIN_ID=9; ros2 launch rmf_demos_gz office.launch.xml headless:=1" | ||
``` | ||
This will run `rmf_demos` in headless mode. Open [this link](https://open-rmf.github.io/rmf-panel-js/) with a browser to start a task. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
cd "$(dirname $0)" | ||
|
||
git clone --depth 1 -b build/rmf https://github.com/open-rmf/rmf_deployment_template.git | ||
pushd rmf_deployment_template | ||
docker build -t ghcr.io/open-rmf/rmf_deployment_template/builder-rosdep -f rmf/builder-rosdep.Dockerfile . | ||
docker build -t ghcr.io/open-rmf/rmf_deployment_template/builder-rmf -f rmf/builder-rmf.Dockerfile . | ||
popd | ||
|
||
docker build -t ghcr.io/open-rmf/rmf/rmf_demos - < Dockerfile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
repositories: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wondering if we should keep the .repos file here or use the ones in the deployment repo, for example for simulation and main rmf. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the repos file should not be the same. These repos file here tracks the branch which makes it very problematic for reproducible builds and deployments. That does mean we will have to maintain multiple copies of each repos file 😞 . |
||
rmf/rmf_simulation: | ||
type: git | ||
url: https://github.com/open-rmf/rmf_simulation.git | ||
version: main | ||
rmf/rmf_internal_msgs: | ||
type: git | ||
url: https://github.com/open-rmf/rmf_internal_msgs.git | ||
version: main | ||
rmf/rmf_building_map_msgs: | ||
type: git | ||
url: https://github.com/open-rmf/rmf_building_map_msgs.git | ||
thirdparty/menge_vendor: | ||
type: git | ||
url: https://github.com/open-rmf/menge_vendor.git |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +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 | ||
Comment on lines
-70
to
-73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we are going for a split of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit,
for galatic
->for humble