MCPcopy Create free account
hub / github.com/PRBonn/semantic_suma / initialize

Method initialize

src/visualizer/VisualizerWindow.cpp:213–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213void VisualizerWindow::initialize(const std::shared_ptr<SurfelMapping>& fusion, const ParameterList& params) {
214 params_ = params;
215 fusion_ = fusion;
216 ui_.wCanvas->initialize(params);
217 ui_.wCanvas->setMap(fusion->getMap());
218
219 uint32_t max_history = 10;
220 uint32_t max_history_points = 150000;
221 if (params.hasParam("history size")) max_history = params["history size"];
222 if (params.hasParam("history points")) max_history_points = params["history points"];
223 if (params.hasParam("history stride")) history_stride_ = params["history stride"];
224 if (params.hasParam("confidence_threshold"))
225 ui_.spinConfidenceThreshold->setValue((float)params["confidence_threshold"]);
226
227 // get parameters.
228 ui_.spinIcpMaxAngle->setValue((float)params["icp-max-angle"]);
229 ui_.spinIcpMaxDistance->setValue((float)params["icp-max-distance"]);
230 ui_.spinIcpMaxIterations->setValue((int)params["max iterations"]);
231 ui_.chkWarmStart->setChecked(!((bool)params["initialize_identity"]));
232 ui_.spinOptFactor->setValue((float)params["factor"]);
233
234 ui_.spinProbStable->setValue((float)params["p_stable"]);
235 ui_.spinProbPrior->setValue((float)params["p_prior"]);
236
237 ui_.spinSigmaAngle->setValue((float)params["sigma_angle"]);
238 ui_.spinSigmaDistance->setValue((float)params["sigma_distance"]);
239
240 ui_.spinMapMaxDistance->setValue((float)params["map-max-distance"]);
241 ui_.spinMapMaxAngle->setValue((float)params["map-max-angle"]);
242 // ui_.chkIterativeCutoff->setChecked((bool) params["iterative_cutoff"]);
243
244 if (params.hasParam("filter_vertexmap")) {
245 ui_.chkBilateralFiltering->setChecked((bool)params["filter_vertexmap"]);
246 ui_.chkFilterVertices->setChecked((bool)params["use_filtered_vertexmap"]);
247 ui_.spinBilateralSigmaRange->setValue((float)params["bilateral_sigma_range"]);
248 ui_.spinBilateralSigmaSpace->setValue((float)params["bilateral_sigma_space"]);
249 }
250
251 std::string weightingMethod = (std::string)params["weighting"];
252 int32_t idx = 0;
253 if (weightingMethod == "huber") idx = 1;
254 if (weightingMethod == "turkey") idx = 2;
255
256 ui_.cmbOptWeighting->setCurrentIndex(idx);
257
258 parameterUpdateNeeded_ = false;
259
260 acc_ = std::make_shared<ScanAccumulator>(max_history, max_history_points);
261 ui_.spinHistorySize->setMaximum(max_history);
262
263 ui_.wCanvas->setScanAccumualator(acc_);
264
265 if (params.hasParam("show robot")) {
266 ui_.chkShowRobot->setChecked(params["show robot"]);
267 }
268
269 ui_.wCanvas->setPosegraph(fusion_->getPosegraph());
270

Callers 2

openFileMethod · 0.45
setScanMethod · 0.45

Calls 12

setMapMethod · 0.80
getMapMethod · 0.80
hasParamMethod · 0.80
setMaximumMethod · 0.80
setScanAccumualatorMethod · 0.80
setPosegraphMethod · 0.80
getPosegraphMethod · 0.80
setHistoryStrideMethod · 0.80
addTimeseriesMethod · 0.80
addThresholdMethod · 0.80
setMinimumMethod · 0.80
setFixedMethod · 0.80

Tested by

no test coverage detected