Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
matlabbe committed Sep 4, 2023
1 parent 6a5b844 commit e56e0c3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions corelib/src/OccupancyGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ void OccupancyGrid::createLocalMap(
}
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_);
}
}

Expand Down Expand Up @@ -457,9 +457,12 @@ void OccupancyGrid::createLocalMap(
if(occupancySensor_ == 2)
{
// backup
scanGroundCells = groundCells.clone();
scanObstacleCells = obstacleCells.clone();
scanEmptyCells = emptyCells.clone();
scanGroundCells = groundCells;
scanObstacleCells = obstacleCells;
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);
Expand Down

0 comments on commit e56e0c3

Please sign in to comment.