autotest: rename jsmsim folder to jsb_sim

this prevents problems on windows with virtualbox. It tries to run
JSBSim as the directory 'jsbsim' and fails
This commit is contained in:
Andrew Tridgell 2015-04-14 09:04:11 +10:00
parent e2071a4630
commit d4e9418ad4
14 changed files with 8 additions and 223 deletions

View File

@ -440,7 +440,7 @@ def fly_ArduPlane(viewerip=None, map=False):
if map: if map:
options += ' --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) cmd += " --speedup=100 --home=%s --wind=%s" % (HOME_LOCATION, WIND)
if viewerip: if viewerip:
cmd += " --fgout=%s:5503" % viewerip cmd += " --fgout=%s:5503" % viewerip

View File

@ -53,14 +53,14 @@ def setup_template(home):
baseport = int(opts.simout.split(':')[1]) baseport = int(opts.simout.split(':')[1])
template = os.path.join('jsbsim', 'fgout_template.xml') template = os.path.join('jsb_sim', 'fgout_template.xml')
out = os.path.join('jsbsim', 'fgout.xml') out = os.path.join('jsb_sim', 'fgout.xml')
xml = open(template).read() % { 'FGOUTPORT' : str(baseport+3) } xml = open(template).read() % { 'FGOUTPORT' : str(baseport+3) }
open(out, mode='w').write(xml) open(out, mode='w').write(xml)
print("Wrote %s" % out) print("Wrote %s" % out)
template = os.path.join('jsbsim', 'rascal_test_template.xml') template = os.path.join('jsb_sim', 'rascal_test_template.xml')
out = os.path.join('jsbsim', 'rascal_test.xml') out = os.path.join('jsb_sim', 'rascal_test.xml')
xml = open(template).read() % { 'JSBCONSOLEPORT' : str(baseport+4) } xml = open(template).read() % { 'JSBCONSOLEPORT' : str(baseport+4) }
open(out, mode='w').write(xml) open(out, mode='w').write(xml)
print("Wrote %s" % out) 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("--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("--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("--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("--options", type='string', help='jsbsim startup options')
parser.add_option("--elevon", action='store_true', default=False, help='assume elevon input') 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') 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) setup_template(opts.home)
# start child # 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: if opts.options:
cmd += ' %s' % opts.options cmd += ' %s' % opts.options

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 $*

View File

@ -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 $*

View File

@ -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 $*

View File

@ -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 $*

View File

@ -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 $*

View File

@ -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

View File

@ -318,7 +318,7 @@ for more details
EOF EOF
exit 1 exit 1
fi 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" PARMS="ArduPlane.parm"
if [ $WIPE_EEPROM == 1 ]; then if [ $WIPE_EEPROM == 1 ]; then
cmd="$cmd -PFORMAT_VERSION=13 -PSKIP_GYRO_CAL=1 -PRC3_MIN=1000 -PRC3_TRIM=1000" cmd="$cmd -PFORMAT_VERSION=13 -PSKIP_GYRO_CAL=1 -PRC3_MIN=1000 -PRC3_TRIM=1000"