-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall_requirements.sh
More file actions
executable file
·109 lines (73 loc) · 3.04 KB
/
Copy pathinstall_requirements.sh
File metadata and controls
executable file
·109 lines (73 loc) · 3.04 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/bash
# this file assumes Canon's EDSDK was succesfully downloaded and simple_serial_port with
# necessary linux version was cloned correctly and the directory structure looks lie
# the following
# reminder of directory structure
# moadrig_NERVE_location/
# ├── EDSDK/
# ├── moad_cui/ # <-- THIS REPO
# │ ...
# │ ├── install_requirements.sh # <-- THIS FILE
# │ ...
# └── simple_serial_port/
# ├── linux/
# ...
# note 1: this might move you outside of moad_cui or into the librealsense directory
# note 2: all the apt-get commands are with -y to skip dialogue [y/n] yes/no options for taking x mb of space
# the point of this is so you can just run the script and go get a coffee or something
# note 3: may need to be run with sudo to successfully complete the Realsense build process
echo "Installing required system libraries/packages..."
# check for EDSDK
if [ ! -d "../EDSDK" ]; then
echo "ERROR: ../EDSDK not found. Please place Canon's EDSDK in the parent directory (../EDSDK)."
exit 1
else
echo "Found ../EDSDK"
fi
# Moved serial communication code into this repository -PG 6/23/26
# check for simple_serial_port, auto install if not there and user selects yes
# if [ ! -d "../simple_serial_port" ]; then
# echo "ERROR: ../simple_serial_port not found."
# read -r -p "Would you like this script to clone ../simple_serial_port for you and continue? [Y/n] " _resp
# if [[ "$_resp" =~ ^([yY]|$) ]]; then
# cd ..
# git clone https://github.com/grahamstelzer/simple_serial_port.git
# cd moad_cui/
# else
# echo "Did not clone simple_serial_port, reminder that this is necessary for communication with the turntable."
# sleep 2
# fi
# echo "Continuing with installations..."
# else
# echo "Found ../simple_serial_port"
# fi
# realsense sdk
echo "--RealSense SDK--"
echo "from https://github.com/realsenseai/librealsense/blob/master/doc/installation.md which has more detail"
# must clone librealsense2 and run, moving out a directory assuming above directory structure
cd ..
sudo apt-get -y update && sudo apt-get -y upgrade
sudo apt-get -y install libssl-dev libusb-1.0-0-dev libudev-dev pkg-config libgtk-3-dev
sudo apt-get -y install git wget cmake build-essential
sudo apt-get -y install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev at
git clone https://github.com/realsenseai/librealsense.git
# possible error running next librealsense script, pre-installing v4l-utils should prevent this
# info from if-statement inside setup_udev_rules.sh at
# https://github.com/realsenseai/librealsense/blob/master/scripts/setup_udev_rules.sh
sudo apt -y install v4l-utils
cd librealsense
./scripts/setup_udev_rules.sh
mkdir build
cd build
cmake ../
make uninstall && make clean && make && make install
# opencv
echo "--OpenCV--"
# make sure pip is installed
sudo apt -y install python3-pip
pip install opencv-python
# pcl
echo "--PCL--"
sudo apt -y install libpcl-dev
# nlohmann
# cmakelists autofinds package from github