39 PKG =
'diagnostic_aggregator' 41 import roslib; roslib.load_manifest(PKG)
45 from time
import sleep
47 from diagnostic_msgs.msg
import DiagnosticArray, DiagnosticStatus
49 if __name__ ==
'__main__':
50 rospy.init_node(
'diag_pub')
51 pub = rospy.Publisher(
'/diagnostics', DiagnosticArray, queue_size=10)
53 start_time = rospy.get_time()
55 while not rospy.is_shutdown():
56 array = DiagnosticArray()
57 array.header.stamp = rospy.get_rostime()
60 DiagnosticStatus(0,
'multi',
'OK',
'', []),
61 DiagnosticStatus(1,
'Something',
'OK',
'', []),
62 DiagnosticStatus(2,
'Something Else',
'OK',
'', []),
65 DiagnosticStatus(2,
'other2',
'OK',
'', []),
66 DiagnosticStatus(0,
'other3',
'OK',
'', [])]