Skip to content

Commit

Permalink
selfcheck: add vpe or mocap data checking
Browse files Browse the repository at this point in the history
  • Loading branch information
okalachev committed Oct 19, 2018
1 parent 802d04e commit d376bc0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion clever/src/selfcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ def check_aruco():
failure('No aruco_pose/debug messages')


@check('Visual position estimate')
def check_vpe():
try:
rospy.wait_for_message('mavros/vision_pose/pose', PoseStamped, timeout=1)
except rospy.ROSException:
try:
rospy.wait_for_message('mavros/mocap/pose', PoseStamped, timeout=1)
except rospy.ROSException:
failure('No VPE or MoCap messages')


@check('Simple offboard node')
def check_simpleoffboard():
try:
Expand Down Expand Up @@ -142,7 +153,7 @@ def check_velocity():
@check('Global position (GPS)')
def check_global_position():
try:
rospy.wait_for_message('mavros/global_position/global', NavSatFix, timeout=2)
rospy.wait_for_message('mavros/global_position/global', NavSatFix, timeout=1)
except rospy.ROSException:
failure('No global position')

Expand Down Expand Up @@ -208,6 +219,7 @@ def selfcheck():
check_aruco()
check_simpleoffboard()
check_optical_flow()
check_vpe()
check_rangefinder()
check_cpu_usage()
check_boot_duration()
Expand Down

0 comments on commit d376bc0

Please sign in to comment.