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
5706e1d7
Commit
5706e1d7
authored
10 years ago
by
Andreas Antener
Browse files
Options
Downloads
Patches
Plain Diff
use mavros arming service to arm
parent
7fb82e74
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
+7
-0
7 additions, 0 deletions
integrationtests/demo_tests/mavros_offboard_posctl_test.py
with
7 additions
and
0 deletions
integrationtests/demo_tests/mavros_offboard_posctl_test.py
+
7
−
0
View file @
5706e1d7
...
...
@@ -49,6 +49,7 @@ from px4.msg import vehicle_control_mode
from
std_msgs.msg
import
Header
from
geometry_msgs.msg
import
PoseStamped
,
Quaternion
from
tf.transformations
import
quaternion_from_euler
from
mavros.srv
import
CommandBool
class
OffboardPosctlTest
(
unittest
.
TestCase
):
...
...
@@ -57,6 +58,7 @@ class OffboardPosctlTest(unittest.TestCase):
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
.
hasPos
=
False
...
...
@@ -111,10 +113,15 @@ class OffboardPosctlTest(unittest.TestCase):
self
.
assertTrue
(
count
<
timeout
,
"
took too long to get to position
"
)
def
arm
(
self
):
return
self
.
cmdArm
(
value
=
True
)
#
# Test offboard POSCTL
#
def
test_posctl
(
self
):
self
.
assertTrue
(
self
.
arm
(),
"
Could not arm
"
)
# prepare flight path assertion
positions
=
(
(
0
,
0
,
0
),
...
...
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