Skip to content

Commit 771f678

Browse files
evan-palmerdependabot[bot]amarburg
authored
Jazzy ROS image is now based on "noble" (backport #220) (#243)
* Bump docker/login-action from 3.1.0 to 3.2.0 (#172) Bumps [docker/login-action](https://github.com/docker/login-action) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](docker/login-action@v3.1.0...v3.2.0) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump docker/build-push-action from 5.3.0 to 5.4.0 (#175) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.3.0 to 5.4.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v5.3.0...v5.4.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump braces from 3.0.2 to 3.0.3 in /docs (#182) Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](micromatch/braces@3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump docker/build-push-action from 5.4.0 to 6.0.0 (#179) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.4.0 to 6.0.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v5.4.0...v6.0.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump docker/build-push-action from 6.0.0 to 6.1.0 (#187) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.0.0 to 6.1.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v6.0.0...v6.1.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Resolved bug in BlueROV2 Heavy and Heavy Reach launch configurations (#193) * Fixed ardusub_gazebo install and mavros configurations * Remapped controller manager topic to robot state publisher topic * Added missing gstreamer dependency * Added additional resources for USB/IP tutorial (#196) * Bump docker/build-push-action from 6.1.0 to 6.2.0 (#200) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.1.0 to 6.2.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v6.1.0...v6.2.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump docker/build-push-action from 6.2.0 to 6.3.0 (#203) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.2.0 to 6.3.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v6.2.0...v6.3.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump docker/setup-qemu-action from 3.0.0 to 3.1.0 (#204) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](docker/setup-qemu-action@v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump docker/setup-qemu-action from 3.1.0 to 3.2.0 (#205) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](docker/setup-qemu-action@v3.1.0...v3.2.0) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump docker/build-push-action from 6.3.0 to 6.5.0 (#206) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.3.0 to 6.5.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v6.3.0...v6.5.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump docker/login-action from 3.2.0 to 3.3.0 (#207) Bumps [docker/login-action](https://github.com/docker/login-action) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](docker/login-action@v3.2.0...v3.3.0) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix case on "as" in Dockerfile (#214) Co-authored-by: Aaron Marburg <amarburg@uw.edu> * Add xacro as an exec_depend for blue_description (#215) Co-authored-by: Aaron Marburg <amarburg@uw.edu> * Add "robot" container (#221) * Initial commit of _robot container and devcontainer * Add xacro as an exec_depend for blue_description * Update comments * Remove unused Docker stage "blue_src_and_deps" Renamed *.repos --> blue.repos and sim.repos --------- Co-authored-by: Aaron Marburg <amarburg@uw.edu> * Use Gazebo Harmonic (#223) * Update to use Harmonic * Add "third-party" rosdep from OSRF for gazebo deps. * Added comment on "user ROOT" rather than sudo, joined two adjacent apt-get install steps. * Correct error in comment --------- Co-authored-by: Aaron Marburg <amarburg@uw.edu> * Rolling ROS image is now based on "noble" (#220) * Update to use Harmonic * Update main Dockerfile for "noble" base images: - Use the provided user "ubuntu" at UID 1000 - Use a venv for user-installed python packages * Add "third-party" rosdep from OSRF for gazebo deps. * Install cppzmq-dev for Gazebo * Allow pushing to apl-ocean-engineering * Build mavros from source. * Build mavros from source, with patch to fix yaml-cpp linkage * ardupilot script should not activate venv by default. Activate blue venv instead. * Reverse change in docker.yaml action. * Insert comment before arduplot additions to .bashrc * Update username in .devcontainer/ * Replace patches for mavros/mavlink with sed one-liners. * Extend Docker build timeout in github actions to allow for extended arm64 build times. * timeout_minutes should be at job level? * Disabled arm64 build for "robot" Also: * Set python in venv as default Python in dev container * Remove build timeout in github action (which was ignored) * Correctly disable arm64 build. --------- Co-authored-by: Aaron Marburg <amarburg@uw.edu> * Backport #220 into Jazzy * Removed testing image from nvidia-desktop compose script --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Aaron Marburg <amarburg@apl.washington.edu> Co-authored-by: Aaron Marburg <amarburg@uw.edu>
1 parent a5486c2 commit 771f678

File tree

23 files changed

+255
-140
lines changed

23 files changed

+255
-140
lines changed

.devcontainer/nouveau/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM ghcr.io/robotic-decision-making-lab/blue:rolling-desktop
1+
FROM ghcr.io/robotic-decision-making-lab/blue:jazzy-desktop
22

33
# Install ROS dependencies
44
# This is done in a previous stage, but we include it again here in case anyone wants to
55
# add new dependencies during development
6-
ENV USERNAME=blue
6+
ENV USERNAME=ubuntu
77
ENV USER_WORKSPACE=/home/$USERNAME/ws_blue
88
WORKDIR $USER_WORKSPACE
99

.devcontainer/nouveau/devcontainer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "Nouveau Dev Container",
33
"dockerFile": "Dockerfile",
44
"context": "../..",
5-
"workspaceMount": "source=${localWorkspaceFolder},target=/home/blue/ws_blue/src/blue,type=bind",
6-
"workspaceFolder": "/home/blue/ws_blue/src/blue",
7-
"remoteUser": "blue",
5+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/ws_blue/src/blue,type=bind",
6+
"workspaceFolder": "/home/ubuntu/ws_blue/src/blue",
7+
"remoteUser": "ubuntu",
88
"runArgs": [
99
"--network=host",
1010
"--cap-add=SYS_PTRACE",

.devcontainer/nvidia/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM ghcr.io/robotic-decision-making-lab/blue:rolling-desktop-nvidia
1+
FROM ghcr.io/robotic-decision-making-lab/blue:jazzy-desktop-nvidia
22

33
# Install ROS dependencies
44
# This is done in a previous stage, but we include it again here in case anyone wants to
55
# add new dependencies during development
6-
ENV USERNAME=blue
6+
ENV USERNAME=ubuntu
77
ENV USER_WORKSPACE=/home/$USERNAME/ws_blue
88
WORKDIR $USER_WORKSPACE
99

.devcontainer/nvidia/devcontainer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "NVIDIA Dev Container",
33
"dockerFile": "Dockerfile",
44
"context": "../..",
5-
"workspaceMount": "source=${localWorkspaceFolder},target=/home/blue/ws_blue/src/blue,type=bind",
6-
"workspaceFolder": "/home/blue/ws_blue/src/blue",
7-
"remoteUser": "blue",
5+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/ws_blue/src/blue,type=bind",
6+
"workspaceFolder": "/home/ubuntu/ws_blue/src/blue",
7+
"remoteUser": "ubuntu",
88
"runArgs": [
99
"--network=host",
1010
"--cap-add=SYS_PTRACE",

.devcontainer/robot/Dockerfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Dockerfile for *-robot development container
3+
#
4+
ARG BLUE_GITHUB_REPO=Robotic-Decision-Making-Lab/blue
5+
ARG ROS_DISTRO=jazzy
6+
FROM ${BLUE_GITHUB_REPO}:${ROS_DISTRO}-robot
7+
8+
# Install ROS dependencies
9+
# This is done in a previous stage, but we include it again here in case anyone wants to
10+
# add new dependencies during development
11+
ENV USERNAME=ubuntu
12+
ENV USER_WORKSPACE=/home/$USERNAME/ws_blue
13+
WORKDIR $USER_WORKSPACE
14+
15+
COPY --chown=$USER_UID:$USER_GID . src/blue
16+
RUN sudo apt-get -q update \
17+
&& sudo apt-get -q -y upgrade \
18+
&& rosdep update \
19+
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --skip-keys="gz-transport12 gz-sim7 gz-math7 gz-msgs9 gz-plugin2" \
20+
&& sudo apt-get autoremove -y \
21+
&& sudo apt-get clean -y \
22+
&& sudo rm -rf /var/lib/apt/lists/*
23+
24+
# Install debugging/linting Python packages
25+
RUN python3 -m pip install \
26+
pre-commit \
27+
mypy
28+
29+
# Disable the setuputils installation warning
30+
# This prevents us from needing to pin the setuputils version (which doesn't always work)
31+
ENV PYTHONWARNINGS="ignore"

.devcontainer/robot/devcontainer.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "Robot Dev Container",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": "../..",
6+
"args": {
7+
"BLUE_GITHUB_REPO": "ghcr.io/robotic-decision-making-lab/blue",
8+
"ROS_DISTRO": "jazzy"
9+
}
10+
},
11+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/ws_blue/src/blue,type=bind",
12+
"workspaceFolder": "/home/ubuntu/ws_blue/src/blue",
13+
"remoteUser": "ubuntu",
14+
"runArgs": [
15+
"--network=host",
16+
"--cap-add=SYS_PTRACE",
17+
"--security-opt=seccomp:unconfined",
18+
"--security-opt=apparmor:unconfined",
19+
"--volume=/dev:/dev",
20+
"--privileged",
21+
"--volume=/run/user/1000:/run/user/1000"
22+
],
23+
"containerEnv": {},
24+
"customizations": {
25+
"vscode": {
26+
"extensions": [
27+
"ms-azuretools.vscode-docker",
28+
"ms-python.python",
29+
"njpwerner.autodocstring",
30+
"redhat.vscode-xml",
31+
"redhat.vscode-yaml",
32+
"smilerobotics.urdf",
33+
"esbenp.prettier-vscode",
34+
"charliermarsh.ruff",
35+
"josetr.cmake-language-support-vscode",
36+
"unifiedjs.vscode-mdx"
37+
]
38+
}
39+
}
40+
}

.docker/Dockerfile

Lines changed: 97 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
ARG ROS_DISTRO=rolling
2-
FROM ros:$ROS_DISTRO-ros-base as ci
1+
ARG ROS_DISTRO=jazzy
2+
FROM ros:$ROS_DISTRO-ros-base AS ci
33

44
ENV DEBIAN_FRONTEND=noninteractive
55

@@ -18,6 +18,7 @@ RUN apt-get -q update \
1818
clang-tools \
1919
python3-pip \
2020
python3-dev \
21+
python3-venv \
2122
lsb-release \
2223
wget \
2324
gnupg \
@@ -26,7 +27,8 @@ RUN apt-get -q update \
2627
&& apt-get clean -y \
2728
&& rm -rf /var/lib/apt/lists/*
2829

29-
# Install all ROS dependencies
30+
# Install all ROS dependencies for _just_ blue
31+
# (we have not imported other repos from .repos files)
3032
RUN apt-get -q update \
3133
&& apt-get -q -y upgrade \
3234
&& rosdep update \
@@ -36,16 +38,24 @@ RUN apt-get -q update \
3638
&& apt-get clean -y \
3739
&& rm -rf /var/lib/apt/lists/*
3840

39-
FROM ci as robot
40-
41-
# Configure a new non-root user
42-
ARG USERNAME=blue
41+
# This stage includes
42+
# - Switching to the non-root user
43+
# - Copying 'blue' source from this repo into the non-root user's workspace
44+
# - Installing blue deps using pip, apt and rosdep
45+
# - Installs the remaining blue dependencies from blue_robot.repos
46+
# - Installs deps from rosdep for all src dependencies
47+
# - colcon build
48+
#
49+
FROM ci AS robot
50+
51+
#
52+
# Ubuntu 24.04 "Noble", which is used as the base image for
53+
# jazzy and rolling images, now includes a user "ubuntu" at UID 1000
54+
ARG USERNAME=ubuntu
4355
ARG USER_UID=1000
4456
ARG USER_GID=$USER_UID
4557

46-
RUN groupadd --gid $USER_GID $USERNAME \
47-
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
48-
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
58+
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
4959
&& chmod 0440 /etc/sudoers.d/$USERNAME \
5060
&& usermod -a -G dialout $USERNAME \
5161
&& echo "source /usr/share/bash-completion/completions/git" >> /home/$USERNAME/.bashrc
@@ -56,6 +66,16 @@ ENV DEBIAN_FRONTEND=noninteractive
5666
USER $USERNAME
5767
ENV USER=$USERNAME
5868

69+
# Python in Ubuntu is now marked as a "Externally managed environment",
70+
# Per best practice, create a venv for local python packages
71+
#
72+
# These two ENVs effectively "activate" the venv for subsequent calls to
73+
# python/pip in the Dockerfile
74+
WORKDIR /home/$USERNAME
75+
ENV VIRTUAL_ENV=/home/$USERNAME/.venv/blue
76+
RUN python3 -m venv --system-site-packages --symlinks $VIRTUAL_ENV
77+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
78+
5979
# Install MAVROS dependencies
6080
WORKDIR /home/$USERNAME
6181
RUN wget https://raw.githubusercontent.com/mavlink/mavros/ros2/mavros/scripts/install_geographiclib_datasets.sh \
@@ -81,58 +101,100 @@ RUN sudo apt-get -q update \
81101
gstreamer1.0-plugins-ugly \
82102
gstreamer1.0-plugins-bad \
83103
gstreamer1.0-libav \
104+
libgstreamer1.0-dev \
105+
gstreamer1.0-gl \
106+
libgstreamer-plugins-base1.0-dev \
84107
&& sudo apt-get autoremove -y \
85108
&& sudo apt-get clean -y \
86109
&& sudo rm -rf /var/lib/apt/lists/*
87110

111+
# Manually install MAVROS from source in the ws_blue/ workspace
112+
WORKDIR $USER_WORKSPACE/src/
113+
ARG MAVROS_RELEASE=ros2
114+
# mavlink-gdp-release has not been released for Jazzy, so we use the Rolling release
115+
ARG MAVLINK_RELEASE=release/rolling/mavlink
116+
RUN git clone --depth 1 -b ${MAVROS_RELEASE} https://github.com/mavlink/mavros.git
117+
RUN git clone --depth 1 --recursive -b ${MAVLINK_RELEASE} https://github.com/mavlink/mavlink-gbp-release.git mavlink
118+
# - mavgen uses future.standard_library for backwards compatibility with Python2;
119+
# However, this caused issues with Python 3.12 installed in "noble".
120+
# Comment those lines out in mavlink.
121+
#
122+
# - Fix linkage for yaml-cpp in mavros_extra_plugins
123+
RUN sed -i -e 's/^from future import standard_library/#from future import standard_library/' \
124+
-e 's/standard_library.install_aliases()/#standard_library.install_aliases()/' \
125+
mavlink/pymavlink/generator/mavgen.py && \
126+
sed -i -e 's/^# find_package(yaml_cpp REQUIRED)/find_package(yaml-cpp REQUIRED)/' \
127+
-e '/^ament_target_dependencies(mavros_extras_plugins$/i target_link_libraries(mavros_extras_plugins yaml-cpp::yaml-cpp)' \
128+
-e '/^ament_target_dependencies(mavros_extras$/i target_link_libraries(mavros_extras yaml-cpp::yaml-cpp)' \
129+
mavros/mavros_extras/CMakeLists.txt
130+
131+
WORKDIR $USER_WORKSPACE
88132
RUN sudo apt-get -q update \
89133
&& sudo apt-get -q -y upgrade \
134+
&& vcs import src < src/blue/blue.repos \
90135
&& rosdep update \
91136
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} \
92137
&& sudo apt-get autoremove -y \
93138
&& sudo apt-get clean -y \
94139
&& sudo rm -rf /var/lib/apt/lists/*
95140

141+
# Actually build workspace
142+
RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" \
143+
&& colcon build
144+
96145
RUN echo "source ${USER_WORKSPACE}/install/setup.bash" >> /home/$USERNAME/.bashrc \
97-
&& echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /home/$USERNAME/.bashrc
146+
&& echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /home/$USERNAME/.bashrc \
147+
&& echo "source $VIRTUAL_ENV/bin/activate" >> /home/$USERNAME/.bashrc \
148+
&& echo "\n# Ensure colcon is run in the venv\nalias colcon='python3 -m colcon'" >> /home/$USERNAME/.bashrc
98149

99-
FROM robot as desktop
150+
FROM robot AS desktop
100151

101152
ENV DEBIAN_FRONTEND=noninteractive
102-
ENV GZ_VERSION=garden
103-
104-
# Install Gazebo Garden: https://gazebosim.org/docs/garden/install_ubuntu
105-
RUN sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg \
106-
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null \
107-
&& sudo apt-get -q update \
108-
&& sudo apt-get -y --quiet --no-install-recommends install \
109-
gz-garden \
110-
&& sudo apt-get autoremove -y \
111-
&& sudo apt-get clean -y \
112-
&& sudo rm -rf /var/lib/apt/lists/*
113-
114-
# Install ArduPilot and ardupilot_gazebo dependencies
115-
RUN sudo apt-get -q update \
116-
&& sudo apt-get -q -y upgrade \
117-
&& sudo apt-get -q install --no-install-recommends -y \
153+
ENV GZ_VERSION=harmonic
154+
155+
# Install Gazebo Harmonic: https://gazebosim.org/docs/harmonic/install_ubuntu
156+
# Per DL3004, use "USER root" rather than "sudo"
157+
# https://github.com/hadolint/hadolint/wiki/DL3004
158+
USER root
159+
# Install custom rosdep list
160+
ADD --chown=root:root --chmod=0644 https://raw.githubusercontent.com/osrf/osrf-rosdep/master/gz/00-gazebo.list /etc/ros/rosdep/sources.list.d/00-gazebo.list
161+
RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg \
162+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null \
163+
&& apt-get -q update \
164+
&& apt-get -y --quiet --no-install-recommends install \
165+
cppzmq-dev \
166+
gz-${GZ_VERSION} \
167+
python3-pexpect \
118168
python3-wxgtk4.0 \
169+
python3-future \
119170
rapidjson-dev \
120171
xterm \
121-
&& sudo apt-get autoremove -y \
122-
&& sudo apt-get clean -y \
123-
&& sudo rm -rf /var/lib/apt/lists/*
172+
rapidjson-dev \
173+
libopencv-dev \
174+
&& apt-get autoremove -y \
175+
&& apt-get clean -y \
176+
&& rm -rf /var/lib/apt/lists/*
177+
USER $USERNAME
124178

125179
# Clone ArduSub
126180
# ArduSub is installed for simulation purposes ONLY
127181
# When deployed onto hardware, the native installation of ArduSub
128182
# (on the FCU) will be used.
129183
WORKDIR /home/$USERNAME
130-
RUN git clone https://github.com/ArduPilot/ardupilot.git --recurse-submodules
184+
# Really should do version pinning but Sub-4.5 is waaaay behind master
185+
# (e.g. it doesn't know about "noble" yet)
186+
ARG ARDUPILOT_RELEASE=master
187+
RUN git clone -b ${ARDUPILOT_RELEASE} https://github.com/ArduPilot/ardupilot.git --recurse-submodules
131188

132189
# Install ArduSub dependencies
133190
WORKDIR /home/$USERNAME/ardupilot
134191
ENV SKIP_AP_EXT_ENV=1 SKIP_AP_GRAPHIC_ENV=1 SKIP_AP_COV_ENV=1 SKIP_AP_GIT_CHECK=1
135-
RUN Tools/environment_install/install-prereqs-ubuntu.sh -y
192+
# Do not install the STM development tools
193+
ENV DO_AP_STM_ENV=0
194+
# Do not activate the Ardupilot venv by default
195+
ENV DO_PYTHON_VENV_ENV=0
196+
RUN echo "\n# Below from ardupilot script \"install-prereqs-ubuntu.sh\"\n" >> /home/$USERNAME/.bashrc && \
197+
Tools/environment_install/install-prereqs-ubuntu.sh -y
136198

137199
# Build ArduSub
138200
WORKDIR /home/$USERNAME/ardupilot
@@ -155,7 +217,7 @@ RUN [ "/bin/bash" , "-c" , " \
155217
WORKDIR $USER_WORKSPACE
156218
RUN sudo apt-get -q update \
157219
&& sudo apt-get -q -y upgrade \
158-
&& vcs import src < src/blue/blue.repos \
220+
&& vcs import src < src/blue/sim.repos \
159221
&& rosdep update \
160222
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} \
161223
&& sudo apt-get autoremove -y \
@@ -171,7 +233,7 @@ RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" \
171233
# Setup the simulation environment variables
172234
RUN echo "source ${USER_WORKSPACE}/src/blue/.docker/entrypoints/sim.sh" >> /home/$USERNAME/.bashrc
173235

174-
FROM desktop as desktop-nvidia
236+
FROM desktop AS desktop-nvidia
175237

176238
# Install NVIDIA software
177239
RUN sudo apt-get update \

.docker/compose/nouveau-desktop.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "3"
22
services:
33
blue:
4-
image: ghcr.io/robotic-decision-making-lab/blue:rolling-desktop
4+
image: ghcr.io/robotic-decision-making-lab/blue:jazzy-desktop
55
environment:
66
- DISPLAY=${DISPLAY}
77
- XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}

.docker/compose/nvidia-desktop.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "3"
22
services:
33
blue:
4-
image: ghcr.io/robotic-decision-making-lab/blue:rolling-desktop-nvidia
4+
image: ghcr.io/robotic-decision-making-lab/blue:jazzy-desktop-nvidia
55
environment:
66
- DISPLAY=${DISPLAY}
77
- XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}

.docker/compose/robot.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
services:
2+
blue:
3+
image: ghcr.io/robotic-decision-making-lab/blue:jazzy-robot
4+
build:
5+
dockerfile: .docker/Dockerfile
6+
target: robot
7+
context: ../../
8+
network_mode: host
9+
privileged: true
10+
cap_add:
11+
- SYS_PTRACE
12+
security_opt:
13+
- seccomp:unconfined
14+
- apparmor:unconfined
15+
volumes:
16+
- /dev:/dev
17+
- /run/user/1000:/run/user/1000
18+
- type: bind
19+
source: ../../
20+
target: /home/blue/ws_blue/src/blue
21+
command: tail -f /dev/null

0 commit comments

Comments
 (0)