From 50d1a958def27121bcf63f3cc753049fee8e71e5 Mon Sep 17 00:00:00 2001 From: Jacopo Panerati Date: Sun, 24 Mar 2024 10:28:08 +0400 Subject: [PATCH] Video saving path name #197 --- gym_pybullet_drones/envs/BaseAviary.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gym_pybullet_drones/envs/BaseAviary.py b/gym_pybullet_drones/envs/BaseAviary.py index 4cb661250..d10645798 100755 --- a/gym_pybullet_drones/envs/BaseAviary.py +++ b/gym_pybullet_drones/envs/BaseAviary.py @@ -527,10 +527,8 @@ def _startVideoRecording(self): """ if self.RECORD and self.GUI: - VIDEO_FOLDER = os.path.join(self.OUTPUT_FOLDER, "recording_" + datetime.now().strftime("%m.%d.%Y_%H.%M.%S")) - os.makedirs(os.path.dirname(VIDEO_FOLDER), exist_ok=True) self.VIDEO_ID = p.startStateLogging(loggingType=p.STATE_LOGGING_VIDEO_MP4, - fileName=os.path.join(VIDEO_FOLDER, "output.mp4"), + fileName=os.path.join(self.OUTPUT_FOLDER, "video-"+datetime.now().strftime("%m.%d.%Y_%H.%M.%S")+".mp4"), physicsClientId=self.CLIENT ) if self.RECORD and not self.GUI: