diff --git a/gym_pybullet_drones/envs/BaseAviary.py b/gym_pybullet_drones/envs/BaseAviary.py index f1540133a..5c079d8aa 100755 --- a/gym_pybullet_drones/envs/BaseAviary.py +++ b/gym_pybullet_drones/envs/BaseAviary.py @@ -141,8 +141,9 @@ def __init__(self, if self.IMG_CAPTURE_FREQ%self.PYB_STEPS_PER_CTRL != 0: print("[ERROR] in BaseAviary.__init__(), PyBullet and control frequencies incompatible with the desired video capture frame rate ({:f}Hz)".format(self.IMG_FRAME_PER_SEC)) exit() - for i in range(self.NUM_DRONES): - os.makedirs(os.path.dirname(self.ONBOARD_IMG_PATH+"/drone_"+str(i)+"/"), exist_ok=True) + if self.RECORD: + for i in range(self.NUM_DRONES): + os.makedirs(os.path.dirname(self.ONBOARD_IMG_PATH+"/drone_"+str(i)+"/"), exist_ok=True) #### Connect to PyBullet ################################### if self.GUI: #### With debug GUI ########################################