From 74076a549e16f0fb41d55d2f3348f8198f7ea501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Thor=C3=A9n?= Date: Thu, 9 Jul 2026 13:57:21 +0200 Subject: [PATCH 1/3] Fix install script --- scripts/installation/install_deps.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/installation/install_deps.sh b/scripts/installation/install_deps.sh index dd54c26da..5afdd3ee1 100755 --- a/scripts/installation/install_deps.sh +++ b/scripts/installation/install_deps.sh @@ -91,9 +91,9 @@ check_command_failed $? "Failed to install dependencies." if ! (apt list | grep -q "ros-$ROS_DISTRO-desktop"); then echo "Adding the ROS2 $ROS_DISTRO apt repository..." - # Install ROS2 prerequisites + # Install prerequisites for adding the ROS2 repository apt_update_retry - apt_install_retry lsb-release ros-dev-tools + apt_install_retry lsb-release curl # Authorize the ROS2 gpg key with apt sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \ @@ -101,8 +101,12 @@ if ! (apt list | grep -q "ros-$ROS_DISTRO-desktop"); then # Add the ROS2 repo to sources list echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null + + # Now install ros-dev-tools from the ROS2 repository + apt_update_retry + apt_install_retry ros-dev-tools else - echo "ROS2 $ROS_DISTRO" repository already added, skipping addition... + echo "ROS2 $ROS_DISTRO repository already added, skipping addition..." fi # Install ROS2 packages From 78c5ff51fc0644dd56d0a2278ce7e79750002d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Thor=C3=A9n?= Date: Fri, 10 Jul 2026 10:17:38 +0200 Subject: [PATCH 2/3] More fixes --- scripts/installation/install_deps.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/installation/install_deps.sh b/scripts/installation/install_deps.sh index 5afdd3ee1..a9e28cc27 100755 --- a/scripts/installation/install_deps.sh +++ b/scripts/installation/install_deps.sh @@ -118,6 +118,11 @@ apt_install_retry \ ros-${ROS_DISTRO}-launch-pytest check_command_failed $? "Failed to install ROS2 packages." +# Initialize submodules so rosdep can find local packages like atos_interfaces +if command -v git >/dev/null 2>&1 && git -C "${ATOS_REPO_PATH}" rev-parse --is-inside-work-tree >/dev/null 2>&1; then + git -C "${ATOS_REPO_PATH}" submodule update --init --recursive +fi + sudo rosdep init || true && \ rosdep update || true && \ rosdep install --from-paths ${ATOS_REPO_PATH} --ignore-src --rosdistro $ROS_DISTRO -y From 39a0067fdacc43502045781e9f2d1667d2cff641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Thor=C3=A9n?= Date: Fri, 10 Jul 2026 11:01:49 +0200 Subject: [PATCH 3/3] Add option for adding lines to .bashrc and .zshrc --- scripts/installation/install_atos.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/scripts/installation/install_atos.sh b/scripts/installation/install_atos.sh index 2bf37acef..b45aa6147 100755 --- a/scripts/installation/install_atos.sh +++ b/scripts/installation/install_atos.sh @@ -68,25 +68,34 @@ cd - ###### Configure setup scripts ###### ##################################### +if [ -t 0 ] && [ -z "$DEBIAN_FRONTEND" ] && [ -z "$GITHUB_ACTION" ]; then + echo "" + echo "Would you like to add ATOS source lines to your shell config file (.bashrc/.zshrc)?" + echo "This will auto-activate the ATOS environment in new terminals. (y/n)" + read -r answer + if [ "$answer" == "${answer#[Yy]}" ]; then + echo "Skipping shell configuration." + exit 0 + fi +fi + atos_venv_setup_script="source $ATOS_VENV_PATH/bin/activate" atos_python_site_packages="$(python -c 'import site; print(site.getsitepackages()[0])')" check_command_failed $? "Failed to determine ATOS Python site-packages path." atos_pythonpath_script="export PYTHONPATH=$atos_python_site_packages:\$PYTHONPATH" -atos_setup_script="source $HOME/atos_ws/install/setup." -ros2_setup_script="source /opt/ros/$ROS_DISTRO/setup." case "$SHELL" in */bash) add_source_line_if_needed $HOME/.bashrc "bash" "${atos_venv_setup_script}" add_source_line_if_needed $HOME/.bashrc "bash" "${atos_pythonpath_script}" - add_source_line_if_needed $HOME/.bashrc "bash" "${ros2_setup_script}" - add_source_line_if_needed $HOME/.bashrc "bash" "${atos_setup_script}" + add_source_line_if_needed $HOME/.bashrc "bash" "source /opt/ros/$ROS_DISTRO/setup.sh" + add_source_line_if_needed $HOME/.bashrc "bash" "source $HOME/atos_ws/install/setup.sh" ;; */zsh) add_source_line_if_needed $HOME/.zshrc "zsh" "${atos_venv_setup_script}" add_source_line_if_needed $HOME/.zshrc "zsh" "${atos_pythonpath_script}" - add_source_line_if_needed $HOME/.zshrc "zsh" "${ros2_setup_script}" - add_source_line_if_needed $HOME/.zshrc "zsh" "${atos_setup_script}" + add_source_line_if_needed $HOME/.zshrc "zsh" "source /opt/ros/$ROS_DISTRO/setup.zsh" + add_source_line_if_needed $HOME/.zshrc "zsh" "source $HOME/atos_ws/install/setup.zsh" ;; *) echo "Unsupported shell detected! Please use either bash or zsh shells to run ATOS"