From 8ac757598d2f623ff3f2e0299b7e33638ffc947f Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Fri, 11 Nov 2022 06:22:54 +0600 Subject: [PATCH] selfcheck.py: fix known_vertical description --- clover/src/selfcheck.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/clover/src/selfcheck.py b/clover/src/selfcheck.py index 810c86c9..371dc8b5 100755 --- a/clover/src/selfcheck.py +++ b/clover/src/selfcheck.py @@ -402,13 +402,14 @@ def check_aruco(): except KeyError: failure('aruco_detect/length parameter is not set') known_vertical = rospy.get_param('aruco_detect/known_vertical', '') - flip_vertical = str(rospy.get_param('aruco_detect/flip_vertical', False)) + flip_vertical = rospy.get_param('aruco_detect/flip_vertical', False) + description = '' if known_vertical == 'map' and not flip_vertical: - flip_vertical += ' (all markers are on the floor)' + description = ' (all markers are on the floor)' elif known_vertical == 'map' and flip_vertical: - flip_vertical += ' (all markers are on the ceiling)' + description = ' (all markers are on the ceiling)' info('aruco_detect/known_vertical = %s', known_vertical) - info('aruco_detect/flip_vertical = %s', flip_vertical) + info('aruco_detect/flip_vertical = %s%s', flip_vertical, description) try: markers = rospy.wait_for_message('aruco_detect/markers', MarkerArray, timeout=0.8) except rospy.ROSException: @@ -420,13 +421,14 @@ def check_aruco(): if is_process_running('aruco_map', full=True): known_vertical = rospy.get_param('aruco_map/known_vertical', '') - flip_vertical = str(rospy.get_param('aruco_map/flip_vertical', False)) + flip_vertical = rospy.get_param('aruco_map/flip_vertical', False) + description = '' if known_vertical == 'map' and not flip_vertical: - flip_vertical += ' (markers map is on the floor)' + description += ' (markers map is on the floor)' elif known_vertical == 'map' and flip_vertical: - flip_vertical += ' (markers map is on the ceiling)' + description += ' (markers map is on the ceiling)' info('aruco_map/known_vertical = %s', known_vertical) - info('aruco_map/flip_vertical = %s', flip_vertical) + info('aruco_map/flip_vertical = %s%s', flip_vertical, description) try: visualization = rospy.wait_for_message('aruco_map/visualization', VisualizationMarkerArray, timeout=0.8)