Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Alberto Ruiz Garcia
Firmware
Commits
5d8516b3
Commit
5d8516b3
authored
10 years ago
by
Andreas Antener
Browse files
Options
Downloads
Patches
Plain Diff
wait on armin service and wait 2 seconds after calling it
parent
5706e1d7
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
integrationtests/demo_tests/mavros_offboard_posctl_test.py
+6
-0
6 additions, 0 deletions
integrationtests/demo_tests/mavros_offboard_posctl_test.py
with
6 additions
and
0 deletions
integrationtests/demo_tests/mavros_offboard_posctl_test.py
+
6
−
0
View file @
5d8516b3
...
...
@@ -55,12 +55,15 @@ class OffboardPosctlTest(unittest.TestCase):
def
setUp
(
self
):
rospy
.
init_node
(
'
test_node
'
,
anonymous
=
True
)
rospy
.
wait_for_service
(
'
px4_multicopter/mavros/cmd/arming
'
,
30
)
rospy
.
Subscriber
(
'
px4_multicopter/vehicle_control_mode
'
,
vehicle_control_mode
,
self
.
vehicle_control_mode_callback
)
rospy
.
Subscriber
(
"
px4_multicopter/mavros/position/local
"
,
PoseStamped
,
self
.
position_callback
)
self
.
pubSpt
=
rospy
.
Publisher
(
'
px4_multicopter/mavros/setpoint/local_position
'
,
PoseStamped
,
queue_size
=
10
)
self
.
cmdArm
=
rospy
.
ServiceProxy
(
"
px4_multicopter/mavros/cmd/arming
"
,
CommandBool
)
self
.
rate
=
rospy
.
Rate
(
10
)
# 10hz
self
.
rateSec
=
rospy
.
Rate
(
1
)
self
.
hasPos
=
False
self
.
controlMode
=
vehicle_control_mode
()
#
# General callback functions used in tests
...
...
@@ -121,6 +124,9 @@ class OffboardPosctlTest(unittest.TestCase):
#
def
test_posctl
(
self
):
self
.
assertTrue
(
self
.
arm
(),
"
Could not arm
"
)
self
.
rateSec
.
sleep
()
self
.
rateSec
.
sleep
()
self
.
assertTrue
(
self
.
controlMode
.
flag_armed
,
"
flag_armed is not set after 2 seconds
"
)
# prepare flight path assertion
positions
=
(
...
...
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