mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 17:38:32 -04:00
Tools/autotest/sim_vehicle.sh: Added option to run the sim_vehicle framework with an external simulator
This commit is contained in:
parent
593a97afd6
commit
7b0046e75e
@ -20,6 +20,7 @@ REVERSE_THROTTLE=0
|
|||||||
NO_REBUILD=0
|
NO_REBUILD=0
|
||||||
START_HIL=0
|
START_HIL=0
|
||||||
TRACKER_ARGS=""
|
TRACKER_ARGS=""
|
||||||
|
EXTERNAL_SIM=0
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
@ -45,6 +46,7 @@ Options:
|
|||||||
for planes can choose elevon or vtail
|
for planes can choose elevon or vtail
|
||||||
-j NUM_PROC number of processors to use during build (default 1)
|
-j NUM_PROC number of processors to use during build (default 1)
|
||||||
-H start HIL
|
-H start HIL
|
||||||
|
-e use external simulator
|
||||||
|
|
||||||
mavproxy_options:
|
mavproxy_options:
|
||||||
--map start with a map
|
--map start with a map
|
||||||
@ -61,7 +63,7 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
# parse options. Thanks to http://wiki.bash-hackers.org/howto/getopts_tutorial
|
# parse options. Thanks to http://wiki.bash-hackers.org/howto/getopts_tutorial
|
||||||
while getopts ":I:VgGcj:TA:t:L:v:hwf:RNH" opt; do
|
while getopts ":I:VgGcj:TA:t:L:v:hwf:RNHe" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
v)
|
v)
|
||||||
VEHICLE=$OPTARG
|
VEHICLE=$OPTARG
|
||||||
@ -113,6 +115,9 @@ while getopts ":I:VgGcj:TA:t:L:v:hwf:RNH" opt; do
|
|||||||
w)
|
w)
|
||||||
WIPE_EEPROM=1
|
WIPE_EEPROM=1
|
||||||
;;
|
;;
|
||||||
|
e)
|
||||||
|
EXTERNAL_SIM=1
|
||||||
|
;;
|
||||||
h)
|
h)
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
@ -302,11 +307,15 @@ trap kill_tasks SIGINT
|
|||||||
|
|
||||||
sleep 2
|
sleep 2
|
||||||
rm -f $tfile
|
rm -f $tfile
|
||||||
$autotest/run_in_terminal_window.sh "Simulator" $RUNSIM || {
|
if [ $EXTERNAL_SIM == 0 ]; then
|
||||||
echo "Failed to start simulator: $RUNSIM"
|
$autotest/run_in_terminal_window.sh "Simulator" $RUNSIM || {
|
||||||
exit 1
|
echo "Failed to start simulator: $RUNSIM"
|
||||||
}
|
exit 1
|
||||||
sleep 2
|
}
|
||||||
|
sleep 2
|
||||||
|
else
|
||||||
|
echo "Using external simulator"
|
||||||
|
fi
|
||||||
|
|
||||||
# mavproxy.py --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501 --out 127.0.0.1:14550 --out 127.0.0.1:14551
|
# mavproxy.py --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501 --out 127.0.0.1:14550 --out 127.0.0.1:14551
|
||||||
options=""
|
options=""
|
||||||
|
Loading…
Reference in New Issue
Block a user