Skip to content

Commit

Permalink
refactor: Update robot_env.py to include current working directory in…
Browse files Browse the repository at this point in the history
… filename for recordings
  • Loading branch information
ll7 committed Sep 25, 2024
1 parent 4e4e179 commit bb6c09d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion robot_sf/gym_env/robot_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ def save_recording(self, filename: str = None):
"""
if filename is None:
now = datetime.datetime.now()
filename = f'recordings/{now.strftime("%Y-%m-%d_%H-%M-%S")}.pkl'
# get current working directory
cwd = os.getcwd()
filename = f'{cwd}/recordings/{now.strftime("%Y-%m-%d_%H-%M-%S")}.pkl'

# only save if there are recorded states
if len(self.recorded_states) == 0:
Expand Down

0 comments on commit bb6c09d

Please sign in to comment.