├── .travis.yml ├── README.md └── install /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | language: generic 3 | 4 | matrix: 5 | include: 6 | - dist: focal 7 | os: linux 8 | arch: amd64 9 | 10 | - dist: focal 11 | os: linux 12 | arch: arm64 13 | 14 | - dist: bionic 15 | os: linux 16 | arch: amd64 17 | 18 | - dist: bionic 19 | os: linux 20 | arch: arm64 21 | 22 | branches: 23 | only: 24 | - master 25 | 26 | compiler: 27 | - gcc 28 | 29 | install: 30 | - cd 31 | - git clone https://github.com/linorobot/ros2me 32 | - cd ros2me 33 | - sudo ./install 34 | 35 | notifications: 36 | email: 37 | - jimenojmm@gmail.com -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ros2me [![Build Status](https://travis-ci.org/linorobot/ros2me.svg?branch=master)](https://travis-ci.org/linorobot/ros2me) 2 | ROS 2 installation files. This will automatically detect your Ubuntu Release and install a compatible ROS 2 distro. 3 | 4 | Works on: 5 | - Ubuntu 18.04 - ROS Eloquent Elusor 6 | - Ubuntu 20.04 - ROS Galactic Geochelone 7 | - Ubuntu 22.04 - ROS Humble Hawksbill 8 | 9 | Installs ros-$DISTRO-base (barebones) on non X86 machines. 10 | 11 | 12 | Run: 13 | 14 | ``` 15 | ./install 16 | ``` 17 | 18 | -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | sudo apt update && sudo apt install -y curl gnupg2 lsb-release 6 | 7 | ARCH=$(uname -i) 8 | RELEASE=$(lsb_release -c -s) 9 | 10 | sudo apt update && sudo apt install -y locales 11 | 12 | sudo locale-gen en_US en_US.UTF-8 13 | sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 14 | export LANG=en_US.UTF-8 15 | 16 | if [ $RELEASE == "bionic" ] 17 | then 18 | ROSDISTRO=eloquent 19 | 20 | elif [ $RELEASE == "focal" ] 21 | then 22 | ROSDISTRO=galactic 23 | 24 | elif [ $RELEASE == "jammy" ] 25 | then 26 | ROSDISTRO=humble 27 | 28 | else 29 | echo "$RELEASE OS Release not supported. Exiting now" 30 | exit 31 | fi 32 | 33 | if [ $ARCH != "x86_64" ] && [ $ARCH != "aarch64" ] 34 | then 35 | echo "$ARCH architecture not supported. Exiting now" 36 | exit 37 | fi 38 | 39 | RELEASE_FILE=$ROSDISTRO$ARCH 40 | 41 | # Add the ROS 2 apt repository 42 | sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg 43 | 44 | # Add repository to sources list 45 | 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 46 | 47 | echo "Installing ROS $ROSDISTRO on $ARCH architecture" 48 | sudo apt update 49 | 50 | # Install colcon 51 | sudo apt install -y python3-colcon-common-extensions python3-colcon-core python3-rosdep 52 | 53 | if [ $ARCH == "x86_64" ] 54 | then 55 | sudo apt install -y ros-$ROSDISTRO-desktop 56 | 57 | elif [ $ARCH == "aarch64" ] 58 | then 59 | sudo apt install -y ros-$ROSDISTRO-ros-base 60 | fi 61 | 62 | # Install python3 libraries 63 | sudo apt install -y libpython3-dev python3-pip 64 | pip3 install -U argcomplete pytest-rerunfailures 65 | 66 | # Remove conflicting em package 67 | pip3 uninstall em 68 | 69 | sudo rosdep init 70 | rosdep update 71 | 72 | echo "" 73 | echo "ROS $ROSDISTRO installation complete!" 74 | echo "" 75 | 76 | echo "Set up your environment by sourcing the following file." 77 | echo "source /opt/ros/$ROSDISTRO/setup.bash" 78 | echo "" 79 | 80 | echo -n "Or do you want to save this on your .bashrc (y/n)? " 81 | read answer 82 | 83 | if [ "$answer" != "${answer#[Yy]}" ] ; 84 | then 85 | echo "source /opt/ros/$ROSDISTRO/setup.bash" >> $HOME/.bashrc 86 | fi 87 | 88 | echo "To start using ROS2, run: source $HOME/.bashrc" 89 | --------------------------------------------------------------------------------