feat: read tape_bloom_max_angle and tape_range_bias_sigma

Read the two new mirror-tape keys of the leg profile. Print them on the [debug] profile
line, and print the estimated tape range bias on the [debug] match line when it was
estimated. Document the KIT values (tape_min_intensity 8000, bloom 0.10 rad, bias sigma
0.05 m) and the bloom limitation for a bare far leg just behind a taped entry leg.
This commit is contained in:
2026-10-29 13:05:55 +07:00
parent 0000f64dbc
commit 1a76e7798f
3 changed files with 66 additions and 15 deletions

View File

@@ -334,14 +334,16 @@ public:
{
const dock_pattern_detector::LegProfile& p = found->second;
robot::log_info("[trolley_detection][debug] '%s': detecting profile '%s' (cart %.3f x %.3f m, "
"leg %s %.3f m, min_legs %d, attached legs %s, tape %s/%s, offset_yaw %.3f, "
"prior %s in '%s') on '%s', entry %s -> '%s'.",
"leg %s %.3f m, min_legs %d, attached legs %s, tape %s/%s, bloom %.3f rad, "
"range bias sigma %.3f m, offset_yaw %.3f, prior %s in '%s') on '%s', entry "
"%s -> '%s'.",
name_.c_str(), profile_name.c_str(), p.cart_opening, p.cart_depth,
dock_pattern_detector::toString(p.leg_shape), p.leg_width, p.min_legs,
p.accept_attached_legs ? "on" : "off",
p.tape_enabled ? "on" : "off", dock_pattern_detector::toString(p.tape_legs),
p.offset_yaw, p.has_prior ? "on" : "off", prior_frame_.c_str(),
scan_topic_.c_str(), toString(entry_direction_), output_frame_.c_str());
p.tape_bloom_max_angle, p.tape_range_bias_sigma, p.offset_yaw,
p.has_prior ? "on" : "off", prior_frame_.c_str(), scan_topic_.c_str(),
toString(entry_direction_), output_frame_.c_str());
}
return true;
}
@@ -461,6 +463,8 @@ private:
profile.min_leg_points = static_cast<std::size_t>(std::max(0, min_leg_points));
nh_param(p_nh, "shadow_min_angle", profile.shadow_min_angle);
nh_param(p_nh, "tape_bloom_max_angle", profile.tape_bloom_max_angle);
nh_param(p_nh, "tape_range_bias_sigma", profile.tape_range_bias_sigma);
nh_param(p_nh, "leg_cluster_gap", profile.leg_cluster_gap);
nh_param(p_nh, "leg_min_depth_gap", profile.leg_min_depth_gap);
nh_param(p_nh, "accept_attached_legs", profile.accept_attached_legs);
@@ -788,13 +792,27 @@ private:
}
last_match_log_ = now;
have_match_log_ = true;
robot::log_info("[trolley_detection][debug] '%s': cart at (%.3f, %.3f) yaw %.3f in '%s'%s, "
"legs seen %d (partial %d, attached %d, occluded %d, out of view %d), measured "
"%.3f x %.3f m, fit rms %.4f m, confidence %.2f.",
name_.c_str(), d.center_x, d.center_y, d.center_yaw, pending_frame_.c_str(),
scan_flipped_ ? " (upright view)" : "", d.legs_seen, d.legs_partial,
d.legs_attached, d.legs_occluded, d.legs_out_of_view, d.measured_opening,
d.measured_depth, d.fit_rms, d.confidence);
if (d.tape_range_bias_estimated)
{
robot::log_info("[trolley_detection][debug] '%s': cart at (%.3f, %.3f) yaw %.3f in '%s'%s, "
"legs seen %d (partial %d, attached %d, occluded %d, out of view %d), "
"measured %.3f x %.3f m, fit rms %.4f m, tape range bias %.3f m, confidence "
"%.2f.",
name_.c_str(), d.center_x, d.center_y, d.center_yaw, pending_frame_.c_str(),
scan_flipped_ ? " (upright view)" : "", d.legs_seen, d.legs_partial,
d.legs_attached, d.legs_occluded, d.legs_out_of_view, d.measured_opening,
d.measured_depth, d.fit_rms, d.tape_range_bias, d.confidence);
}
else
{
robot::log_info("[trolley_detection][debug] '%s': cart at (%.3f, %.3f) yaw %.3f in '%s'%s, "
"legs seen %d (partial %d, attached %d, occluded %d, out of view %d), "
"measured %.3f x %.3f m, fit rms %.4f m, confidence %.2f.",
name_.c_str(), d.center_x, d.center_y, d.center_yaw, pending_frame_.c_str(),
scan_flipped_ ? " (upright view)" : "", d.legs_seen, d.legs_partial,
d.legs_attached, d.legs_occluded, d.legs_out_of_view, d.measured_opening,
d.measured_depth, d.fit_rms, d.confidence);
}
}
ActionTick failOnTimeout(double elapsed)