Files
kick-it/setup/install_ros.sh
Pavel Lutskov 5bea6e542a fixed a bug in ROS installation, updated README
Sourcing .bashrc from install_ros.sh didn't have any effect, since
.bashrc needs to be sourced from an interactive shell. Because of this,
it was required to restart the terminal for ROS to work. Now, the ROS
startup scripts are sourced directly from the installation script,
thus eliminating the need to restart the terminal.

Added instructions to README to check the installation success.
2018-05-27 12:26:45 +02:00

32 lines
713 B
Bash
Executable File

#!/bin/bash
# Exit if something fails
set -e
echo "Setting up sources.list"
sudo bash -c \
'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" \
>/etc/apt/sources.list.d/ros-latest.list'
echo "Set up repository keys"
sudo apt-key adv \
--keyserver hkp://ha.pool.sks-keyservers.net:80 \
--recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
echo "Update packages list"
sudo apt update
echo "Install ROS"
sudo apt install ros-indigo-desktop -y
echo "Initialize rosdep"
sudo rosdep init
rosdep update
echo "Environment setup"
source /opt/ros/indigo/setup.bash
echo "source /opt/ros/indigo/setup.bash" >>${HOME}/.bashrc
echo "Get rosinstall"
sudo apt install python-rosinstall -y