-
Notifications
You must be signed in to change notification settings - Fork 4
/
install.sh
94 lines (60 loc) · 2.24 KB
/
install.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
#!/bin/bash
echo "========================================="
echo "Starting Installation process"
echo "========================================="
# downloading github repo
echo "========================================="
echo "downloading github repo"
echo "========================================="
cd
git clone [email protected]:abdelhakim96/WT_hakim_test.git
# Download mavros dependecies
echo "========================================="
echo "Downloading mavros dependecies"
echo "========================================="
sudo apt-get install ros-melodic-mavros*
sudo apt-get install xdotool
sudo apt-get ros-mavros-mav-msgs
# copy PX4 folder to home directory
echo "========================================="
echo "copying PX4 folder to home"
echo "========================================="
cd
cd WT_hakim_test
cp -R Wind-Turbine-Inspection ~/
# copy catkin files folder to catkin workspace
echo "========================================="
echo "copying catkin files to catkin_ws"
echo "========================================="
cd
cd WT_hakim_test
cp -R WTI_catkin ~/catkin_ws/src
# remove NMPC code generator folder to be able to use catkin build
echo "========================================="
echo "removing code generation files"
echo "========================================="
cd ~/catkin_ws/src/WTI_catkin
rm -r NMPC_code_generator
rm -r wind_estimator
# build catkin ws
echo "========================================="
echo "building ws"
echo "========================================="
cd ~/catkin_ws/
catkin clean
catkin build
# install_dependencies_and_setup_px4
echo "========================================="
echo "installing dependencies and setting up px4"
echo "========================================="
cd
cd Wind-Turbine-Inspection
./install_dependencies_and_setup_px4_modified.sh
#Add alias for arming the drone and setting the mode to offboard.
echo "========================================="
echo "Adding alias for arming the drone and setting the mode to offboard.
"
echo "========================================="
#echo 'alias arm='rosrun mavros mavsafety arm'' >> ~/.bashrc
#echo 'alias disarm='rosrun mavros mavsafety disarm'' >> ~/.bashrc
#echo 'alias offboard='rosrun mavros mavsys mode -c OFFBOARD'' >> ~/.bashrc