From 4cf54daaff543807615babfdda490bfcf8d6a59b Mon Sep 17 00:00:00 2001 From: spencerfolk Date: Tue, 6 Aug 2024 13:22:03 -0400 Subject: [PATCH] Remove flyaway safety check. --- rotorpy/simulate.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rotorpy/simulate.py b/rotorpy/simulate.py index 01d5b47..3bb6c53 100644 --- a/rotorpy/simulate.py +++ b/rotorpy/simulate.py @@ -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.