Fixed GridGlobal/FullUpdate parameter not set for the octomap (#209)

This commit is contained in:
matlabbe
2017-12-06 16:07:46 -05:00
parent 46a9e91884
commit d8e4383fa0
+2 -2
View File
@@ -110,7 +110,7 @@ void MapsManager::init(ros::NodeHandle & nh, ros::NodeHandle & pnh, const std::s
#ifdef RTABMAP_OCTOMAP #ifdef RTABMAP_OCTOMAP
pnh.param("octomap_occupancy_thr", octomapOccupancyThr_, octomapOccupancyThr_); pnh.param("octomap_occupancy_thr", octomapOccupancyThr_, octomapOccupancyThr_);
UASSERT(octomapOccupancyThr_>=0.0 && octomapOccupancyThr_<=1.0); UASSERT(octomapOccupancyThr_>=0.0 && octomapOccupancyThr_<=1.0);
octomap_ = new OctoMap(occupancyGrid_->getCellSize(), octomapOccupancyThr_); octomap_ = new OctoMap(occupancyGrid_->getCellSize(), octomapOccupancyThr_, occupancyGrid_->isFullUpdate());
pnh.param("octomap_tree_depth", octomapTreeDepth_, octomapTreeDepth_); pnh.param("octomap_tree_depth", octomapTreeDepth_, octomapTreeDepth_);
if(octomapTreeDepth_ > 16) if(octomapTreeDepth_ > 16)
{ {
@@ -287,7 +287,7 @@ void MapsManager::setParameters(const rtabmap::ParametersMap & parameters)
delete octomap_; delete octomap_;
octomap_ = 0; octomap_ = 0;
} }
octomap_ = new OctoMap(occupancyGrid_->getCellSize(), octomapOccupancyThr_); octomap_ = new OctoMap(occupancyGrid_->getCellSize(), octomapOccupancyThr_, occupancyGrid_->isFullUpdate());
#endif #endif
#endif #endif
} }