Skip to content

Commit

Permalink
forced landing corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
AOS55 committed May 25, 2024
1 parent 866c4a7 commit 18ec1dc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions flyer_env/envs/forced_landing_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,13 @@ def _is_terminated(self) -> bool:
if self.vehicle.crashed:
print("Crashed!")
return True
# If landed
if v_pos[-1] > -4 and self.world.point_on_runway(v_pos[0:2]):
print("Landed!")
if self.vehicle.position[2] > 0:
return True
# TODO: Fix Termination
# # If landed
# if v_pos[-1] > -4 and self.world.point_on_runway(v_pos[0:2]):
# print("Landed!")
# return True
return False

def _is_truncated(self) -> bool:
Expand Down

0 comments on commit 18ec1dc

Please sign in to comment.