File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ def update_dict(self, data):
6868 peer = wireless_keys
6969 if 'rssi' in state [wireless_channel ][peer ].keys ():
7070 mac = state [wireless_channel ][peer ]['mac' ]
71+ if mac not in self .MAC_DICT .keys ():
72+ rospy .logerr (f"MAC: { mac } is not in the list of knowns MACs. Is your radio_configs.yaml file correct?" )
73+ continue
7174 rssi = state [wireless_channel ][peer ]['rssi' ]
7275 self .MAC_DICT [mac ]['rssi' ] = rssi
7376 self .MAC_DICT [mac ]['timestamp' ] = rospy .Time .now ()
@@ -81,6 +84,9 @@ def update_dict(self, data):
8184 f"active radio { self .MAC_DICT [mac ]['radio' ]} not assigned to any robot" )
8285 elif 'mac' in state [wireless_channel ][peer ].keys () and 'rssi' not in state [wireless_channel ][peer ].keys ():
8386 mac = state [wireless_channel ][peer ]['mac' ]
87+ if mac not in self .MAC_DICT .keys ():
88+ rospy .logerr (f"MAC: { mac } is not in the list of knowns MACs. Is your radio_configs.yaml file correct?" )
89+ continue
8490 if rospy .Time .now ()- self .MAC_DICT [mac ]['timestamp' ] > dt :
8591 self .MAC_DICT [mac ]['rssi' ] = no_rssi
8692 # Only publish if the publisher is not None
You can’t perform that action at this time.
0 commit comments