feat: read accept_attached_legs and zero_range_is_no_echo
- Handler: reads zero_range_is_no_echo next to range_sigma (lidar property), and accept_attached_legs per profile. The boot summary prints "zero range = no echo|blocked". The start line prints "attached legs on|off". The match line prints "attached N". - README, doc/MEASURE_AND_CONFIGURE.md: both keys, when to set them, and a log-reason row for attached legs. Also the measuring notes left over from the previous fix: cart_dim_tolerance covers machining differences between trolleys of one type, dimensions are leg centre-to-centre (not outer edge), how to measure range_sigma, and the confidence row in the log table. Needs dock_pattern_detector 979bef3 or later.
This commit is contained in:
@@ -120,6 +120,8 @@ const char* toString(EntryDirection d)
|
||||
* - `prior_frame` [string] frame của `prior_*` và `search_fov` (mặc định `base_link`)
|
||||
* - `entry_direction` [string] `forward` / `backward`
|
||||
* - `min_range`, `max_range` [m], `range_sigma` [m]
|
||||
* - `zero_range_is_no_echo` [bool] driver trả range 0 cho tia không phản hồi (mặc định false,
|
||||
* xem @ref dock_pattern_detector::ScanLimits)
|
||||
* - `debug/detect` [bool] log lý do chưa dò ra, kết quả khớp, tóm tắt lúc start
|
||||
* - `profiles/<tên>/...` khoá của `LegProfile`
|
||||
* - cộng toàn bộ khoá của @ref PoseSampleFilterConfig
|
||||
@@ -167,6 +169,7 @@ public:
|
||||
nh.param("min_range", limits_.min_range, kDefaultMinRange);
|
||||
nh.param("max_range", limits_.max_range, kDefaultMaxRange);
|
||||
nh.param("range_sigma", limits_.range_sigma, kDefaultRangeSigma);
|
||||
nh.param("zero_range_is_no_echo", limits_.zero_range_is_no_echo, false);
|
||||
|
||||
std::string direction = "forward";
|
||||
nh.param("entry_direction", direction, direction);
|
||||
@@ -258,10 +261,11 @@ public:
|
||||
// Dòng tóm tắt lúc boot: chỗ duy nhất xác nhận được giá trị đã nạp mà không mở YAML trên robot.
|
||||
robot::log_info("[trolley_detection] '%s': %zu profile(s), default '%s', scan '%s', "
|
||||
"entry_direction %s, prior_frame '%s', range [%.2f, %.2f] m, sigma %.3f m, "
|
||||
"debug/detect %s.",
|
||||
"zero range %s, debug/detect %s.",
|
||||
name_.c_str(), profiles_.size(), default_profile_.c_str(),
|
||||
scan_topic_.c_str(), toString(entry_direction_), prior_frame_.c_str(),
|
||||
limits_.min_range, limits_.max_range, limits_.range_sigma,
|
||||
limits_.zero_range_is_no_echo ? "= no echo" : "= blocked",
|
||||
debug_detect_ ? "on" : "off");
|
||||
return true;
|
||||
}
|
||||
@@ -330,10 +334,11 @@ 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, 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, 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());
|
||||
@@ -458,6 +463,7 @@ private:
|
||||
nh_param(p_nh, "shadow_min_angle", profile.shadow_min_angle);
|
||||
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);
|
||||
nh_param(p_nh, "min_legs", profile.min_legs);
|
||||
nh_param(p_nh, "leg_assoc_radius", profile.leg_assoc_radius);
|
||||
nh_param(p_nh, "max_interior_points", profile.max_interior_points);
|
||||
@@ -783,11 +789,12 @@ 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, occluded %d, out of view %d), measured %.3f x %.3f "
|
||||
"m, fit rms %.4f m, confidence %.2f.",
|
||||
"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_occluded, d.legs_out_of_view, d.measured_opening, d.measured_depth, d.fit_rms, d.confidence);
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user