Local preservation snapshot, not a new deployment or simulation acceptance.
24 lines
878 B
Python
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"
|