Skip to content

Commit

Permalink
fix thing
Browse files Browse the repository at this point in the history
  • Loading branch information
jjshoots committed Mar 11, 2024
1 parent 9700327 commit d14130f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions PyFlyt/gym_envs/rocket_envs/rocket_landing_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import annotations

import os
from typing import Any

import numpy as np
import pybullet as p
Expand Down Expand Up @@ -82,17 +83,21 @@ def __init__(
"""CONSTANTS"""
self.sparse_reward = sparse_reward

def reset(self, seed=None, options=dict()):
def reset(
self, *, seed: None | int = None, options: None | dict[str, Any] = dict()
):
"""Resets the environment.
Args:
seed: int
options: None
"""
options = dict(randomize_drop=True, accelerate_drop=True)
drone_options = dict(starting_fuel_ratio=0.01)
if options is None:
options = dict(randomize_drop=True, accelerate_drop=True)

super().begin_reset(seed, options, drone_options)
super().begin_reset(
seed=seed, options=options, drone_options=dict(starting_fuel_ratio=0.01)
)

# reset the tracked parameters
self.landing_pad_contact = 0.0
Expand Down

0 comments on commit d14130f

Please sign in to comment.