-
Notifications
You must be signed in to change notification settings - Fork 0
/
sim_start.sh
71 lines (55 loc) · 2.48 KB
/
sim_start.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
#!/bin/bash
##############################
# SITL Simple Startup Script
##############################
##############################
#Launch sim_vehicle.sh
#
# #echo 'ARMING_CHECK 0' >> ~/ardupilot/Tools/autotest/copter_params.parm
##############################
echo 'SITL Simple Startup Script'
echo 'Mission Planner/APM Planner port: 14550'
echo 'MavProxy Windows port: 14551'
echo 'VM IP Address: 192.168.1.13'
read -p "Witch software do you want to simulate? Copter=c, Plane=p, Rover=r (c/p/r) " RESPM
if [ "$RESPM" = "c" ]; then
cd ~/ardupilot/ArduCopter
# read -p "Do you want to disable Pre Arm Checks? (y/n) " RESPARM
# if [ "$RESPARM" = "y" ]; then
# echo 'ARMING_CHECK 0' >> ~/ardupilot/Tools/autotest/copter_params.parm
# fi
read -p "Do you want to reset parameters to default? (y/n) " RESP
if [ "$RESP" = "y" ]; then
~/ardupilot/Tools/autotest/sim_vehicle.sh -v ArduCopter -f X -j 2 -w --console --out=192.168.1.13:14550 --out=192.168.1.13:14551
else
~/ardupilot/Tools/autotest/sim_vehicle.sh -v ArduCopter -f X -j 2 --console --out=192.168.1.13:14550 --out=192.168.1.13:14551
fi
fi
if [ "$RESPM" = "p" ]; then
echo "Plane is not tested"
echo "Note: JSBSim needs to be installed and path added to .bashrc"
cd ~/ardupilot/ArduPlane
# read -p "Do you want to disable Pre Arm Checks? (y/n) " RESPARM
# if [ "$RESPARM" = "y" ]; then
# echo 'ARMING_CHECK 0' >> ~/ardupilot/Tools/autotest/ArduPlane.parm
# fi
read -p "Do you want to reset parameters to default? (y/n) " RESP
if [ "$RESP" = "y" ]; then
~/ardupilot/Tools/autotest/sim_vehicle.sh -v ArduPlane -j 2 -w --console --out=192.168.1.13:14550 --out=192.168.1.13:14551
else
~/ardupilot/Tools/autotest/sim_vehicle.sh -v ArduPlane -j 2 --console --out=192.168.1.13:14550 --out=192.168.1.13:14551
fi
fi
if [ "$RESPM" = "r" ]; then
cd ~/ardupilot/APMrover2
read -p "Do you want to reset parameters to default? (y/n) " RESP
# read -p "Do you want to disable Pre Arm Checks? (y/n) " RESPARM
# if [ "$RESPARM" = "y" ]; then
# echo 'ARMING_CHECK 0' >> ~/ardupilot/Tools/autotest/Rover.parm
# fi
if [ "$RESP" = "y" ]; then
~/ardupilot/Tools/autotest/sim_vehicle.sh -v APMrover2 -j 2 -w --console --out=192.168.1.13:14550 --out=192.168.1.13:14551
else
~/ardupilot/Tools/autotest/sim_vehicle.sh -v APMrover2 -j 2 --console --out=192.168.1.13:14550 --out=192.168.1.13:14551
fi
fi