fix(env_monitor): ignore relocalization pose jumps, veto confined gate on proven progress

Sim 6/11 20:34: AMCL "Setting pose" pulled the map pose back 1.2 m while the
robot drove straight. EnvMonitor counted the jump as travel, the 20 s position
window folded onto itself and the confined gate fired a false stall.

- env_monitor/pose_jump_reject [m] (default 0.5, 0 = off): a pose step larger
  than this plus the reachable distance since the last valid pose is a reset,
  not travel. Stall windows restart at most once per longest position window;
  repeated jumps are reported but keep the windows. The jump distance is added
  to the cost_jump allowance. The control loop passes NaN when there is no pose
  and logs each jump as a warning.
- env_monitor/stall/progress_veto (default true): the confined gate does not
  fire while every eff measured in confine_window_s is >= eff_off. The idle gate
  is not vetoed; a cost jump breaks the proof.
- Tests: env_monitor_test 66 (3 new cases fail on the old code),
  config_validation_test 37.

Config runtime: the two keys above; lane_route_planner zone_deviation_weight and
output_endpoint_spins (R2.12), route_too_long_* marked as compatibility keys;
DirectionalLayer type unquoted in the no-virtual-walls global plugin list.
This commit is contained in:
2026-11-12 10:23:23 +07:00
parent 42b03e0d78
commit 5882082172
9 changed files with 609 additions and 24 deletions

View File

@@ -253,6 +253,7 @@ void readEnvMonitor(robot::NodeHandle& nh, MoveBase2Config& config)
readBool(env_nh, "enabled", m.enabled);
readDouble(env_nh, "grace_after_new_plan", m.grace_after_new_plan);
readDouble(env_nh, "pose_jump_reject", m.pose_jump_reject);
readDouble(env_nh, "check_period", s.check_period);
robot::NodeHandle body_nh(env_nh, "body");
@@ -295,6 +296,7 @@ void readEnvMonitor(robot::NodeHandle& nh, MoveBase2Config& config)
readDouble(stall_nh, "confine_window_s", m.stall.confine_window_s);
readDouble(stall_nh, "confine_radius", m.stall.confine_radius);
readDouble(stall_nh, "confine_cmd_factor", m.stall.confine_cmd_factor);
readBool(stall_nh, "progress_veto", m.stall.progress_veto);
robot::NodeHandle unreach_nh(env_nh, "unreachable");
readBool(unreach_nh, "enabled", m.unreachable.enabled);