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
068c310e
Commit
068c310e
authored
8 years ago
by
Peter Barker
Browse files
Options
Downloads
Patches
Plain Diff
Tools: remove hard-coded FRAME global, specify same via parameter
parent
2c0b687b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tools/autotest/arducopter.py
+6
-5
6 additions, 5 deletions
Tools/autotest/arducopter.py
with
6 additions
and
5 deletions
Tools/autotest/arducopter.py
+
6
−
5
View file @
068c310e
...
...
@@ -21,7 +21,6 @@ from pysim import util
# get location of scripts
testdir
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
FRAME
=
'
+
'
HOME
=
mavutil
.
location
(
-
35.362938
,
149.165085
,
584
,
270
)
AVCHOME
=
mavutil
.
location
(
40.072842
,
-
105.230575
,
1586
,
0
)
...
...
@@ -954,7 +953,7 @@ def setup_rc(mavproxy):
mavproxy
.
send
(
'
rc 3 1000
\n
'
)
def
fly_ArduCopter
(
binary
,
viewerip
=
None
,
use_map
=
False
,
valgrind
=
False
,
gdb
=
False
):
def
fly_ArduCopter
(
binary
,
viewerip
=
None
,
use_map
=
False
,
valgrind
=
False
,
gdb
=
False
,
frame
=
'
+
'
,
params_file
=
None
):
"""
Fly ArduCopter in SITL.
you can pass viewerip as an IP address to optionally send fg and
...
...
@@ -963,12 +962,14 @@ def fly_ArduCopter(binary, viewerip=None, use_map=False, valgrind=False, gdb=Fal
global
homeloc
home
=
"
%f,%f,%u,%u
"
%
(
HOME
.
lat
,
HOME
.
lng
,
HOME
.
alt
,
HOME
.
heading
)
sitl
=
util
.
start_SITL
(
binary
,
wipe
=
True
,
model
=
'
+
'
,
home
=
home
,
speedup
=
speedup_default
)
sitl
=
util
.
start_SITL
(
binary
,
wipe
=
True
,
model
=
frame
,
home
=
home
,
speedup
=
speedup_default
)
mavproxy
=
util
.
start_MAVProxy_SITL
(
'
ArduCopter
'
,
options
=
'
--sitl=127.0.0.1:5501 --out=127.0.0.1:19550 --quadcopter
'
)
mavproxy
.
expect
(
'
Received [0-9]+ parameters
'
)
# setup test parameters
mavproxy
.
send
(
"
param load %s/default_params/copter.parm
\n
"
%
testdir
)
if
params_file
is
None
:
params_file
=
"
{testdir}/default_params/copter.parm
"
mavproxy
.
send
(
"
param load %s
\n
"
%
params_file
.
format
(
testdir
=
testdir
))
mavproxy
.
expect
(
'
Loaded [0-9]+ parameters
'
)
mavproxy
.
send
(
"
param set LOG_REPLAY 1
\n
"
)
mavproxy
.
send
(
"
param set LOG_DISARMED 1
\n
"
)
...
...
@@ -978,7 +979,7 @@ def fly_ArduCopter(binary, viewerip=None, use_map=False, valgrind=False, gdb=Fal
util
.
pexpect_close
(
mavproxy
)
util
.
pexpect_close
(
sitl
)
sitl
=
util
.
start_SITL
(
binary
,
model
=
'
+
'
,
home
=
home
,
speedup
=
speedup_default
,
valgrind
=
valgrind
,
gdb
=
gdb
)
sitl
=
util
.
start_SITL
(
binary
,
model
=
frame
,
home
=
home
,
speedup
=
speedup_default
,
valgrind
=
valgrind
,
gdb
=
gdb
)
options
=
'
--sitl=127.0.0.1:5501 --out=127.0.0.1:19550 --quadcopter --streamrate=5
'
if
viewerip
:
options
+=
'
--out=%s:14550
'
%
viewerip
...
...
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