-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·76 lines (71 loc) · 3.1 KB
/
install.sh
File metadata and controls
executable file
·76 lines (71 loc) · 3.1 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
73
74
75
76
sudo apt -y install swig git ros-kinetic-ar-track-alvar
sudo ldconfig
###############################################################################################################3
## Install ROS
echo "Detecting ROS kinetic..."
if test -f "/opt/ros/kinetic/setup.bash"; then
echo "ROS kinetic detected!"
else
echo "ROS kinetic not detected, installing..."
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://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt-get update
sudo apt-get -y install ros-kinetic-desktop-full
apt-cache search ros-kinetic
sudo rosdep init
rosdep update
source /opt/ros/kinetic/setup.bash
echo 'source /opt/ros/kinetic/setup.bash' >> ~/.bashrc
echo 'export ROS_DIR=/opt/ros/kinetic' >> ~/.bashrc
fi
###############################################################################################################3
###############################################################################################################3
## Install luajit
if test -f "/usr/local/bin/luajit"; then
echo "Luajit already installed, skipping"
else
echo "Luajit not detected, installing..."
cd ~/Desktop/TurtleBotPNU/Dependencies/luajit-2.0
make
sudo make install
sudo ln -sf luajit-2.1.0-beta2 /usr/local/bin/luajit
fi
###############################################################################################################3
###############################################################################################################3
## Install ZMQ
if test -f "/home/sj/Desktop/TurtleBotPNU/Dependencies/zeromq-3.2.5/Makefile"; then
echo "ZMQ already installed, skipping"
else
echo "ZMQ not detected, installing..."
cd ~/Desktop/ARAICodes/Dependencies
tar -xf zeromq-3.2.5.tar.gz
cd zeromq-3.2.5
./configure
make
sudo make install PREFIX=/usr/local
fi
###############################################################################################################
###############################################################################################################3
## Install webots
if test -f "/usr/local/webots"; then
echo "Webots already installed, skipping"
else
echo "Webots not detected, installing..."
cd ~/Download
wget https://github.com/cyberbotics/webots/releases/download/R2020a-rev1/webots-R2020a-rev1-x86-64.tar.bz2
tar xjf webots-R2020a-rev1-x86-64.tar.bz2
sudo ln -s ~/Downloads/webots /usr/local
sudo ln -s ~/Downloads/webots/webots /usr/local/bin
fi
###############################################################################################################3
###############################################################################################################3
## Compile code
cd ~/Desktop/TurtleBotPNU
source ~/.bashrc
sudo ldconfig
make -j4
cd ~/Desktop/TurtleBotPNU/catkin_ws
catkin_make
echo 'source /home/sj/Desktop/TurtleBotPNU/catkin_ws/devel/setup.bash' >> ~/.bashrc
##
###############################################################################################################