aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/utils/estimate_markers_pose/observers.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/argaze/utils/estimate_markers_pose/observers.py b/src/argaze/utils/estimate_markers_pose/observers.py
index 88da4f9..bbca1ad 100644
--- a/src/argaze/utils/estimate_markers_pose/observers.py
+++ b/src/argaze/utils/estimate_markers_pose/observers.py
@@ -18,6 +18,8 @@ __copyright__ = "Copyright 2023, Ecole Nationale de l'Aviation Civile (ENAC)"
__license__ = "GPLv3"
import logging
+import os
+import pathlib
from argaze import DataFeatures
from argaze.ArUcoMarker import ArUcoMarkerGroup
@@ -41,7 +43,11 @@ class ArUcoMarkersPoseRecorder(DataFeatures.PipelineStepObject):
@output_folder.setter
def output_folder(self, output_folder: str):
- self.__output_folder = output_folder
+ self.__output_folder = pathlib.Path(output_folder)
+
+ if not os.path.exists(self.__output_folder.absolute()):
+
+ os.makedirs(self.__output_folder.absolute())
def on_detect_markers(self, timestamp, aruco_detector, exception):