-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
235 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bats | ||
|
||
setup() { | ||
load 'test_helper/bats-support/load' | ||
load 'test_helper/bats-assert/load' | ||
} | ||
|
||
|
||
@test "Humble fail on Ubuntu 24.04" { | ||
run ./ros2-humble-desktop-main.sh | ||
[ "$status" -eq 1 ] | ||
assert_output --partial "ERROR: This OS (version: noble) is not supported" | ||
} | ||
|
||
@test "Iron fail on Ubuntu 24.04" { | ||
run ./ros2-iron-desktop-main.sh | ||
[ "$status" -eq 1 ] | ||
assert_output --partial "ERROR: This OS (version: noble) is not supported" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/usr/bin/env bash | ||
set -eu | ||
|
||
# Copyright 2019-2024 Tiryoh | ||
# https://github.com/Tiryoh/ros2_setup_scripts_ubuntu | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
# REF: https://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html | ||
# by Open Robotics, licensed under CC-BY-4.0 | ||
# source: https://github.com/ros2/ros2_documentation | ||
|
||
CHOOSE_ROS_DISTRO=jazzy | ||
INSTALL_PACKAGE=desktop | ||
TARGET_OS=noble | ||
|
||
# Check OS version | ||
if ! which lsb_release > /dev/null ; then | ||
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 | ||
|
||
if ! dpkg --print-architecture | grep -q 64; then | ||
printf '\033[33m%s\033[m\n' "==================================================" | ||
printf '\033[33m%s\033[m\n' "ERROR: This architecture ($(dpkg --print-architecture)) 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 gnupg2 lsb-release build-essential | ||
|
||
sudo 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 $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null | ||
sudo apt-get update | ||
sudo apt-get install -y ros-$CHOOSE_ROS_DISTRO-$INSTALL_PACKAGE | ||
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 # https://index.ros.org/doc/ros2/Installation/Linux-Development-Setup/ | ||
[ -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'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/usr/bin/env bash | ||
set -eu | ||
|
||
# Copyright 2019-2024 Tiryoh | ||
# https://github.com/Tiryoh/ros2_setup_scripts_ubuntu | ||
# Licensed under the Apache License, Version 2.0 | ||
# | ||
# REF: https://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html | ||
# by Open Robotics, licensed under CC-BY-4.0 | ||
# source: https://github.com/ros2/ros2_documentation | ||
|
||
CHOOSE_ROS_DISTRO=jazzy | ||
INSTALL_PACKAGE=ros-base | ||
TARGET_OS=noble | ||
|
||
# Check OS version | ||
if ! which lsb_release > /dev/null ; then | ||
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 | ||
|
||
if ! dpkg --print-architecture | grep -q 64; then | ||
printf '\033[33m%s\033[m\n' "==================================================" | ||
printf '\033[33m%s\033[m\n' "ERROR: This architecture ($(dpkg --print-architecture)) 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 gnupg2 lsb-release build-essential | ||
|
||
sudo 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 $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null | ||
sudo apt-get update | ||
sudo apt-get install -y ros-$CHOOSE_ROS_DISTRO-$INSTALL_PACKAGE | ||
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 # https://index.ros.org/doc/ros2/Installation/Linux-Development-Setup/ | ||
[ -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'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters