diff options
author | Andreas Antener <antener_a@gmx.ch> | 2015-03-13 20:36:45 +0100 |
---|---|---|
committer | Andreas Antener <antener_a@gmx.ch> | 2015-03-15 12:48:51 +0100 |
commit | 8ada8dc648e730c6dd4efefada1f77e8dd732e68 (patch) | |
tree | 9bd06a8b8bb7b26320cf3282cf13763a6cc82ec6 /integrationtests/demo_tests/mavros_offboard_attctl_test.py | |
parent | 3e02ab3cd72bcca6c2fe1160fa044ab687f86191 (diff) | |
download | px4-firmware-8ada8dc648e730c6dd4efefada1f77e8dd732e68.tar.gz px4-firmware-8ada8dc648e730c6dd4efefada1f77e8dd732e68.tar.bz2 px4-firmware-8ada8dc648e730c6dd4efefada1f77e8dd732e68.zip |
trying to fix timing issue
Diffstat (limited to 'integrationtests/demo_tests/mavros_offboard_attctl_test.py')
-rwxr-xr-x | integrationtests/demo_tests/mavros_offboard_attctl_test.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/integrationtests/demo_tests/mavros_offboard_attctl_test.py b/integrationtests/demo_tests/mavros_offboard_attctl_test.py index 4c850315b..73cfe5a81 100755 --- a/integrationtests/demo_tests/mavros_offboard_attctl_test.py +++ b/integrationtests/demo_tests/mavros_offboard_attctl_test.py @@ -70,7 +70,7 @@ class MavrosOffboardAttctlTest(unittest.TestCase): rospy.Subscriber("iris/mavros/position/local", PoseStamped, self.position_callback) self.pub_att = rospy.Publisher('iris/mavros/setpoint/attitude', PoseStamped, queue_size=10) self.pub_thr = rospy.Publisher('iris/mavros/setpoint/att_throttle', Float64, queue_size=10) - self.rate = rospy.Rate(10) # 10hz + self.rate = rospy.Rate(20) # 10hz self.has_pos = False self.control_mode = vehicle_control_mode() self.local_position = PoseStamped() @@ -107,14 +107,15 @@ class MavrosOffboardAttctlTest(unittest.TestCase): # update timestamp for each published SP att.header.stamp = rospy.Time.now() self.pub_att.publish(att) + self.rate.sleep() 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): break count = count + 1 - self.rate.sleep() self.assertTrue(self.control_mode.flag_armed, "flag_armed is not set") self.assertTrue(self.control_mode.flag_control_attitude_enabled, "flag_control_attitude_enabled is not set") |