Patch v2.2.3 - Kick Pipeline Fixes + RL Kick Hand-off + GlanceAtGoal
v2.2.3 - Kick Pipeline Fixes + RL Kick Hand-off + GlanceAtGoal
Fixes the two biggest on-field problems observed with v2.2.2: the robot hesitating ~15 seconds before kicking, and kicks going visibly off target even while the camera tracked the ball.
What changed
Kick hesitation (P0)
- Fixed the inverted goalpost-margin fallback in
Brain::isAngleGood()— the strict 0.5m margin applied whenever the goal window was smaller than 120° (i.e. almost always), leaving a ±6-8° shot-acceptance window at range. The big margin now only applies close to the goal. - Relaxed
reachedKickDir(static threshold 0.1 → 0.2 rad) while tightening the sign-flip release (π/6 → 0.25 rad). - Added a 2.5s kick-decision commit latch in
StrikerDecideso the robot's own motion can no longer flap the angle conditions and halt the statefulKicknode mid-execution. - Fixed the "stabilize" phase of
Kick:applyMinXamplified a -0.05 m/s hold command into a 0.3 m/s backward walk that pushed the ball out of kick range. Now stands still. - Retunes:
near_ball_speed_limit0.4 → 0.6, Adjusttangential_speed_near0.15 → 0.3, kick gate tolerates ≤400ms ball-detection dropout at contact range.
Kick direction (P0)
Kicknow crab-walks through the ball along the plannedkickDir(aiming 0.3m beyond the ball, clamped ±0.35 rad of the ball bearing) instead of walking at the raw ball bearing.GoalieDecidewrites its clear direction intodata->kickDirso goalie kicks aim correctly.
RL VisualKick band split — enable_auto_visual_kick re-enabled
- The RL branch now only triggers in a 1.2-4.0m band (code-enforced floor of
kick_range * 1.2), so it can never shadow the deterministicKickwindow again. RL owns the approach; the scripted kick owns the finish. - Stall hand-off: if the ball sits within 0.85m essentially unmoved for 2.5s ("track-but-never-kick" firmware behavior),
RLVisionKickexits and the scripted kick takes over. - Implemented the previously stubbed
isMinIntervalSatisfied()as a real 4s re-entry cooldown — no more exit/re-enter thrash.
New: GlanceAtGoal
- Before a
kick/safe_shoot, if no opponent-half goalpost was seen and no successful re-localization happened within 4s, the robot pauses ~0.6s and looks at the goal to acquire goalposts / re-localize, then shoots. Config:strategy.glance_at_goal.*.
Other fixes
- Removed the empty-decision goalie freeze branch (ball 0.5-2.0m ahead caused no-op ticks).
- Possession detection now measures opponent distance from vision-confirmed
Opponentrobots instead of raw depth-grid obstacles (teammates/referees no longer hijack the kick into steal/defend). - Steal-vs-defend risk roll cached 1s instead of re-rolled every 10ms tick; lead election got a sticky margin;
onHaltedseconds-vs-ms timer bugs fixed; duplicated leg-selection block removed.
Packaging
- Repository source folder
v2.2.3/excludes TensorRT.enginemodel files. - Release asset
v2.2.3.zipcontains the full patch folder, including model engines.
Validation
- All changes cross-checked for symbol/registration/config consistency (new BT node registered, params declared, XML wired).
- Full ROS/colcon build was not run on this PC because ROS/colcon is not installed locally — build with
./scripts/build_brain.shon the robot before deploying. - Field-test tip: watch the
debug/RLVisionKickrerun channel — exit reasons show whether the RL policy actually kicks in the band (ball_too_farexits) or relies on the stall hand-off (stall_handoffexits).