Skip to content

Feature/monitor default sensors #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from clearpath_config.common.utils.dictionary import merge_dict, replace_dict_items
from clearpath_config.platform.battery import BatteryConfig
from clearpath_config.sensors.types.cameras import BaseCamera, IntelRealsense
from clearpath_config.sensors.types.gps import BaseGPS
from clearpath_config.sensors.types.gps import BaseGPS, NMEA
from clearpath_config.sensors.types.imu import BaseIMU, PhidgetsSpatial
from clearpath_config.sensors.types.lidars_2d import BaseLidar2D
from clearpath_config.sensors.types.lidars_3d import BaseLidar3D
Expand Down Expand Up @@ -224,8 +224,10 @@ def __init__(self,
def generate_parameters(self, use_sim_time: bool = False) -> None:
super().generate_parameters(use_sim_time)

platform_model = self.clearpath_config.get_platform_model()

# Add MCU diagnostic category for all platforms except A200
if self.clearpath_config.get_platform_model() != Platform.A200:
if platform_model != Platform.A200:
self.param_file.update({
self.DIAGNOSTIC_AGGREGATOR_NODE: {
'platform': {
Expand All @@ -245,7 +247,7 @@ def generate_parameters(self, use_sim_time: bool = False) -> None:
})

# Add Lighting for every platform except A200 and J100
if self.clearpath_config.get_platform_model() not in (Platform.A200, Platform.J100):
if platform_model not in (Platform.A200, Platform.J100):
self.param_file.update({
self.DIAGNOSTIC_AGGREGATOR_NODE: {
'platform': {
Expand All @@ -264,7 +266,7 @@ def generate_parameters(self, use_sim_time: bool = False) -> None:
})

# Add cooling for A300 only for now
if self.clearpath_config.get_platform_model() == Platform.A300:
if platform_model == Platform.A300:
self.param_file.update({
self.DIAGNOSTIC_AGGREGATOR_NODE: {
'platform': {
Expand Down Expand Up @@ -316,6 +318,20 @@ def generate_parameters(self, use_sim_time: bool = False) -> None:

sensor_analyzers = {}

if platform_model not in (Platform.A300, Platform.A200):
sensor_analyzers['imu'] = {
'type': 'diagnostic_aggregator/GenericAnalyzer',
'path': 'IMU',
'contains': ['imu']
}

if platform_model == Platform.J100:
sensor_analyzers['gps'] = {
'type': 'diagnostic_aggregator/GenericAnalyzer',
'path': 'GPS',
'contains': ['gps']
}

# List all topics to be monitored from each launched sensor
for sensor in self.clearpath_config.sensors.get_all_sensors():

Expand Down Expand Up @@ -457,6 +473,30 @@ def generate_parameters(self, use_sim_time: bool = False) -> None:
}
})

if platform_model not in (Platform.A300, Platform.A200):
self.param_file.update({
self.DIAGNOSTIC_UPDATER_NODE: {
'topics': {
'sensors/imu_0/data': {
'type': BaseIMU.TOPICS.TYPE[BaseIMU.TOPICS.DATA],
'rate': 50.0
}
}
}
})

if platform_model == Platform.J100:
self.param_file.update({
self.DIAGNOSTIC_UPDATER_NODE: {
'topics': {
'sensors/gps_0/fix': {
'type': NMEA.TOPICS.TYPE[NMEA.TOPICS.FIX],
'rate': 10.0
}
}
}
})

# List all topics to be monitored from each launched sensor
for sensor in self.clearpath_config.sensors.get_all_sensors():

Expand Down