mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
DatabaseViewer: Added ExportCloudsDialog, added Occupancy Grid View
This commit is contained in:
@@ -753,11 +753,15 @@ bool CloudViewer::addOctomap(const OctoMap * octomap, unsigned int treeDepth)
|
||||
|
||||
pcl::IndicesPtr obstacles(new std::vector<int>);
|
||||
|
||||
if(treeDepth > octomap->octree()->getTreeDepth())
|
||||
if(treeDepth == 0 || treeDepth > octomap->octree()->getTreeDepth())
|
||||
{
|
||||
UWARN("Tree depth requested (%d) is deeper than the "
|
||||
"actual maximum tree depth of %d. Using maximum depth.",
|
||||
(int)treeDepth, (int)octomap->octree()->getTreeDepth());
|
||||
if(treeDepth>0)
|
||||
{
|
||||
UWARN("Tree depth requested (%d) is deeper than the "
|
||||
"actual maximum tree depth of %d. Using maximum depth.",
|
||||
(int)treeDepth, (int)octomap->octree()->getTreeDepth());
|
||||
}
|
||||
treeDepth = octomap->octree()->getTreeDepth();
|
||||
}
|
||||
|
||||
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud = octomap->createCloud(treeDepth, obstacles.get());
|
||||
|
||||
Reference in New Issue
Block a user