2011-12-12 22:50:06 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2013-02-10 20:40:52 -04:00
|
|
|
killall -q ArduCopter.elf
|
|
|
|
pkill -f sim_multicopter.py
|
|
|
|
|
2011-12-12 22:50:06 -04:00
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2013-02-10 20:40:52 -04:00
|
|
|
target=sitl
|
|
|
|
frame="+"
|
2012-01-04 04:34:28 -04:00
|
|
|
|
2013-02-10 20:40:52 -04:00
|
|
|
if [ $# -gt 0 ]; then
|
|
|
|
case $1 in
|
|
|
|
+|X|quad)
|
|
|
|
target="sitl"
|
|
|
|
frame="$1"
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
octa)
|
|
|
|
target="sitl-octa"
|
|
|
|
frame="$1"
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
2012-01-04 04:34:28 -04:00
|
|
|
|
|
|
|
echo "Building with target $target for frame $frame"
|
|
|
|
|
2011-12-12 22:50:06 -04:00
|
|
|
autotest=$(dirname $(readlink -e $0))
|
|
|
|
pushd $autotest/../../ArduCopter
|
2012-01-04 04:34:28 -04:00
|
|
|
make clean $target
|
2011-12-12 22:50:06 -04:00
|
|
|
|
2012-06-27 18:28:00 -03:00
|
|
|
tfile=$(mktemp)
|
2011-12-12 22:50:06 -04:00
|
|
|
echo r > $tfile
|
2012-06-04 22:18:45 -03:00
|
|
|
#gnome-terminal -e "gdb -x $tfile --args /tmp/ArduCopter.build/ArduCopter.elf"
|
|
|
|
gnome-terminal -e /tmp/ArduCopter.build/ArduCopter.elf
|
2012-02-12 21:38:10 -04:00
|
|
|
#gnome-terminal -e "valgrind -q /tmp/ArduCopter.build/ArduCopter.elf"
|
2011-12-12 22:50:06 -04:00
|
|
|
sleep 2
|
|
|
|
rm -f $tfile
|
2013-05-28 00:22:24 -03:00
|
|
|
gnome-terminal -e "../Tools/autotest/pysim/sim_multicopter.py --frame=$frame --home=-35.362938,149.165085,584,180"
|
2011-12-12 22:50:06 -04:00
|
|
|
sleep 2
|
2011-12-15 08:34:20 -04:00
|
|
|
popd
|
2013-02-10 20:40:52 -04:00
|
|
|
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 $*
|