From 4ab6bb8f793b12a61b1ba45d175e5990cab43d87 Mon Sep 17 00:00:00 2001 From: therobocademy Date: Tue, 27 Jan 2026 18:50:24 +0530 Subject: [PATCH 1/3] Updated Dockerfile.ros2 with ROS 2 Jazzy packages --- docker/Dockerfile.ros2 | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/docker/Dockerfile.ros2 b/docker/Dockerfile.ros2 index 2e00fc7ec39..fdc680b89f2 100644 --- a/docker/Dockerfile.ros2 +++ b/docker/Dockerfile.ros2 @@ -1,5 +1,5 @@ # Everything past this stage is to install -# ROS2 Humble +# ROS2 Jazzy # What is the docker name suffix for the base image to load? (defaults to empty string) ARG DOCKER_NAME_SUFFIX="" @@ -9,30 +9,37 @@ FROM isaac-lab-base${DOCKER_NAME_SUFFIX} AS ros2 # Which ROS2 apt package to install ARG ROS2_APT_PACKAGE -# ROS2 Humble Apt installations +# ROS2 Jazzy Apt installations RUN --mount=type=cache,target=/var/cache/apt \ apt-get update && apt-get install -y --no-install-recommends \ curl \ - # Install ROS2 Humble \ + ca-certificates \ + gnupg \ + lsb-release \ + apt-transport-https \ software-properties-common && \ add-apt-repository universe && \ + # Add ROS2 apt repository keyring and source (use host release codename) curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo jammy) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $VERSION_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \ apt-get update && apt-get install -y --no-install-recommends \ - ros-humble-${ROS2_APT_PACKAGE} \ - ros-humble-vision-msgs \ + ros-jazzy-${ROS2_APT_PACKAGE} \ + ros-jazzy-vision-msgs \ # Install both FastRTPS and CycloneDDS - ros-humble-rmw-cyclonedds-cpp \ - ros-humble-rmw-fastrtps-cpp \ + ros-jazzy-rmw-cyclonedds-cpp \ + ros-jazzy-rmw-fastrtps-cpp \ # This includes various dev tools including colcon - ros-dev-tools && \ + ros-dev-tools \ + python3-rosdep && \ + # Initialize rosdep (ignore errors if already initialized) and update + rosdep init || true && rosdep update || true && \ # Install rosdeps for extensions that declare a ros_ws in # their extension.toml ${ISAACLAB_PATH}/isaaclab.sh -p ${ISAACLAB_PATH}/tools/install_deps.py rosdep ${ISAACLAB_PATH}/source && \ apt -y autoremove && apt clean autoclean && \ rm -rf /var/lib/apt/lists/* && \ # Add sourcing of setup.bash to .bashrc - echo "source /opt/ros/humble/setup.bash" >> ${HOME}/.bashrc + echo "source /opt/ros/jazzy/setup.bash" >> ${HOME}/.bashrc # Copy the RMW specifications for ROS2 # https://docs.isaacsim.omniverse.nvidia.com/latest/installation/install_ros.html From 957f3fc82926cfba1688b005aa2aec4032f92b4d Mon Sep 17 00:00:00 2001 From: therobocademy Date: Tue, 27 Jan 2026 19:22:31 +0530 Subject: [PATCH 2/3] Added conditional statement to check OS is 22.04 or 24.04 to install Humble or Jazzy --- docker/Dockerfile.ros2 | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/docker/Dockerfile.ros2 b/docker/Dockerfile.ros2 index fdc680b89f2..a83d8ce3e4c 100644 --- a/docker/Dockerfile.ros2 +++ b/docker/Dockerfile.ros2 @@ -1,5 +1,5 @@ # Everything past this stage is to install -# ROS2 Jazzy +# ROS2 Jazzy/Humble selector # What is the docker name suffix for the base image to load? (defaults to empty string) ARG DOCKER_NAME_SUFFIX="" @@ -9,7 +9,7 @@ FROM isaac-lab-base${DOCKER_NAME_SUFFIX} AS ros2 # Which ROS2 apt package to install ARG ROS2_APT_PACKAGE -# ROS2 Jazzy Apt installations +# ROS2 Apt installations: choose humble for Ubuntu 22.04, jazzy for 24.04 RUN --mount=type=cache,target=/var/cache/apt \ apt-get update && apt-get install -y --no-install-recommends \ curl \ @@ -19,27 +19,26 @@ RUN --mount=type=cache,target=/var/cache/apt \ apt-transport-https \ software-properties-common && \ add-apt-repository universe && \ - # Add ROS2 apt repository keyring and source (use host release codename) + # Add ROS2 apt repository keyring curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $VERSION_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \ + CODENAME="$(. /etc/os-release && echo $VERSION_CODENAME)" && \ + VERSION_ID="$(. /etc/os-release && echo $VERSION_ID)" && \ + if [ "$VERSION_ID" = "22.04" ]; then ROS_DISTRO="humble"; \ + elif [ "$VERSION_ID" = "24.04" ]; then ROS_DISTRO="jazzy"; \ + else echo "Unsupported Ubuntu version: $VERSION_ID" >&2; exit 1; fi && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $CODENAME main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \ apt-get update && apt-get install -y --no-install-recommends \ - ros-jazzy-${ROS2_APT_PACKAGE} \ - ros-jazzy-vision-msgs \ - # Install both FastRTPS and CycloneDDS - ros-jazzy-rmw-cyclonedds-cpp \ - ros-jazzy-rmw-fastrtps-cpp \ - # This includes various dev tools including colcon + ros-${ROS_DISTRO}-${ROS2_APT_PACKAGE} \ + ros-${ROS_DISTRO}-vision-msgs \ + ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ + ros-${ROS_DISTRO}-rmw-fastrtps-cpp \ ros-dev-tools \ python3-rosdep && \ - # Initialize rosdep (ignore errors if already initialized) and update rosdep init || true && rosdep update || true && \ - # Install rosdeps for extensions that declare a ros_ws in - # their extension.toml ${ISAACLAB_PATH}/isaaclab.sh -p ${ISAACLAB_PATH}/tools/install_deps.py rosdep ${ISAACLAB_PATH}/source && \ apt -y autoremove && apt clean autoclean && \ rm -rf /var/lib/apt/lists/* && \ - # Add sourcing of setup.bash to .bashrc - echo "source /opt/ros/jazzy/setup.bash" >> ${HOME}/.bashrc + echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ${HOME}/.bashrc # Copy the RMW specifications for ROS2 # https://docs.isaacsim.omniverse.nvidia.com/latest/installation/install_ros.html From 5d757775973e4e5f9c89c6b505bf2d206da36eba Mon Sep 17 00:00:00 2001 From: therobocademy Date: Tue, 27 Jan 2026 19:45:08 +0530 Subject: [PATCH 3/3] Added conditional statement to check OS is 22.04 or 24.04 to install Humble or Jazzy --- docker/Dockerfile.ros2 | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/Dockerfile.ros2 b/docker/Dockerfile.ros2 index a83d8ce3e4c..34f4fb63bfb 100644 --- a/docker/Dockerfile.ros2 +++ b/docker/Dockerfile.ros2 @@ -23,6 +23,7 @@ RUN --mount=type=cache,target=/var/cache/apt \ curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ CODENAME="$(. /etc/os-release && echo $VERSION_CODENAME)" && \ VERSION_ID="$(. /etc/os-release && echo $VERSION_ID)" && \ + echo "Detected Ubuntu VERSION_ID=${VERSION_ID}, CODENAME=${CODENAME}" && \ if [ "$VERSION_ID" = "22.04" ]; then ROS_DISTRO="humble"; \ elif [ "$VERSION_ID" = "24.04" ]; then ROS_DISTRO="jazzy"; \ else echo "Unsupported Ubuntu version: $VERSION_ID" >&2; exit 1; fi && \