fix(depth): forward the evidence-point keys to the layer namespace

Costmap2DROBOT copies a fixed list of observed_volume keys from obstacles/<source>
into <costmap>/obstacles/<source>. The three phase-1 keys were missing, so the
live layer always ran with their C++ defaults (evidence off, marking border 0)
whatever the runtime YAML said. Unit tests set the layer params directly and did
not catch it.

The factory test now checks that the runtime YAML values reach the layer.
This commit is contained in:
2026-10-15 13:40:26 +07:00
parent 5e38857e48
commit 6340838dac
2 changed files with 13 additions and 1 deletions

View File

@@ -465,7 +465,8 @@ void Costmap2DROBOT::copyParentParameters(const std::string& costmap_name,
for (const char* key : {"depth_clearing_mode", "paired_marking_source", "depth_pair_queue_size",
"depth_pair_max_wait_s", "depth_observation_max_age_s", "depth_valid_min_z_m",
"depth_valid_max_z_m", "depth_free_margin_m", "depth_projection_margin_px",
"depth_voxel_z_resolution_m"})
"depth_voxel_z_resolution_m", "depth_evidence_points_enabled",
"depth_evidence_points_per_voxel", "depth_marking_border_px"})
if (plugin_nh_element.hasParam(key))
costmap_plugin_nh_element.setParam(key, YAML::Clone(plugin_nh_element.getParamValue(key)));
robot::log_info("topic: %s data_type: %s clearing: %d marking: %d inf_is_valid: %d min_obstacle_height: %f max_obstacle_height: %f", topic.c_str(), data_type.c_str(), clearing, marking, inf_is_valid, min_obstacle_height, max_obstacle_height);