diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index 46e58604a4..adf312aa6c 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -440,7 +440,7 @@ def fly_ArduPlane(viewerip=None, map=False): if map: options += ' --map' - cmd = util.reltopdir("Tools/autotest/jsbsim/runsim.py") + cmd = util.reltopdir("Tools/autotest/jsb_sim/runsim.py") cmd += " --speedup=100 --home=%s --wind=%s" % (HOME_LOCATION, WIND) if viewerip: cmd += " --fgout=%s:5503" % viewerip diff --git a/Tools/autotest/jsbsim/fgout_template.xml b/Tools/autotest/jsb_sim/fgout_template.xml similarity index 100% rename from Tools/autotest/jsbsim/fgout_template.xml rename to Tools/autotest/jsb_sim/fgout_template.xml diff --git a/Tools/autotest/jsbsim/rascal_test_template.xml b/Tools/autotest/jsb_sim/rascal_test_template.xml similarity index 100% rename from Tools/autotest/jsbsim/rascal_test_template.xml rename to Tools/autotest/jsb_sim/rascal_test_template.xml diff --git a/Tools/autotest/jsbsim/runsim.py b/Tools/autotest/jsb_sim/runsim.py similarity index 97% rename from Tools/autotest/jsbsim/runsim.py rename to Tools/autotest/jsb_sim/runsim.py index 250b80b1ee..830c1aa05a 100755 --- a/Tools/autotest/jsbsim/runsim.py +++ b/Tools/autotest/jsb_sim/runsim.py @@ -53,14 +53,14 @@ def setup_template(home): baseport = int(opts.simout.split(':')[1]) - template = os.path.join('jsbsim', 'fgout_template.xml') - out = os.path.join('jsbsim', 'fgout.xml') + template = os.path.join('jsb_sim', 'fgout_template.xml') + out = os.path.join('jsb_sim', 'fgout.xml') xml = open(template).read() % { 'FGOUTPORT' : str(baseport+3) } open(out, mode='w').write(xml) print("Wrote %s" % out) - template = os.path.join('jsbsim', 'rascal_test_template.xml') - out = os.path.join('jsbsim', 'rascal_test.xml') + template = os.path.join('jsb_sim', 'rascal_test_template.xml') + out = os.path.join('jsb_sim', 'rascal_test.xml') xml = open(template).read() % { 'JSBCONSOLEPORT' : str(baseport+4) } open(out, mode='w').write(xml) print("Wrote %s" % out) @@ -175,7 +175,7 @@ parser.add_option("--simin", help="SITL input (IP:port)", default="12 parser.add_option("--simout", help="SITL output (IP:port)", default="127.0.0.1:5501") parser.add_option("--fgout", help="FG display output (IP:port)", default="127.0.0.1:5503") parser.add_option("--home", type='string', help="home lat,lng,alt,hdg (required)") -parser.add_option("--script", type='string', help='jsbsim model script', default='jsbsim/rascal_test.xml') +parser.add_option("--script", type='string', help='jsbsim model script', default='jsb_sim/rascal_test.xml') parser.add_option("--options", type='string', help='jsbsim startup options') parser.add_option("--elevon", action='store_true', default=False, help='assume elevon input') parser.add_option("--revthr", action='store_true', default=False, help='reverse throttle') @@ -200,7 +200,7 @@ atexit.register(util.pexpect_close_all) setup_template(opts.home) # start child -cmd = "JSBSim --realtime --suspend --nice --simulation-rate=%u --logdirectivefile=jsbsim/fgout.xml --script=%s" % (opts.rate, opts.script) +cmd = "JSBSim --realtime --suspend --nice --simulation-rate=%u --logdirectivefile=jsb_sim/fgout.xml --script=%s" % (opts.rate, opts.script) if opts.options: cmd += ' %s' % opts.options diff --git a/Tools/autotest/runsim_cmac.sh b/Tools/autotest/runsim_cmac.sh deleted file mode 100755 index c9f2748d14..0000000000 --- a/Tools/autotest/runsim_cmac.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# useful example script for HIL testing with ArduPlane - -set -x - -killall -q JSBSim -pkill -f runsim.py -set -e - -autotest=$(dirname $(readlink -e $0)) -pushd $autotest/../../ArduPlane -../Tools/autotest/jsbsim/runsim.py --home=-35.362942,149.165193,585,354 diff --git a/Tools/autotest/sim_arducopter10.sh b/Tools/autotest/sim_arducopter10.sh deleted file mode 100755 index 2baab186c4..0000000000 --- a/Tools/autotest/sim_arducopter10.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -set -e -set -x - -if [ $# -eq 1 ]; then - frame="$1" - target="sitl-$frame" -else - frame="+" - target="sitl" -fi - -case $frame in - +,X,quad) - target="sitl" - ;; - octa) - target="sitl-octa" - ;; -esac - -echo "Building with target $target for frame $frame" - -autotest=$(dirname $(readlink -e $0)) -pushd $autotest/../../ArduCopter -make clean $target-mavlink10 - -tfile=$(mktemp) -echo r > $tfile -#gnome-terminal -e "gdb -x $tfile --args /tmp/ArduCopter.build/ArduCopter.elf" -gnome-terminal -e /tmp/ArduCopter.build/ArduCopter.elf -#gnome-terminal -e "valgrind -q /tmp/ArduCopter.build/ArduCopter.elf" -sleep 2 -rm -f $tfile -gnome-terminal -e "../Tools/autotest/pysim/sim_multicopter.py --frame=$frame --home=-35.362938,149.165085,584,270" -sleep 2 -popd -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 --quadcopter --mav10 diff --git a/Tools/autotest/sim_arduplane10.sh b/Tools/autotest/sim_arduplane10.sh deleted file mode 100755 index a5eb832706..0000000000 --- a/Tools/autotest/sim_arduplane10.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -e -set -x - -autotest=$(dirname $(readlink -e $0)) -pushd $autotest/../../ArduPlane -make clean sitl-mavlink10 - -tfile=$(mktemp) -echo r > $tfile -#gnome-terminal -e "gdb -x $tfile --args /tmp/ArduPlane.build/ArduPlane.elf" -gnome-terminal -e /tmp/ArduPlane.build/ArduPlane.elf -#gnome-terminal -e "valgrind -q /tmp/ArduPlane.build/ArduPlane.elf" -sleep 2 -rm -f $tfile -gnome-terminal -e '../Tools/autotest/jsbsim/runsim.py --home=-35.362938,149.165085,584,270' -sleep 2 -popd -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 --mav10 diff --git a/Tools/autotest/sim_arduplane_elevon.sh b/Tools/autotest/sim_arduplane_elevon.sh deleted file mode 100755 index 5ac674a237..0000000000 --- a/Tools/autotest/sim_arduplane_elevon.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -killall -q JSBSim -killall -q ArduPlane.elf -pkill -f runsim.py - -set -e -set -x - -autotest=$(dirname $(readlink -e $0)) -pushd $autotest/../../ArduPlane -make clean sitl - -tfile=$(mktemp) -echo r > $tfile -#gnome-terminal -e "gdb -x $tfile --args /tmp/ArduPlane.build/ArduPlane.elf" -gnome-terminal -e /tmp/ArduPlane.build/ArduPlane.elf -#gnome-terminal -e "valgrind -q /tmp/ArduPlane.build/ArduPlane.elf" -sleep 2 -rm -f $tfile -gnome-terminal -e '../Tools/autotest/jsbsim/runsim.py --home=-35.362938,149.165085,584,270 --elevon' -sleep 2 -popd - -# if you wanted to forward packets out a serial link for testing -# andropilot, then add --out /dev/serial/by-id/usb-FTDI* to your -# command line along with a baudrate. You might also like to add --map -# and --console -# for example: -# sim_arduplane.sh --out /dev/serial/by-id/usb-FTDI* --baudrate 57600 --map --console - -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 $* - diff --git a/Tools/autotest/sim_arduplane_hil.sh b/Tools/autotest/sim_arduplane_hil.sh deleted file mode 100755 index c7b5063b68..0000000000 --- a/Tools/autotest/sim_arduplane_hil.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -killall -q JSBSim -pkill -f runsim.py - -set -e -set -x - -autotest=$(dirname $(readlink -e $0)) -cmd="../Tools/autotest/jsbsim/runsim.py --home=-35.362938,149.165085,584,270" -$autotest/run_in_terminal_window.sh "simulator" $cmd || exit 1 - -sleep 2 - -mavproxy.py --out 127.0.0.1:14550 --load-module=HIL $* - diff --git a/Tools/autotest/sim_arduplane_kingaroy.sh b/Tools/autotest/sim_arduplane_kingaroy.sh deleted file mode 100755 index 4734d0588c..0000000000 --- a/Tools/autotest/sim_arduplane_kingaroy.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -x - -killall -q ArduPlane.elf -pkill -f runsim.py -killall -q JSBSim -set -e - -autotest=$(dirname $(readlink -e $0)) -pushd $autotest/../../ArduPlane -make clean obc-sitl - -tfile=$(mktemp) -echo r > $tfile -#gnome-terminal -e "gdb -x $tfile --args /tmp/ArduPlane.build/ArduPlane.elf" -gnome-terminal -e /tmp/ArduPlane.build/ArduPlane.elf -#gnome-terminal -e "valgrind -q /tmp/ArduPlane.build/ArduPlane.elf" -sleep 2 -rm -f $tfile -gnome-terminal -e '../Tools/autotest/jsbsim/runsim.py --home=-26.582218,151.840113,440.3,169' -sleep 2 -popd -mavproxy.py --aircraft=test --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 $* - diff --git a/Tools/autotest/sim_arduplane_vtail.sh b/Tools/autotest/sim_arduplane_vtail.sh deleted file mode 100755 index 592fd24aa9..0000000000 --- a/Tools/autotest/sim_arduplane_vtail.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -killall -q JSBSim -killall -q ArduPlane.elf -pkill -f runsim.py - -set -e -set -x - -autotest=$(dirname $(readlink -e $0)) -pushd $autotest/../../ArduPlane -make clean sitl - -tfile=$(mktemp) -echo r > $tfile -#gnome-terminal -e "gdb -x $tfile --args /tmp/ArduPlane.build/ArduPlane.elf" -gnome-terminal -e /tmp/ArduPlane.build/ArduPlane.elf -#gnome-terminal -e "valgrind -q /tmp/ArduPlane.build/ArduPlane.elf" -sleep 2 -rm -f $tfile -gnome-terminal -e '../Tools/autotest/jsbsim/runsim.py --home=-35.362938,149.165085,584,270 --vtail' -sleep 2 -popd - -# if you wanted to forward packets out a serial link for testing -# andropilot, then add --out /dev/serial/by-id/usb-FTDI* to your -# command line along with a baudrate. You might also like to add --map -# and --console -# for example: -# sim_arduplane.sh --out /dev/serial/by-id/usb-FTDI* --baudrate 57600 --map --console - -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 $* - diff --git a/Tools/autotest/sim_rover_hil.sh b/Tools/autotest/sim_rover_hil.sh deleted file mode 100755 index 911031d7f4..0000000000 --- a/Tools/autotest/sim_rover_hil.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -set -x - -pkill -f sim_rover.py -set -e - -gnome-terminal -e "nice ../Tools/autotest/pysim/sim_rover.py --home=40.071374969556928,-105.22978898137808,1583.702759,246 --rate=400" -sleep 2 -mavproxy.py --aircraft=test --out 127.0.0.1:14550 --load-module=HIL $* diff --git a/Tools/autotest/sim_rover_skid.sh b/Tools/autotest/sim_rover_skid.sh deleted file mode 100755 index 3a88dc5758..0000000000 --- a/Tools/autotest/sim_rover_skid.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -set -x - -killall -q APMrover2.elf -pkill -f sim_rover.py -set -e - -autotest=$(dirname $(readlink -e $0)) -pushd $autotest/../../APMrover2 -make clean sitl - -tfile=$(mktemp) -( -echo r -) > $tfile -#gnome-terminal -e "gdb -x $tfile --args /tmp/APMrover2.build/APMrover2.elf" -gnome-terminal -e /tmp/APMrover2.build/APMrover2.elf -#gnome-terminal -e "valgrind --db-attach=yes -q /tmp/APMrover2.build/APMrover2.elf" -sleep 2 -rm -f $tfile -#gnome-terminal -e "../Tools/autotest/pysim/sim_rover.py --home=-35.362938,149.165085,584,270 --rate=400" -gnome-terminal -e "../Tools/autotest/pysim/sim_rover.py --skid-steering --home=-35.362938,149.165085,584,270 --rate=400" -sleep 2 -popd -mavproxy.py --aircraft=test --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 diff --git a/Tools/autotest/sim_vehicle.sh b/Tools/autotest/sim_vehicle.sh index b365d80018..4b2db40266 100755 --- a/Tools/autotest/sim_vehicle.sh +++ b/Tools/autotest/sim_vehicle.sh @@ -318,7 +318,7 @@ for more details EOF exit 1 fi - RUNSIM="nice $autotest/jsbsim/runsim.py --home=$SIMHOME --simin=$SIMIN_PORT --simout=$SIMOUT_PORT --fgout=$FG_PORT $EXTRA_SIM" + RUNSIM="nice $autotest/jsb_sim/runsim.py --home=$SIMHOME --simin=$SIMIN_PORT --simout=$SIMOUT_PORT --fgout=$FG_PORT $EXTRA_SIM" PARMS="ArduPlane.parm" if [ $WIPE_EEPROM == 1 ]; then cmd="$cmd -PFORMAT_VERSION=13 -PSKIP_GYRO_CAL=1 -PRC3_MIN=1000 -PRC3_TRIM=1000"