selfcheck.py: add checking map->base_link tf transform

This commit is contained in:
Oleg Kalachev
2022-01-21 23:22:33 +03:00
parent a525714e3a
commit fb47858010

View File

@@ -485,6 +485,9 @@ def check_local_position():
failure('roll is %.2f deg; place copter horizontally or redo level horizon calib',
math.degrees(roll))
if not tf_buffer.can_transform('base_link', pose.header.frame_id, rospy.get_rostime(), rospy.Duration(0.5)):
failure('can\'t transform from %s to base_link (timeout 0.5 s): is TF enabled?', pose.header.frame_id)
except rospy.ROSException:
failure('no local position')