Skip to content

Commit

Permalink
MOLA system yaml files: added "enabled" optional property for modules…
Browse files Browse the repository at this point in the history
… and rds visualizers
  • Loading branch information
jlblancoc committed Dec 17, 2024
1 parent 8933672 commit fff8405
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ modules:
# ------------------
- type: mola::WheelOdometry
name: wheel_odometry_fe
launch_ignore: true
enabled: false
raw_data_source: dataset_input
raw_sensor_label: ODOMETRY
params:
Expand All @@ -59,7 +59,7 @@ modules:
# ------------------
- type: mola::LidarOdometry
name: lidar_fe
launch_ignore: false
#enabled: true
raw_data_source: dataset_input
raw_sensor_label: SICK_FRONT_OBS
params:
Expand Down
3 changes: 3 additions & 0 deletions mola_kernel/src/interfaces/RawDataSourceBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ void RawDataSourceBase::initialize(const Yaml& cfg)
const auto win_pos =
sensor.getOrDefault<std::string>("win_pos", "");

// Allow quickly disabling sections:
if (!sensor.getOrDefault("enabled", true)) continue;

ASSERTMSG_(
sensor_preview_gui_.find(label) == sensor_preview_gui_.end(),
mrpt::format(
Expand Down
2 changes: 1 addition & 1 deletion mola_launcher/src/MolaLauncherApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ void MolaLauncherApp::setup(
ENSURE_YAML_ENTRY_EXISTS(ds, "params");

// Allow quickly disabling sections:
if (ds.getOrDefault("launch_ignore", false)) continue;
if (!ds.getOrDefault("enabled", true)) continue;

const auto ds_label = ds["name"].as<std::string>();
ASSERTMSG_(!ds_label.empty(), "`name` cannot be empty!");
Expand Down

0 comments on commit fff8405

Please sign in to comment.