aboutsummaryrefslogtreecommitdiff
path: root/integrationtests
diff options
context:
space:
mode:
authorAndreas Antener <antener_a@gmx.ch>2015-03-15 09:51:38 +0100
committerAndreas Antener <antener_a@gmx.ch>2015-03-15 12:48:51 +0100
commit2bbad206961ec4bf1e78ac8b6689634fa3e482b8 (patch)
tree31919f80156f5456c706d5701a0c154bca714739 /integrationtests
parent8ada8dc648e730c6dd4efefada1f77e8dd732e68 (diff)
downloadpx4-firmware-2bbad206961ec4bf1e78ac8b6689634fa3e482b8.tar.gz
px4-firmware-2bbad206961ec4bf1e78ac8b6689634fa3e482b8.tar.bz2
px4-firmware-2bbad206961ec4bf1e78ac8b6689634fa3e482b8.zip
fixed some warnings and updated comments
Diffstat (limited to 'integrationtests')
-rwxr-xr-xintegrationtests/demo_tests/mavros_offboard_attctl_test.py20
1 files changed, 6 insertions, 14 deletions
diff --git a/integrationtests/demo_tests/mavros_offboard_attctl_test.py b/integrationtests/demo_tests/mavros_offboard_attctl_test.py
index 73cfe5a81..ecad9df4d 100755
--- a/integrationtests/demo_tests/mavros_offboard_attctl_test.py
+++ b/integrationtests/demo_tests/mavros_offboard_attctl_test.py
@@ -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