Skip to content

Commit

Permalink
Updated TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
JacopoPan committed Apr 17, 2023
1 parent 0e2c0d5 commit bee0335
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions gym_pybullet_drones/envs/BaseAviary.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ def __init__(self,
print("[ERROR] in BaseAviary.__init__(), aggregate_phy_steps incompatible with the desired video capture frame rate ({:f}Hz)".format(self.IMG_FRAME_PER_SEC))
exit()
if self.RECORD:
# TODO: This doesn't appear to work in general
self.ONBOARD_IMG_PATH = os.path.join(self.OUTPUT_FOLDER, "recording_" + datetime.now().strftime("%m.%d.%Y_%H.%M.%S"))
os.makedirs(os.path.dirname(self.ONBOARD_IMG_PATH), exist_ok=True)
#### Connect to PyBullet ###################################
Expand Down Expand Up @@ -217,11 +216,9 @@ def reset(self):
ndarray | dict[..]
The initial observation, check the specific implementation of `_computeObs()`
in each subclass for its format.
TODO UPDATE TO GYM v26
reset() further returns info, similar to the info returned by step().
This is important because info can include metrics or valid action mask
that is used or saved in the next step.
dict[..]
Additional information as a dictionary, check the specific implementation of `_computeInfo()`
in each subclass for its format.
"""
p.resetSimulation(physicsClientId=self.CLIENT)
Expand Down Expand Up @@ -258,15 +255,13 @@ def step(self,
The step's reward value(s), check the specific implementation of `_computeReward()`
in each subclass for its format.
bool | dict[..]
Whether the current epoisode is over, check the specific implementation of `_computeDone()`
Whether the current episode is over, check the specific implementation of `_computeDone()`
in each subclass for its format.
bool | dict[..]
Whether the current episode is trunacted, always false.
dict[..]
Additional information as a dictionary, check the specific implementation of `_computeInfo()`
in each subclass for its format.
TODO UPDATE TO GYM v26
For users wishing to update, in most cases, replacing done with terminated and truncated=False
in step() should address most issues.
"""
#### Save PNG video frames if RECORD=True and GUI=False ####
Expand Down Expand Up @@ -349,7 +344,7 @@ def step(self,
obs = self._computeObs()
reward = self._computeReward()
terminated = self._computeDone()
truncated = False
truncated = False # TODO: add support for truncated episodes
info = self._computeInfo()
#### Advance the step counter ##############################
self.step_counter = self.step_counter + (1 * self.AGGR_PHY_STEPS)
Expand Down Expand Up @@ -720,8 +715,6 @@ def _groundEffect(self,
flags=p.LINK_FRAME,
physicsClientId=self.CLIENT
)
#### TODO: a more realistic model accounting for the drone's
#### Attitude and its z-axis velocity in the world frame ###

################################################################################

Expand Down

0 comments on commit bee0335

Please sign in to comment.