Remove flyaway safety check.

This commit is contained in:
spencerfolk
2024-08-06 13:22:03 -04:00
parent 1831e02e2c
commit 4cf54daaff

View File

@@ -195,12 +195,10 @@ def safety_exit(world, margin, state, flat, control):
"""
Return exit status if any safety condition is violated, otherwise None.
"""
if np.any(np.abs(state['v']) > 100):
if np.any(np.abs(state['v']) > 20):
return ExitStatus.OVER_SPEED
if np.any(np.abs(state['w']) > 100):
return ExitStatus.OVER_SPIN
if np.any(np.abs(state['x'] - flat['x']) > 20):
return ExitStatus.FLY_AWAY
if len(world.world.get('blocks', [])) > 0:
# If a world has objects in it we need to check for collisions.