diff options
author | Théo de la Hogue | 2024-07-18 23:06:48 +0200 |
---|---|---|
committer | Théo de la Hogue | 2024-07-18 23:06:48 +0200 |
commit | c7e8c6a5258e4bb6c77abfca133d0c7f7cffa4b9 (patch) | |
tree | d5c76af825ac392c51dd63a1e796266f090f5c5e /src | |
parent | ed313904d9fb3817d7df608fb5632ba8053bf5f9 (diff) | |
download | argaze-c7e8c6a5258e4bb6c77abfca133d0c7f7cffa4b9.zip argaze-c7e8c6a5258e4bb6c77abfca133d0c7f7cffa4b9.tar.gz argaze-c7e8c6a5258e4bb6c77abfca133d0c7f7cffa4b9.tar.bz2 argaze-c7e8c6a5258e4bb6c77abfca133d0c7f7cffa4b9.tar.xz |
Checking output folder existence.
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/utils/estimate_markers_pose/observers.py | 8 |
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): |