forked from aws-deepracer/aws-deepracer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
initialize_argos.sh
executable file
·60 lines (49 loc) · 1.42 KB
/
initialize_argos.sh
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
#!/bin/bash
### Setup color output macro ###
loginfo() {
GREEN="\033[0;32m"
GREENB="\033[1;32m"
YELLOW="\033[0;33m"
YELLOWB="\033[1;33m"
RESET="\033[0m"
echo -e "${!1}ARGOS INITIALIZATION: ${2}${RESET}"
}
### Run in non-interactive mode ###
export DEBIAN_FRONTEND=noninteractive
### Terminate on errors ###
set -e
### Update and upgrade packages ###
loginfo "YELLOWB" "Updating and upgrading packages..."
sudo apt update && sudo apt upgrade -qy
### Install dependencies ###
loginfo "YELLOWB" "Installing dependencies..."
sudo apt install -qy git wget build-essential cmake libfreeimage-dev libfreeimageplus-dev \
qt5-default freeglut3-dev libxi-dev libxmu-dev liblua5.3-dev lua5.3
### Install ARGoS ###
loginfo "YELLOWB" "Installing ARGoS simulator..."
# Clone the ARGoS directory
cd /home/deepracer
git clone https://github.com/ilpincy/argos3 argos3
pushd argos3
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DARGOS_BUILD_FOR=dprcr \
-DARGOS_DOCUMENTATION=OFF \
-DARGOS_BUILD_NATIVE=ON \
../src
make
sudo make install
sudo ldconfig
popd
### Install the ARGoS AWS DeepRacer plugin ###
cd /home/deepracer
git clone https://github.com/NESTLab/argos3-deepracer
pushd argos3-deepracer
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DARGOS_BUILD_FOR=dprcr ../src
make
sudo make install
sudo ldconfig
popd
### Completion ###
loginfo "GREENB" "Initialization complete!"