Files
NODEDC_MISSION_CORE/simulation/ai-polygon/navigation/command_status.py
T
DCCONSTRUCTIONS d0e5f90952 Preserve installed operator workspace before consolidation
Local preservation snapshot, not a new deployment or simulation acceptance.
2026-10-08 09:59:51 +03:00

24 lines
878 B
Python

"""Report the gate that actually rejected a command, before unevaluated gates.
No motion permission is created here. In particular, missing visual intent is
not an obstacle observation and must not seed a route exclusion.
"""
def command_failure(*, tilt, orienting, translation_allowed, path_points,
footprint_clear, direction_clear, support_scale,
support_reason, velocity, yaw_rate):
if tilt >= 30:
return "inclination"
if not orienting and not translation_allowed:
return "no-permitted-goal"
if not orienting and path_points <= 1:
return "no-path"
if not direction_clear:
return "direction"
if not footprint_clear:
return "footprint"
if support_scale == 0:
return support_reason
return "controller-hold" if abs(velocity) + abs(yaw_rate) < 1e-5 else "none"