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
2bbad206
Commit
2bbad206
authored
10 years ago
by
Andreas Antener
Browse files
Options
Downloads
Patches
Plain Diff
fixed some warnings and updated comments
parent
8ada8dc6
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_attctl_test.py
+6
-14
6 additions, 14 deletions
integrationtests/demo_tests/mavros_offboard_attctl_test.py
with
6 additions
and
14 deletions
integrationtests/demo_tests/mavros_offboard_attctl_test.py
+
6
−
14
View file @
2bbad206
...
...
@@ -37,29 +37,20 @@
#
PKG
=
'
px4
'
import
sys
import
unittest
import
rospy
import
math
from
numpy
import
linalg
import
numpy
as
np
from
px4.msg
import
vehicle_control_mode
from
std_msgs.msg
import
Header
from
std_msgs.msg
import
Float64
from
geometry_msgs.msg
import
PoseStamped
,
Quaternion
from
tf.transformations
import
quaternion_from_euler
from
mavros.srv
import
CommandBool
from
manual_input
import
ManualInput
#
# Tests flying a path in offboard control by sending
position
setpoints
# Tests flying a path in offboard control by sending
attitude and thrust
setpoints
# over MAVROS.
#
# For the test to be successful it needs to reach all setpoints in a certain time.
# FIXME: add flight path assertion (needs transformation from ROS frame to NED)
# For the test to be successful it needs to cross a certain boundary in time.
#
class
MavrosOffboardAttctlTest
(
unittest
.
TestCase
):
...
...
@@ -106,14 +97,15 @@ class MavrosOffboardAttctlTest(unittest.TestCase):
while
count
<
timeout
:
# update timestamp for each published SP
att
.
header
.
stamp
=
rospy
.
Time
.
now
()
self
.
pub_att
.
publish
(
att
)
self
.
rate
.
sleep
()
self
.
rate
.
sleep
()
# I'm guessing this is necessary to prevent timing issues
self
.
pub_thr
.
publish
(
throttle
)
self
.
rate
.
sleep
()
if
(
self
.
local_position
.
pose
.
position
.
x
>
5
and
self
.
local_position
.
pose
.
position
.
z
>
5
and
self
.
local_position
.
pose
.
position
.
y
<
-
5
):
and
self
.
local_position
.
pose
.
position
.
z
>
5
and
self
.
local_position
.
pose
.
position
.
y
<
-
5
):
break
count
=
count
+
1
...
...
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