6 from jsk_rviz_plugins.msg
import OverlayText
7 from std_msgs.msg
import Float32
8 from threading
import Lock
12 g_angle_error_msg =
None 13 g_distance_error_msg =
None 15 global g_angle_error_msg
17 g_angle_error_msg = msg
19 global g_distance_error_msg
21 g_distance_error_msg = msg
24 if g_distance_error_msg
and g_angle_error_msg:
25 text_interface.publish(
"""RMS Distance Error: {0} 26 RMS Angular Error: {1}""".format(g_distance_error_msg.data, g_angle_error_msg.data))
29 if __name__ ==
"__main__":
30 rospy.init_node(
"tracking_info")
32 sub = rospy.Subscriber(
"~rms_angle_error", Float32, angle_error_callback)
33 sub2 = rospy.Subscriber(
"~rms_distance_error", Float32, distance_error_callback)
34 rospy.Timer(rospy.Duration(0.1), publish_text)
def angle_error_callback(msg)
def distance_error_callback(msg)