1 import roslib; roslib.load_manifest(
'webui')
5 from diagnostic_msgs.msg
import DiagnosticArray, DiagnosticStatus, KeyValue
9 def __init__(self, topic, factory, main_rwt):
14 for status
in statuses:
15 if not status.name.startswith(
'/'):
16 status.name =
'/' + status.name
18 def top_only(status):
return status.name.count(
"/") < 2
19 filtered_statuses = filter(top_only, statuses)
20 levels = [status.level
for status
in filtered_statuses]
22 new_message = DiagnosticStatus()
23 new_message.name =
"Robot Status" 24 new_message.level = max(levels)
34 for status
in statuses:
35 if not status.name.startswith(
'/'):
36 status.name =
'/' + status.name
38 def top_only(status):
return status.name.count(
"/") < 2
39 filtered_statuses = filter(top_only, statuses)
46 new_message = DiagnosticArray()
47 new_message.status = filtered_statuses
59 for status
in statuses:
60 if not status.name.startswith(
'/'):
61 status.name =
'/' + status.name
63 def device(status):
return status.name.startswith(subtopic)
64 filtered_statuses = filter(device, statuses)
66 new_message = DiagnosticArray()
67 new_message.status = filtered_statuses
72 context.register_subtopic(
"/diagnostics_agg:filter", FilterDevice)
73 context.register_subtopic(
"/diagnostics_agg:Summary", Summary)
74 context.register_subtopic(
"/diagnostics_agg:Status", Status)
def __init__(self, topic, factory, main_rwt)
def config_plugin(context)
def __init__(self, topic, factory, main_rwt)
def __init__(self, topic, factory, main_rwt)
def __init__(self, topic, factory, main_rwt)