Skip to content

Commit

Permalink
Merge branch 'fix/visibility_cleanup' into 'master'
Browse files Browse the repository at this point in the history
[elevation_mapping]  Fix ray-tracing in elevation map on the edge of sensor window

Closes #UNKNOWN

GitOrigin-RevId: 6919a0b4e384d4b90f0fbf65e537869b8d2083f7
  • Loading branch information
mgaertneratanybotics authored and kjalloul-anybotics committed Dec 3, 2024
1 parent c313843 commit ee3308b
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions grid_map_core/src/GridMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -854,26 +854,14 @@ void GridMap::clearAll()

void GridMap::clearRows(unsigned int index, unsigned int nRows)
{
std::vector<std::string> layersToClear;
if (basicLayers_.size() > 0) {
layersToClear = basicLayers_;
} else {
layersToClear = layers_;
}
for (auto & layer : layersToClear) {
for (auto & layer : layers_) {
data_.at(layer).block(index, 0, nRows, getSize()(1)).setConstant(NAN);
}
}

void GridMap::clearCols(unsigned int index, unsigned int nCols)
{
std::vector<std::string> layersToClear;
if (basicLayers_.size() > 0) {
layersToClear = basicLayers_;
} else {
layersToClear = layers_;
}
for (auto & layer : layersToClear) {
for (auto & layer : layers_) {
data_.at(layer).block(0, index, getSize()(0), nCols).setConstant(NAN);
}
}
Expand Down

0 comments on commit ee3308b

Please sign in to comment.