Skip to content

Commit 991e772

Browse files
author
Fabien Servant
committed
Lidar meshing simple node
1 parent b443a2f commit 991e772

File tree

1 file changed

+152
-0
lines changed

1 file changed

+152
-0
lines changed
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
__version__ = "1.0"
2+
3+
from meshroom.core import desc
4+
5+
6+
class LidarMeshing(desc.AVCommandLineNode):
7+
commandLine = 'aliceVision_lidarMeshing {allParams}'
8+
9+
# size = desc.DynamicNodeSize('input')
10+
# parallelization = desc.Parallelization(blockSize=2)
11+
# commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}'
12+
13+
cpu = desc.Level.INTENSIVE
14+
ram = desc.Level.INTENSIVE
15+
16+
category = 'Dense Reconstruction'
17+
documentation = '''
18+
This node creates a dense geometric surface representation of the lidar measurements
19+
'''
20+
21+
inputs = [
22+
desc.File(
23+
name="input",
24+
label="Input Json",
25+
description="Input Json file with description of inputs.",
26+
value="",
27+
uid=[0],
28+
),
29+
desc.BoolParam(
30+
name="useBoundingBox",
31+
label="Custom Bounding Box",
32+
description="Edit the meshing bounding box.\n"
33+
"If enabled, it takes priority over the 'Estimate Space From SfM' option.\n"
34+
"Parameters can be adjusted in advanced settings.",
35+
value=False,
36+
uid=[0],
37+
group="",
38+
),
39+
desc.GroupAttribute(
40+
name="boundingBox",
41+
label="Bounding Box Settings",
42+
description="Translation, rotation and scale of the bounding box.",
43+
groupDesc=[
44+
desc.GroupAttribute(
45+
name="bboxTranslation",
46+
label="Translation",
47+
description="Position in space.",
48+
groupDesc=[
49+
desc.FloatParam(
50+
name="x", label="x", description="X offset.",
51+
value=0.0,
52+
uid=[0],
53+
range=(-20.0, 20.0, 0.01),
54+
),
55+
desc.FloatParam(
56+
name="y", label="y", description="Y offset.",
57+
value=0.0,
58+
uid=[0],
59+
range=(-20.0, 20.0, 0.01),
60+
),
61+
desc.FloatParam(
62+
name="z", label="z", description="Z offset.",
63+
value=0.0,
64+
uid=[0],
65+
range=(-20.0, 20.0, 0.01),
66+
),
67+
],
68+
joinChar=",",
69+
),
70+
desc.GroupAttribute(
71+
name="bboxRotation",
72+
label="Euler Rotation",
73+
description="Rotation in Euler degrees.",
74+
groupDesc=[
75+
desc.FloatParam(
76+
name="x", label="x", description="Euler X rotation.",
77+
value=0.0,
78+
uid=[0],
79+
range=(-90.0, 90.0, 1.0)
80+
),
81+
desc.FloatParam(
82+
name="y", label="y", description="Euler Y rotation.",
83+
value=0.0,
84+
uid=[0],
85+
range=(-180.0, 180.0, 1.0)
86+
),
87+
desc.FloatParam(
88+
name="z", label="z", description="Euler Z rotation.",
89+
value=0.0,
90+
uid=[0],
91+
range=(-180.0, 180.0, 1.0)
92+
),
93+
],
94+
joinChar=",",
95+
),
96+
desc.GroupAttribute(
97+
name="bboxScale",
98+
label="Scale",
99+
description="Scale of the bounding box.",
100+
groupDesc=[
101+
desc.FloatParam(
102+
name="x", label="x", description="X scale.",
103+
value=1.0,
104+
uid=[0],
105+
range=(0.0, 20.0, 0.01),
106+
),
107+
desc.FloatParam(
108+
name="y", label="y", description="Y scale.",
109+
value=1.0,
110+
uid=[0],
111+
range=(0.0, 20.0, 0.01),
112+
),
113+
desc.FloatParam(
114+
name="z", label="z", description="Z scale.",
115+
value=1.0,
116+
uid=[0],
117+
range=(0.0, 20.0, 0.01),
118+
),
119+
],
120+
joinChar=",",
121+
),
122+
],
123+
joinChar=",",
124+
enabled=lambda node: node.useBoundingBox.value,
125+
),
126+
desc.ChoiceParam(
127+
name="verboseLevel",
128+
label="Verbose Level",
129+
description="Verbosity level (fatal, error, warning, info, debug, trace).",
130+
value="info",
131+
values=["fatal", "error", "warning", "info", "debug", "trace"],
132+
exclusive=True,
133+
uid=[],
134+
)
135+
]
136+
137+
outputs = [
138+
desc.File(
139+
name="output",
140+
label="Sub-Meshes directory",
141+
description="Output directory for sub-meshes",
142+
value=desc.Node.internalFolder,
143+
uid=[],
144+
),
145+
desc.File(
146+
name="outputJson",
147+
label="Scene description",
148+
description="Output Scene description.",
149+
value=desc.Node.internalFolder + "scene.json",
150+
uid=[],
151+
),
152+
]

0 commit comments

Comments
 (0)