forked from burrimi/ubuntu_helpers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_ros.sh
More file actions
executable file
·72 lines (51 loc) · 1.63 KB
/
install_ros.sh
File metadata and controls
executable file
·72 lines (51 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
echo "*** add user to dialout for asctec hl ***"
username=`whoami`
sudo adduser $username dialout
echo
# --- SET UP ROS ---
# add ros repository to package manager
UBUNTU_VERSION=$(lsb_release -a)
if [[ $UBUNTU_VERSION == *13.10* ]]
then
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu saucy main" > /etc/apt/sources.list.d/ros-latest.list'
elif [[ $UBUNTU_VERSION == *14.04* ]]
then
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
else
echo "Unknown Ubuntu Version for ROS Indigo"
fi
# add key to ros repository
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
# update package manager
sudo apt-get update
# install ros indigo
sudo apt-get install ros-indigo-desktop-full -y
# initialize rosdep
sudo rosdep init
rosdep update
# ros python install helper
sudo apt-get install python-rosinstall -y
# install node manager
sudo apt-get install ros-indigo-node-manager-fkie -y
# install catkin tools
sudo apt-get install python-catkin-tools -y
# install rosemacs
sudo apt-get install ros-indigo-rosemacs -y
echo "(add-to-list 'load-path \"/opt/ros/indigo/share/emacs/site-lisp\")" >> ~/.emacs.d/init.el
echo ";; or whatever your install space is + \"/share/emacs/site-lisp\"" >> ~/.emacs.d/init.el
echo "(require 'rosemacs-config)" >> ~/.emacs.d/init.el
echo
echo "*** SETTING UP ROS ***"
echo
cd ~
source /opt/ros/indigo/setup.bash
# create catkin workspace
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws/
catkin build
cd ~
# add ros to bash
sh -c 'echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc'