-
Notifications
You must be signed in to change notification settings - Fork 49
feat: Add ROS 2 Lyrical installers #70
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,69 @@ | ||||||||||||||||||
| #!/usr/bin/env bash | ||||||||||||||||||
| set -eu | ||||||||||||||||||
|
|
||||||||||||||||||
| # Copyright 2019-2026 Tiryoh | ||||||||||||||||||
| # https://github.com/Tiryoh/ros2_setup_scripts_ubuntu | ||||||||||||||||||
| # Licensed under the Apache License, Version 2.0 | ||||||||||||||||||
| # | ||||||||||||||||||
| # REF: https://docs.ros.org/en/lyrical/Installation/Ubuntu-Install-Debs.html | ||||||||||||||||||
| # by Open Robotics, licensed under CC-BY-4.0 | ||||||||||||||||||
| # source: https://github.com/ros2/ros2_documentation | ||||||||||||||||||
|
|
||||||||||||||||||
| CHOOSE_ROS_DISTRO=lyrical | ||||||||||||||||||
| INSTALL_PACKAGE=desktop | ||||||||||||||||||
| TARGET_OS=resolute | ||||||||||||||||||
|
|
||||||||||||||||||
| # Check OS version | ||||||||||||||||||
| if ! which lsb_release > /dev/null ; then | ||||||||||||||||||
|
Contributor
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. |
||||||||||||||||||
| sudo apt-get update | ||||||||||||||||||
| sudo apt-get install -y curl lsb-release | ||||||||||||||||||
| fi | ||||||||||||||||||
|
|
||||||||||||||||||
| if [[ "$(lsb_release -sc)" == "$TARGET_OS" ]]; then | ||||||||||||||||||
| echo "OS Check Passed" | ||||||||||||||||||
| else | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "==================================================" | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "ERROR: This OS (version: $(lsb_release -sc)) is not supported" | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "==================================================" | ||||||||||||||||||
| exit 1 | ||||||||||||||||||
| fi | ||||||||||||||||||
|
|
||||||||||||||||||
| ARCH=$(dpkg --print-architecture) | ||||||||||||||||||
| if [[ "$ARCH" != "amd64" && "$ARCH" != "arm64" ]]; then | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "==================================================" | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "ERROR: This architecture ($ARCH) is not supported" | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "See https://www.ros.org/reps/rep-2000.html" | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "==================================================" | ||||||||||||||||||
| exit 1 | ||||||||||||||||||
| fi | ||||||||||||||||||
|
|
||||||||||||||||||
| # Install | ||||||||||||||||||
| sudo apt-get update | ||||||||||||||||||
| sudo apt-get install -y software-properties-common | ||||||||||||||||||
| sudo add-apt-repository -y universe | ||||||||||||||||||
| sudo apt-get install -y curl lsb-release build-essential | ||||||||||||||||||
|
|
||||||||||||||||||
| ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F'"' '{print $4}') | ||||||||||||||||||
| curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo ${UBUNTU_CODENAME:-${VERSION_CODENAME}})_all.deb" | ||||||||||||||||||
|
Comment on lines
+46
to
+47
Contributor
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. The
Suggested change
|
||||||||||||||||||
| sudo dpkg -i /tmp/ros2-apt-source.deb | ||||||||||||||||||
| sudo apt-get update | ||||||||||||||||||
| sudo apt-get install -y ros-$CHOOSE_ROS_DISTRO-$INSTALL_PACKAGE | ||||||||||||||||||
|
Comment on lines
+48
to
+50
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. Restore the pre-install These installers skip the upgrade that the existing distro scripts already perform before installing ROS packages. The current Lyrical Ubuntu-deb instructions still call out upgrading first because ROS packages are built against frequently updated Ubuntu systems; omitting it here makes fresh Resolute installs more fragile. (docs.ros.org) Suggested fix sudo dpkg -i /tmp/ros2-apt-source.deb
sudo apt-get update
+sudo apt-get upgrade -y
sudo apt-get install -y ros-$CHOOSE_ROS_DISTRO-$INSTALL_PACKAGE📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| sudo apt-get install -y python3-argcomplete python3-colcon-clean | ||||||||||||||||||
| sudo apt-get install -y python3-colcon-common-extensions | ||||||||||||||||||
| sudo apt-get install -y python3-rosdep python3-vcstool | ||||||||||||||||||
| [ -e /etc/ros/rosdep/sources.list.d/20-default.list ] || | ||||||||||||||||||
| sudo rosdep init | ||||||||||||||||||
| rosdep update | ||||||||||||||||||
| grep -F "source /opt/ros/$CHOOSE_ROS_DISTRO/setup.bash" ~/.bashrc || | ||||||||||||||||||
| echo "source /opt/ros/$CHOOSE_ROS_DISTRO/setup.bash" >> ~/.bashrc | ||||||||||||||||||
| # From ROS 2 Iron, it uses ROS_AUTOMATIC_DISCOVERY_RANGE instead of ROS_LOCALHOST_ONLY | ||||||||||||||||||
| # https://docs.ros.org/en/iron/Releases/Release-Iron-Irwini.html#improved-discovery-options | ||||||||||||||||||
| grep -F "export ROS_AUTOMATIC_DISCOVERY_RANGE=" ~/.bashrc || | ||||||||||||||||||
| echo "# export ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST" >> ~/.bashrc | ||||||||||||||||||
|
|
||||||||||||||||||
| set +u | ||||||||||||||||||
|
|
||||||||||||||||||
| source /opt/ros/$CHOOSE_ROS_DISTRO/setup.bash | ||||||||||||||||||
|
|
||||||||||||||||||
| echo "success installing ROS2 $CHOOSE_ROS_DISTRO" | ||||||||||||||||||
| echo "Run 'source /opt/ros/$CHOOSE_ROS_DISTRO/setup.bash'" | ||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,69 @@ | ||||||||||||||||||
| #!/usr/bin/env bash | ||||||||||||||||||
| set -eu | ||||||||||||||||||
|
|
||||||||||||||||||
| # Copyright 2019-2026 Tiryoh | ||||||||||||||||||
| # https://github.com/Tiryoh/ros2_setup_scripts_ubuntu | ||||||||||||||||||
| # Licensed under the Apache License, Version 2.0 | ||||||||||||||||||
| # | ||||||||||||||||||
| # REF: https://docs.ros.org/en/lyrical/Installation/Ubuntu-Install-Debs.html | ||||||||||||||||||
| # by Open Robotics, licensed under CC-BY-4.0 | ||||||||||||||||||
| # source: https://github.com/ros2/ros2_documentation | ||||||||||||||||||
|
|
||||||||||||||||||
| CHOOSE_ROS_DISTRO=lyrical | ||||||||||||||||||
| INSTALL_PACKAGE=ros-base | ||||||||||||||||||
| TARGET_OS=resolute | ||||||||||||||||||
|
|
||||||||||||||||||
| # Check OS version | ||||||||||||||||||
| if ! which lsb_release > /dev/null ; then | ||||||||||||||||||
|
Contributor
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. |
||||||||||||||||||
| sudo apt-get update | ||||||||||||||||||
| sudo apt-get install -y curl lsb-release | ||||||||||||||||||
| fi | ||||||||||||||||||
|
|
||||||||||||||||||
| if [[ "$(lsb_release -sc)" == "$TARGET_OS" ]]; then | ||||||||||||||||||
| echo "OS Check Passed" | ||||||||||||||||||
| else | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "==================================================" | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "ERROR: This OS (version: $(lsb_release -sc)) is not supported" | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "==================================================" | ||||||||||||||||||
| exit 1 | ||||||||||||||||||
| fi | ||||||||||||||||||
|
|
||||||||||||||||||
| ARCH=$(dpkg --print-architecture) | ||||||||||||||||||
| if [[ "$ARCH" != "amd64" && "$ARCH" != "arm64" ]]; then | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "==================================================" | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "ERROR: This architecture ($ARCH) is not supported" | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "See https://www.ros.org/reps/rep-2000.html" | ||||||||||||||||||
| printf '\033[33m%s\033[m\n' "==================================================" | ||||||||||||||||||
| exit 1 | ||||||||||||||||||
| fi | ||||||||||||||||||
|
|
||||||||||||||||||
| # Install | ||||||||||||||||||
| sudo apt-get update | ||||||||||||||||||
| sudo apt-get install -y software-properties-common | ||||||||||||||||||
| sudo add-apt-repository -y universe | ||||||||||||||||||
| sudo apt-get install -y curl lsb-release build-essential | ||||||||||||||||||
|
|
||||||||||||||||||
| ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F'"' '{print $4}') | ||||||||||||||||||
| curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo ${UBUNTU_CODENAME:-${VERSION_CODENAME}})_all.deb" | ||||||||||||||||||
|
Comment on lines
+46
to
+47
Contributor
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. The
Suggested change
|
||||||||||||||||||
| sudo dpkg -i /tmp/ros2-apt-source.deb | ||||||||||||||||||
| sudo apt-get update | ||||||||||||||||||
| sudo apt-get install -y ros-$CHOOSE_ROS_DISTRO-$INSTALL_PACKAGE | ||||||||||||||||||
|
Comment on lines
+48
to
+50
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. Restore the pre-install This variant has the same regression as the desktop installer: it goes straight from Suggested fix sudo dpkg -i /tmp/ros2-apt-source.deb
sudo apt-get update
+sudo apt-get upgrade -y
sudo apt-get install -y ros-$CHOOSE_ROS_DISTRO-$INSTALL_PACKAGE📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| sudo apt-get install -y python3-argcomplete python3-colcon-clean | ||||||||||||||||||
| sudo apt-get install -y python3-colcon-common-extensions | ||||||||||||||||||
| sudo apt-get install -y python3-rosdep python3-vcstool | ||||||||||||||||||
| [ -e /etc/ros/rosdep/sources.list.d/20-default.list ] || | ||||||||||||||||||
| sudo rosdep init | ||||||||||||||||||
| rosdep update | ||||||||||||||||||
| grep -F "source /opt/ros/$CHOOSE_ROS_DISTRO/setup.bash" ~/.bashrc || | ||||||||||||||||||
| echo "source /opt/ros/$CHOOSE_ROS_DISTRO/setup.bash" >> ~/.bashrc | ||||||||||||||||||
| # From ROS 2 Iron, it uses ROS_AUTOMATIC_DISCOVERY_RANGE instead of ROS_LOCALHOST_ONLY | ||||||||||||||||||
| # https://docs.ros.org/en/iron/Releases/Release-Iron-Irwini.html#improved-discovery-options | ||||||||||||||||||
| grep -F "export ROS_AUTOMATIC_DISCOVERY_RANGE=" ~/.bashrc || | ||||||||||||||||||
| echo "# export ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST" >> ~/.bashrc | ||||||||||||||||||
|
|
||||||||||||||||||
| set +u | ||||||||||||||||||
|
|
||||||||||||||||||
| source /opt/ros/$CHOOSE_ROS_DISTRO/setup.bash | ||||||||||||||||||
|
|
||||||||||||||||||
| echo "success installing ROS2 $CHOOSE_ROS_DISTRO" | ||||||||||||||||||
| echo "Run 'source /opt/ros/$CHOOSE_ROS_DISTRO/setup.bash'" | ||||||||||||||||||
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.
Use explicit smoke checks for Lyrical jobs instead of tutorial build flow.
Line 145 and Line 168 still execute
tutorial.sh(which performs clone/build/test), so these jobs are not lightweight smoke checks and are likely to be slower/flakier inubuntu:26.04containers.Suggested patch
Also applies to: 165-168
🧰 Tools
🪛 zizmor (1.25.2)
[warning] 123-145: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🤖 Prompt for AI Agents