mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 09:22:18 +00:00
lengthen offboard tests
* land after offboard flying complete * lengthen rostest time limit for tests (5 min ea)
This commit is contained in:
committed by
Daniel Agar
parent
ac61a04cd9
commit
752d43d94c
@@ -107,6 +107,7 @@ def read_plan_file(f):
|
||||
else:
|
||||
raise IOError("no mission items")
|
||||
|
||||
|
||||
class MavrosMissionTest(MavrosTestCommon):
|
||||
"""
|
||||
Run a mission
|
||||
@@ -198,8 +199,8 @@ class MavrosMissionTest(MavrosTestCommon):
|
||||
# advanced to next wp
|
||||
(index < self.mission_wp.current_seq)
|
||||
# end of mission
|
||||
or (index == (mission_length - 1)
|
||||
and self.mission_item_reached == index))
|
||||
or (index == (mission_length - 1) and
|
||||
self.mission_item_reached == index))
|
||||
|
||||
if reached:
|
||||
rospy.loginfo(
|
||||
@@ -257,8 +258,8 @@ class MavrosMissionTest(MavrosTestCommon):
|
||||
rospy.loginfo("run mission {0}".format(self.mission_name))
|
||||
for index, waypoint in enumerate(wps):
|
||||
# only check position for waypoints where this makes sense
|
||||
if (waypoint.frame == Waypoint.FRAME_GLOBAL_REL_ALT
|
||||
or waypoint.frame == Waypoint.FRAME_GLOBAL):
|
||||
if (waypoint.frame == Waypoint.FRAME_GLOBAL_REL_ALT or
|
||||
waypoint.frame == Waypoint.FRAME_GLOBAL):
|
||||
alt = waypoint.z_alt
|
||||
if waypoint.frame == Waypoint.FRAME_GLOBAL_REL_ALT:
|
||||
alt += self.altitude.amsl - self.altitude.relative
|
||||
@@ -280,8 +281,8 @@ class MavrosMissionTest(MavrosTestCommon):
|
||||
self.wait_for_vtol_state(transition, 60, index)
|
||||
|
||||
# after reaching position, wait for landing detection if applicable
|
||||
if (waypoint.command == mavutil.mavlink.MAV_CMD_NAV_VTOL_LAND
|
||||
or waypoint.command == mavutil.mavlink.MAV_CMD_NAV_LAND):
|
||||
if (waypoint.command == mavutil.mavlink.MAV_CMD_NAV_VTOL_LAND or
|
||||
waypoint.command == mavutil.mavlink.MAV_CMD_NAV_LAND):
|
||||
self.wait_for_landed_state(
|
||||
mavutil.mavlink.MAV_LANDED_STATE_ON_GROUND, 60, index)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user