|
39 | 39 | from clearpath_config.manipulators.types.arms import Franka |
40 | 40 | from clearpath_config.manipulators.types.grippers import FrankaGripper |
41 | 41 | from clearpath_config.platform.battery import BatteryConfig |
| 42 | +from clearpath_config.platform.wireless import PeplinkRouter |
42 | 43 | from clearpath_config.sensors.types.cameras import BaseCamera, IntelRealsense |
43 | 44 | from clearpath_config.sensors.types.gps import BaseGPS, NMEA |
44 | 45 | from clearpath_config.sensors.types.imu import BaseIMU, PhidgetsSpatial |
@@ -369,16 +370,37 @@ def generate_parameters(self, use_sim_time: bool = False) -> None: |
369 | 370 | } |
370 | 371 | }) |
371 | 372 |
|
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: |
373 | 395 | self.param_file.update({ |
374 | 396 | self.DIAGNOSTIC_AGGREGATOR_NODE: { |
375 | 397 | 'platform': { |
376 | 398 | 'analyzers': { |
377 | 399 | 'networking': { |
378 | 400 | 'type': 'diagnostic_aggregator/GenericAnalyzer', |
379 | 401 | 'path': 'Networking', |
380 | | - 'contains': ['Wi-Fi'], |
381 | | - 'expected': ['wireless_watcher: Wi-Fi Monitor'] |
| 402 | + 'contains': networking_contains, |
| 403 | + 'expected': networking_expected, |
382 | 404 | } |
383 | 405 | } |
384 | 406 | } |
|
0 commit comments