コード例 #1
0
ファイル: orbslam2.py プロジェクト: jskinn/arvet-slam
 def resolve_paths(self, path_manager: PathManager):
     """
     Use the path manager to find the required files on disk.
     Will raise various exceptions if the file is not available.
     You MUST call this before calling start_trial (run_task will handle that).
     :param path_manager: The PathManager, for locating files.
     :return:
     """
     if self.vocabulary_file is None or len(self.vocabulary_file) <= 0:
         raise ValueError("No vocabulary available for ORB-SLAM {0}, did you build one?".format(self.pk))
     self._temp_folder = path_manager.get_temp_folder()
     self._actual_vocab_file = path_manager.find_file(self.vocabulary_file)
コード例 #2
0
 def test_get_temp_folder_returns_absolute_path(self):
     subject = PathManager(['~'], '.')
     self.assertEqual(Path('.').resolve(), subject.get_temp_folder())
コード例 #3
0
 def test_get_temp_folder_expands_users(self):
     subject = PathManager(['~'], '~')
     self.assertEqual(Path('~').expanduser(), subject.get_temp_folder())