Skip to content

Commit 9960ab4

Browse files
committed
Put the router & base station diagnostics into Networking, update the wireless watcher to use the correct flag
1 parent 38b60aa commit 9960ab4

File tree

1 file changed

+25
-3
lines changed
  • clearpath_generator_common/clearpath_generator_common/param

1 file changed

+25
-3
lines changed

clearpath_generator_common/clearpath_generator_common/param/platform.py

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
from clearpath_config.manipulators.types.arms import Franka
4040
from clearpath_config.manipulators.types.grippers import FrankaGripper
4141
from clearpath_config.platform.battery import BatteryConfig
42+
from clearpath_config.platform.wireless import PeplinkRouter
4243
from clearpath_config.sensors.types.cameras import BaseCamera, IntelRealsense
4344
from clearpath_config.sensors.types.gps import BaseGPS, NMEA
4445
from clearpath_config.sensors.types.imu import BaseIMU, PhidgetsSpatial
@@ -369,16 +370,37 @@ def generate_parameters(self, use_sim_time: bool = False) -> None:
369370
}
370371
})
371372

372-
if self.clearpath_config.platform.enable_wireless_watcher:
373+
# We have a few optional nodes that go into the Networking section
374+
# collect them all and then create the aggregator node
375+
networking_contains = []
376+
networking_expected = []
377+
378+
if self.clearpath_config.platform.wireless.enable_wireless_watcher:
379+
networking_contains.append('Wi-Fi')
380+
networking_expected.append('wireless_watcher: Wi-Fi Monitor')
381+
382+
if self.clearpath_config.platform.wireless.router:
383+
if self.clearpath_config.platform.wireless.router == PeplinkRouter.MODEL:
384+
networking_contains.append('Peplink Router')
385+
networking_expected.append('router_node: Peplink Router')
386+
# Put additional supported router hardware here...
387+
388+
if self.clearpath_config.platform.wireless.base_station:
389+
if self.clearpath_config.platform.wireless.base_station == PeplinkRouter.MODEL:
390+
networking_contains.append('Peplink Base Station')
391+
networking_expected.append('base_station_node: Peplink Base Station')
392+
# Put additional supported base station hardware here...
393+
394+
if len(networking_contains) > 0:
373395
self.param_file.update({
374396
self.DIAGNOSTIC_AGGREGATOR_NODE: {
375397
'platform': {
376398
'analyzers': {
377399
'networking': {
378400
'type': 'diagnostic_aggregator/GenericAnalyzer',
379401
'path': 'Networking',
380-
'contains': ['Wi-Fi'],
381-
'expected': ['wireless_watcher: Wi-Fi Monitor']
402+
'contains': networking_contains,
403+
'expected': networking_expected,
382404
}
383405
}
384406
}

0 commit comments

Comments
 (0)