forked from mirte-robot/mirte-install-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_mirte.sh
executable file
·92 lines (75 loc) · 2.59 KB
/
install_mirte.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
set -ex
MIRTE_SRC_DIR=/usr/local/src/mirte
# Update
sudo apt update
# Install locales
sudo apt install -y locales
sudo locale-gen "nl_NL.UTF-8"
sudo locale-gen "en_US.UTF-8"
sudo update-locale LC_ALL=en_US.UTF-8 LANGUAGE=en_US.UTF-8
# Install vcstool
cp repos.yaml $MIRTE_SRC_DIR
cp download_repos.sh $MIRTE_SRC_DIR
cd $MIRTE_SRC_DIR
./download_repos.sh
# Install dependecnies to be able to run python3
sudo apt install -y python3 python3-pip python3-setuptools
# Set piwheels as pip repo
sudo bash -c "echo '[global]' > /etc/pip.conf"
sudo bash -c "echo 'extra-index-url=https://www.piwheels.org/simple' >> /etc/pip.conf"
# Install telemetrix
cd $MIRTE_SRC_DIR/mirte-telemetrix-aio
pip3 install .
cd $MIRTE_SRC_DIR/mirte-tmx-pico-aio
pip3 install .
# Install Telemtrix4Arduino project
# TODO: building STM sometimes fails (and/or hangs)
cd $MIRTE_SRC_DIR/mirte-install-scripts
mkdir -p /home/mirte/Arduino/libraries
mkdir -p /home/mirte/arduino_project/Telemetrix4Arduino
ln -s $MIRTE_SRC_DIR/mirte-telemetrix4arduino /home/mirte/Arduino/libraries/Telemetrix4Arduino
ln -s $MIRTE_SRC_DIR/mirte-telemetrix4arduino/examples/Telemetrix4Arduino/Telemetrix4Arduino.ino /home/mirte/arduino_project/Telemetrix4Arduino
# Install arduino firmata upload script
cd $MIRTE_SRC_DIR/mirte-install-scripts
./install_arduino.sh
# Install Mirte Python package
cd $MIRTE_SRC_DIR/mirte-python
pip3 install .
# Install Mirte Interface
cd $MIRTE_SRC_DIR/mirte-install-scripts
./install_web.sh
# Install Jupyter Notebook
cd $MIRTE_SRC_DIR/mirte-install-scripts
./install_jupyter_ros.sh
# Install Mirte ROS packages
cd $MIRTE_SRC_DIR/mirte-install-scripts
./install_ROS.sh
# Install numpy
pip3 install numpy
sudo apt install -y bluez joystick
if [ "$(uname -a | grep sunxi)" != "" ]; then
# currently only supporting cheap USB dongles on OrangePi
./install_fake_bt.sh
fi
# Install Mirte documentation
cd $MIRTE_SRC_DIR/mirte-documentation
sudo apt install -y python3-venv libenchant-dev
python3 -m venv docs-env
source docs-env/bin/activate
pip install docutils==0.16.0 sphinx-tabs==3.2.0 #TODO: use files to freeze versions
pip install wheel sphinx sphinx-prompt sphinx-rtd-theme sphinxcontrib-spelling sphinxcontrib-napoleon
mkdir -p _modules/catkin_ws/src
cd _modules
ln -s $MIRTE_SRC_DIR/mirte-python .
cd mirte-python
pip install .
source /opt/ros/noetic/setup.bash
source /home/mirte/mirte_ws/devel/setup.bash
cd ../../
make html
deactivate
# Install overlayfs and make sd card read only (software)
sudo apt install -y overlayroot
# Currently only instaling, not enabled
#sudo bash -c "echo 'overlayroot=\"tmpfs\"' >> /etc/overlayroot.conf"