-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDownloadLidar3dMap.py
More file actions
59 lines (50 loc) · 1.92 KB
/
DownloadLidar3dMap.py
File metadata and controls
59 lines (50 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
__version__ = "2.0"
import os
from pathlib import Path
from meshroom.core import desc
from meshroom.core.utils import VERBOSE_LEVEL
# from meshroom.core.plugin import EnvType
class DownloadLidar3dMap(desc.CommandLineNode):
# Plugin Infos for the Plugin System
# envFile = os.path.join(os.path.dirname(__file__), '../requirements.txt')
# envType = EnvType.VENV
# On Windows, needs to avoid backslash for command line execution (as_posix needed)
currentFilePath = Path(__file__).absolute()
currentFileFolderPath = currentFilePath.parent
# Resolve venv Python if present, then MESHROOM_GEOLOC_PYTHON, then bare 'python'
_plugin_dir = (currentFileFolderPath / "../..").resolve()
_venv_python = next(
(p for p in [_plugin_dir / ".venv/Scripts/python.exe", _plugin_dir / ".venv/bin/python"] if p.exists()),
None
)
pythonPath = Path(os.environ.get("MESHROOM_GEOLOC_PYTHON", str(_venv_python) if _venv_python else "python"))
targetScriptPath = (currentFileFolderPath / "../../scripts/downloadLidar3dMap.py").resolve()
commandLine = pythonPath.as_posix() +' -E '+ targetScriptPath.as_posix() +' {allParams}'
category = 'Geolocation'
documentation = '''
This node allows to get 3D map of where is the dataset.
'''
inputs = [
desc.File(
name='GPSFile',
label='GPS coordinates file',
description='''GPS coordinates file.''',
value= "",
),
desc.ChoiceParam(
name='verboseLevel',
label='Verbose Level',
description='''verbosity level (critical, error, warning, info, debug).''',
value='info',
values=VERBOSE_LEVEL,
exclusive=True,
),
]
outputs = [
desc.File(
name='outputFolder',
label='Output Folder',
description='''Output Folder''',
value='{nodeCacheFolder}',
),
]