﻿# SimpleGoalChecker: a positive buffer changes when stateful XY is checked again

Inspect SimpleGoalChecker position latching, the positive hysteresis-buffer gate and reset before interpreting drift during final goal rotation.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/robotics-simplegoalchecker-stateful-positive-buffer-recheck/
Language: en

## Arrival can be a stateful calculation

A mobile robot enters the target position window, then turns toward its desired final heading. During that turn its estimated position drifts. A supervisor asks whether a successful goal result means the latest position was checked against the original window. The answer depends on the chosen checker and its retained state, not just the numerical tolerance displayed in configuration. Inspect the exact implementation and activation history before treating goal success as a simultaneous test of every coordinate.

## Locate the position latch

In the inspected [SimpleGoalChecker source](https://raw.githubusercontent.com/ros-navigation/navigation2/main/nav2_controller/plugins/simple_goal_checker.cpp), check_xy initially enables position checking. When a pose passes that check with stateful enabled, the flag becomes false. Orientation checking can then continue after position has been accepted. The source also checks remaining transformed-plan length before accepting the XY condition. A diagnostic focusing only on Euclidean distance and yaw can therefore omit another reason for rejection. This is a state-machine interpretation, not a measurement of localization or controller performance.

## Distinguish a positive buffer from zero

The [parameter guide](https://docs.nav2.org/rolling/configuration_and_development/configuration_guide/core_servers/controller_server/controller_server_plugins/simple_goal_checker/) describes a hysteresis region using xy_goal_tolerance plus xy_goal_tolerance_buffer. The inspected source adds an important condition: after latching, the exit-region branch runs only when the buffer is positive. Exceeding the expanded region then restores check_xy and rejects that call. A zero buffer does not activate this branch with an unexpanded boundary. Do not replace the actual conditional with a general statement that stateful mode always reevaluates drift outside the original tolerance.

## Design a pose-sequence fixture

A proposed nonactuating test should present a pose inside XY tolerance but outside yaw tolerance, followed by positions between the base and expanded boundaries and then beyond both. Compare explicitly configured positive-buffer, zero-buffer and nonstateful cases. Keep path length below its separate threshold while isolating the position logic. Vary orientation afterward to establish which retained position state contributes to final success. Repeat after reset rather than assuming state from a previous request has disappeared.

## Retain inputs and reset evidence

Acceptance records should include checker plugin and revision, all relevant tolerances, stateful setting, buffer, supplied path and the ordered pose sequence. The inspected reset method restores check_xy. Verify when the application invokes that boundary for a new goal or checker lifecycle. A final boolean without preceding inputs cannot distinguish continuously valid position, a retained position latch or a later buffer exit. Report observed results of an actual implementation separately from the expected trace of this proposed fixture.

## Keep goal acceptance narrower than docking assurance

Passing this checker does not independently establish obstacle clearance, accurate global pose or physical docking contact. Those need their own observations and task conditions. The [R2R action-space guide](/journal/fg2-matterport-r2r-viewpoint-graph-not-continuous-path/) provides related success-scope context, while [software reproducibility](/journal/software-stack-reproducibility/) supports preserving the plugin revision. For the inspected checker, the useful conclusion is exactly which position condition was retained, which inputs were reevaluated, and which reset or positive-buffer event could reopen that condition.
