mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
This commit is contained in:
@@ -377,7 +377,7 @@ void OccupancyGrid::createLocalMap(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UWARN("Cannot create local map, scan is empty (node=%d, %s=0).", node.id(), Parameters::kGridSensor().c_str());
|
UWARN("Cannot create local map from scan: scan is empty (node=%d, %s=%d).", node.id(), Parameters::kGridSensor().c_str(), occupancySensor_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -457,9 +457,12 @@ void OccupancyGrid::createLocalMap(
|
|||||||
if(occupancySensor_ == 2)
|
if(occupancySensor_ == 2)
|
||||||
{
|
{
|
||||||
// backup
|
// backup
|
||||||
scanGroundCells = groundCells.clone();
|
scanGroundCells = groundCells;
|
||||||
scanObstacleCells = obstacleCells.clone();
|
scanObstacleCells = obstacleCells;
|
||||||
scanEmptyCells = emptyCells.clone();
|
scanEmptyCells = emptyCells;
|
||||||
|
groundCells = cv::Mat();
|
||||||
|
obstacleCells = cv::Mat();
|
||||||
|
emptyCells = cv::Mat();
|
||||||
}
|
}
|
||||||
|
|
||||||
createLocalMap(LaserScan(util3d::laserScanFromPointCloud(*cloud, indices), 0, 0.0f), node.getPose(), groundCells, obstacleCells, emptyCells, viewPoint);
|
createLocalMap(LaserScan(util3d::laserScanFromPointCloud(*cloud, indices), 0, 0.0f), node.getPose(), groundCells, obstacleCells, emptyCells, viewPoint);
|
||||||
|
|||||||
Reference in New Issue
Block a user