mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
OctoMap: fixed empty occupancy not correctly updated when ray tracing is done on more than one local map
This commit is contained in:
@@ -891,7 +891,7 @@ bool OctoMap::update(const std::map<int, Transform> & poses)
|
||||
}
|
||||
}
|
||||
|
||||
RtabmapColorOcTreeNode * n = octree_->updateNode(*it, false, orderedPoses.size() == 1);
|
||||
RtabmapColorOcTreeNode * n = octree_->updateNode(*it, false, true);
|
||||
if(n && n->getOccupancyType() == RtabmapColorOcTreeNode::kTypeUnknown)
|
||||
{
|
||||
n->setOccupancyType(RtabmapColorOcTreeNode::kTypeEmpty);
|
||||
@@ -957,6 +957,10 @@ bool OctoMap::update(const std::map<int, Transform> & poses)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if((occupancyIter != cache_.end() && occupancyIter->second.second.cols) || !free_cells.empty())
|
||||
{
|
||||
octree_->updateInnerOccupancy();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user