Created
February 12, 2021 00:01
-
-
Save ashishraste/5c91aac4fd8de369150aaac8888c5fc3 to your computer and use it in GitHub Desktop.
Installs ROS Melodic in a vanilla Ubuntu 18.04 (Bionic Beaver) OS
This file contains hidden or 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
| #!/bin/bash | |
| do_install() { | |
| set -e | |
| # Setting up sources.list | |
| sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources.list.d/ros-latest.list' | |
| # Setting up keys | |
| sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 | |
| echo "Installing ROS ..." | |
| sudo apt-get update -y | |
| sudo apt-get install -y ros-melodic-desktop-full | |
| # Install bootstrap tools | |
| sudo apt-get install --no-install-recommends -y \ | |
| build-essential \ | |
| python-rosdep \ | |
| python-rosinstall \ | |
| python-rosinstall-generator \ | |
| python-wstool \ | |
| python-vcstools \ | |
| python-catkin-tools | |
| sudo rosdep init | |
| rosdep update | |
| # Add ROS CMake path to $CMAKE_PREFIX_PATH | |
| echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc | |
| source ~/.bashrc | |
| } | |
| if do_install -eq 0; then | |
| echo "ROS Melodic installed" | |
| else | |
| echo "ROS Melodic couldn't be installed" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment