Commit ea26deb3 authored by maruggv's avatar maruggv
Browse files

added install file for ros-melodic

parent b3c2ed69
#!/bin/bash
die () {
echo >&2 "$@"
exit 1
}
[ "$#" -eq 1 ] || die "1 argument required (StudentID), $# provided"
echo $1 | grep -E -q '^[0-9]+$' || die "Numeric argument required, $1 provided"
#ros repository
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
#system update and installation
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install ros-melodic-desktop-full python-pip
sudo pip install pyusb
#rosdep
sudo rosdep init
rosdep update
#untar catkin workspace
#needs to run after ros installation because of symbolic link to CMakeLists.txt
mkdir -p ~/groupwork/D-FaLL-System/pps_ws/src
tar -xf package.tar.gz -C ~/groupwork/D-FaLL-System/pps_ws/src
#environment setup
echo "source /opt/ros/melodic/setup.bash" >> ~/groupwork/D-FaLL-System/.bashrc
source /opt/ros/melodic/setup.bash
sudo sh -c "echo '10.42.0.32 teacher' >> /etc/hosts"
sudo sh -c "echo $1 >> /etc/StudentID"
#copy rules before cd
sudo cp ./99-crazyflie.rules /etc/udev/rules.d
sudo cp ./99-crazyradio.rules /etc/udev/rules.d
#build workspace
cd ~/groupwork/D-FaLL-System/pps_ws
catkin_make -j4
echo "source ~/groupwork/D-FaLL-System/pps_ws/devel/setup.bash" >> ~/groupwork/D-FaLL-System/.bashrc
source ~/groupwork/D-FaLL-System/pps_ws/devel/setup.bash
echo "source ~/groupwork/D-FaLL-System/pps_ws/src/d_fall_pps/launch/Config.sh" >> ~/groupwork/D-FaLL-System/.bashrc
source ~/groupwork/D-FaLL-System/pps_ws/src/d_fall_pps/launch/Config.sh
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment