Skip to content

Commit

Permalink
Merge pull request #14 from AOS55/alt-render
Browse files Browse the repository at this point in the history
Alt render
  • Loading branch information
AOS55 authored May 28, 2024
2 parents 26b71c3 + 4cbf728 commit 6dbbc1e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion flyer_env/envs/flyer_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _create_world(self) -> None:
self.world.terrain_data_dir = path
world_seed = self.np_random.randint(100) # set 100 possible seeds by default
self.world.create_map(world_seed, area=self.config["area"])
self.world.render_type = "aircraft"
self.world.render_type = "aircraft_fixed"

def _create_vehicles(self) -> None:
"""Create an aircraft to fly around the world"""
Expand Down Expand Up @@ -139,6 +139,7 @@ def get_goal():
return pos

g_pos = get_goal()
self.world.set_goal(g_pos[0], g_pos[1], g_pos[2])
self.goal = g_pos
return

Expand Down
2 changes: 1 addition & 1 deletion scripts/aircraft_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


def main():
env = gym.make("forced_landing-v1", render_mode="rgb_array")
env = gym.make("flyer-v1", render_mode="rgb_array")
# env.config['action'] = {'type': 'HeadingAction'}
v_env = gym.wrappers.RecordVideo(env, 'videos')
v_env.reset()
Expand Down
Binary file removed trajectory_aircraft.mp4
Binary file not shown.

0 comments on commit 6dbbc1e

Please sign in to comment.