Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ardupilot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SASC
ardupilot
Commits
fe6e83f7
Commit
fe6e83f7
authored
12 years ago
by
Andrew Tridgell
Browse files
Options
Downloads
Patches
Plain Diff
autotest: added support for vtail testing in runsim
virtual vtail support
parent
777c6a30
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Tools/autotest/jsbsim/runsim.py
+9
-0
9 additions, 0 deletions
Tools/autotest/jsbsim/runsim.py
Tools/autotest/sim_arduplane_vtail.sh
+33
-0
33 additions, 0 deletions
Tools/autotest/sim_arduplane_vtail.sh
with
42 additions
and
0 deletions
Tools/autotest/jsbsim/runsim.py
+
9
−
0
View file @
fe6e83f7
...
...
@@ -74,6 +74,14 @@ def process_sitl_input(buf):
aileron
=
(
ch2
-
ch1
)
/
2.0
# the minus does away with the need for RC2_REV=-1
elevator
=
-
(
ch2
+
ch1
)
/
2.0
if
opts
.
vtail
:
# fake an elevon plane
ch1
=
elevator
ch2
=
rudder
# this matches VTAIL_OUTPUT==2
elevator
=
(
ch2
-
ch1
)
/
2.0
rudder
=
(
ch2
+
ch1
)
/
2.0
if
aileron
!=
sitl_state
.
aileron
:
jsb_set
(
'
fcs/aileron-cmd-norm
'
,
aileron
)
...
...
@@ -147,6 +155,7 @@ parser.add_option("--home", type='string', help="home lat,lng,alt,hdg (requir
parser
.
add_option
(
"
--script
"
,
type
=
'
string
'
,
help
=
'
jsbsim model script
'
,
default
=
'
jsbsim/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
(
"
--vtail
"
,
action
=
'
store_true
'
,
default
=
False
,
help
=
'
assume vtail input
'
)
parser
.
add_option
(
"
--wind
"
,
dest
=
"
wind
"
,
help
=
"
Simulate wind (speed,direction,turbulance)
"
,
default
=
'
0,0,0
'
)
(
opts
,
args
)
=
parser
.
parse_args
()
...
...
This diff is collapsed.
Click to expand it.
Tools/autotest/sim_arduplane_vtail.sh
0 → 100755
+
33
−
0
View file @
fe6e83f7
#!/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
$*
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment