38
38
from clearpath_config .common .utils .dictionary import merge_dict , replace_dict_items
39
39
from clearpath_config .platform .battery import BatteryConfig
40
40
from clearpath_config .sensors .types .cameras import BaseCamera , IntelRealsense
41
- from clearpath_config .sensors .types .gps import BaseGPS
41
+ from clearpath_config .sensors .types .gps import BaseGPS , NMEA
42
42
from clearpath_config .sensors .types .imu import BaseIMU , PhidgetsSpatial
43
43
from clearpath_config .sensors .types .lidars_2d import BaseLidar2D
44
44
from clearpath_config .sensors .types .lidars_3d import BaseLidar3D
@@ -224,8 +224,10 @@ def __init__(self,
224
224
def generate_parameters (self , use_sim_time : bool = False ) -> None :
225
225
super ().generate_parameters (use_sim_time )
226
226
227
+ platform_model = self .clearpath_config .get_platform_model ()
228
+
227
229
# Add MCU diagnostic category for all platforms except A200
228
- if self . clearpath_config . get_platform_model () != Platform .A200 :
230
+ if platform_model != Platform .A200 :
229
231
self .param_file .update ({
230
232
self .DIAGNOSTIC_AGGREGATOR_NODE : {
231
233
'platform' : {
@@ -245,7 +247,7 @@ def generate_parameters(self, use_sim_time: bool = False) -> None:
245
247
})
246
248
247
249
# Add Lighting for every platform except A200 and J100
248
- if self . clearpath_config . get_platform_model () not in (Platform .A200 , Platform .J100 ):
250
+ if platform_model not in (Platform .A200 , Platform .J100 ):
249
251
self .param_file .update ({
250
252
self .DIAGNOSTIC_AGGREGATOR_NODE : {
251
253
'platform' : {
@@ -264,7 +266,7 @@ def generate_parameters(self, use_sim_time: bool = False) -> None:
264
266
})
265
267
266
268
# Add cooling for A300 only for now
267
- if self . clearpath_config . get_platform_model () == Platform .A300 :
269
+ if platform_model == Platform .A300 :
268
270
self .param_file .update ({
269
271
self .DIAGNOSTIC_AGGREGATOR_NODE : {
270
272
'platform' : {
@@ -316,6 +318,20 @@ def generate_parameters(self, use_sim_time: bool = False) -> None:
316
318
317
319
sensor_analyzers = {}
318
320
321
+ if platform_model not in (Platform .A300 , Platform .A200 ):
322
+ sensor_analyzers ['imu' ] = {
323
+ 'type' : 'diagnostic_aggregator/GenericAnalyzer' ,
324
+ 'path' : 'IMU' ,
325
+ 'contains' : ['imu' ]
326
+ }
327
+
328
+ if platform_model == Platform .J100 :
329
+ sensor_analyzers ['gps' ] = {
330
+ 'type' : 'diagnostic_aggregator/GenericAnalyzer' ,
331
+ 'path' : 'GPS' ,
332
+ 'contains' : ['gps' ]
333
+ }
334
+
319
335
# List all topics to be monitored from each launched sensor
320
336
for sensor in self .clearpath_config .sensors .get_all_sensors ():
321
337
@@ -457,6 +473,30 @@ def generate_parameters(self, use_sim_time: bool = False) -> None:
457
473
}
458
474
})
459
475
476
+ if platform_model not in (Platform .A300 , Platform .A200 ):
477
+ self .param_file .update ({
478
+ self .DIAGNOSTIC_UPDATER_NODE : {
479
+ 'topics' : {
480
+ 'sensors/imu_0/data' : {
481
+ 'type' : BaseIMU .TOPICS .TYPE [BaseIMU .TOPICS .DATA ],
482
+ 'rate' : 50.0
483
+ }
484
+ }
485
+ }
486
+ })
487
+
488
+ if platform_model == Platform .J100 :
489
+ self .param_file .update ({
490
+ self .DIAGNOSTIC_UPDATER_NODE : {
491
+ 'topics' : {
492
+ 'sensors/gps_0/fix' : {
493
+ 'type' : NMEA .TOPICS .TYPE [NMEA .TOPICS .FIX ],
494
+ 'rate' : 10.0
495
+ }
496
+ }
497
+ }
498
+ })
499
+
460
500
# List all topics to be monitored from each launched sensor
461
501
for sensor in self .clearpath_config .sensors .get_all_sensors ():
462
502
0 commit comments