#!/usr/bin/env bash set -e locale # check for UTF-8 sudo apt update && sudo apt install -y locales sudo locale-gen en_US en_US.UTF-8 sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 export LANG=en_US.UTF-8 locale # verify settings sudo apt install -y software-properties-common sudo add-apt-repository -y universe sudo apt update && sudo apt install -y curl export 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" sudo dpkg -i /tmp/ros2-apt-source.deb sudo apt update sudo apt upgrade -y sudo apt install -y ros-humble-desktop source /opt/ros/humble/setup.bash echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc sudo apt install -y python3-colcon-common-extensions mkdir -p ~/ros2_ws/src cd ~/ros2_ws colcon build --symlink-install sudo apt install -y python3-rosdep sudo rosdep init rosdep update sudo apt install -y libncurses-dev sudo apt install -y python3-pip