mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
added "grid_unknown_space_filled" parameter to MapsManager (rtabmap node)
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ find_package(octomap_ros)
|
|||||||
|
|
||||||
## System dependencies are found with CMake's conventions
|
## System dependencies are found with CMake's conventions
|
||||||
# find_package(Boost REQUIRED COMPONENTS system)
|
# find_package(Boost REQUIRED COMPONENTS system)
|
||||||
find_package(RTABMap 0.10.4 REQUIRED)
|
find_package(RTABMap 0.10.5 REQUIRED)
|
||||||
|
|
||||||
find_package(OpenCV REQUIRED)
|
find_package(OpenCV REQUIRED)
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -40,6 +40,7 @@ MapsManager::MapsManager() :
|
|||||||
gridCellSize_(0.05), // meters
|
gridCellSize_(0.05), // meters
|
||||||
gridSize_(0), // meters
|
gridSize_(0), // meters
|
||||||
gridEroded_(false),
|
gridEroded_(false),
|
||||||
|
gridUnknownSpaceFilled_(false),
|
||||||
mapFilterRadius_(0.5),
|
mapFilterRadius_(0.5),
|
||||||
mapFilterAngle_(30.0), // degrees
|
mapFilterAngle_(30.0), // degrees
|
||||||
mapCacheCleanup_(true),
|
mapCacheCleanup_(true),
|
||||||
@@ -67,6 +68,7 @@ MapsManager::MapsManager() :
|
|||||||
pnh.param("grid_cell_size", gridCellSize_, gridCellSize_); // m
|
pnh.param("grid_cell_size", gridCellSize_, gridCellSize_); // m
|
||||||
pnh.param("grid_size", gridSize_, gridSize_); // m
|
pnh.param("grid_size", gridSize_, gridSize_); // m
|
||||||
pnh.param("grid_eroded", gridEroded_, gridEroded_);
|
pnh.param("grid_eroded", gridEroded_, gridEroded_);
|
||||||
|
pnh.param("grid_unknown_space_filled", gridUnknownSpaceFilled_, gridUnknownSpaceFilled_);
|
||||||
|
|
||||||
// common map stuff
|
// common map stuff
|
||||||
pnh.param("map_filter_radius", mapFilterRadius_, mapFilterRadius_);
|
pnh.param("map_filter_radius", mapFilterRadius_, mapFilterRadius_);
|
||||||
@@ -276,7 +278,7 @@ std::map<int, rtabmap::Transform> MapsManager::updateMapCaches(
|
|||||||
if(scanRequired)
|
if(scanRequired)
|
||||||
{
|
{
|
||||||
cv::Mat ground, obstacles;
|
cv::Mat ground, obstacles;
|
||||||
util3d::occupancy2DFromLaserScan(scan, ground, obstacles, gridCellSize_);
|
util3d::occupancy2DFromLaserScan(scan, ground, obstacles, gridCellSize_, gridUnknownSpaceFilled_);
|
||||||
gridMaps_.insert(std::make_pair(iter->first, std::make_pair(ground, obstacles)));
|
gridMaps_.insert(std::make_pair(iter->first, std::make_pair(ground, obstacles)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ private:
|
|||||||
double gridCellSize_;
|
double gridCellSize_;
|
||||||
double gridSize_;
|
double gridSize_;
|
||||||
bool gridEroded_;
|
bool gridEroded_;
|
||||||
|
bool gridUnknownSpaceFilled_;
|
||||||
double mapFilterRadius_;
|
double mapFilterRadius_;
|
||||||
double mapFilterAngle_;
|
double mapFilterAngle_;
|
||||||
bool mapCacheCleanup_;
|
bool mapCacheCleanup_;
|
||||||
|
|||||||
Reference in New Issue
Block a user