void FrontendModule::updateFrontiers(const ReconstructionOutput& input) {
if (!frontier_places_) {
return;
}
frontier_places_->updateRecentBlocks(input.world_t_body, input.map().blockSize());
{ // start graph critical section
std::unique_lock<std::mutex> graph_lock(dsg_->mutex);
{ // start timing scope
ScopedTimer timer("frontend/frontiers", input.timestamp_ns, true, 1, false);
NodeIdSet active_nodes = freespace_places_->getActiveNodes();
const auto& places = dsg_->graph->getLayer(DsgLayers::PLACES);
places_nn_finder_.reset(new NearestNodeFinder(places, active_nodes));
frontier_places_->detectFrontiers(input, *dsg_->graph, *places_nn_finder_);
frontier_places_->addFrontiers(
input.timestamp_ns, *dsg_->graph, *places_nn_finder_);
} // end timing scope
} // end graph update critical section
}
frontier_places_.updateRecentBlocks
freespace_places_.getActiveNodes
frontier_places_.detectFrontiers
frontier_places_.addFrontiers
이전에 탐색된 Frontiers 노드들을 DSG 그래프의 place node에서 제거해.
새롭게 탐지된 경계 추가
nodes_to_remove_
목록에 저장해, 다음 탐색에서 정리될 수 있도록 준비해.아카이브된 경계 추가