From ee3308bd9903e1a45bd18869ea28f2610cf9fac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20G=C3=A4rtner?= Date: Tue, 15 Dec 2020 14:34:18 +0000 Subject: [PATCH] Merge branch 'fix/visibility_cleanup' into 'master' [elevation_mapping] Fix ray-tracing in elevation map on the edge of sensor window Closes #UNKNOWN GitOrigin-RevId: 6919a0b4e384d4b90f0fbf65e537869b8d2083f7 --- grid_map_core/src/GridMap.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/grid_map_core/src/GridMap.cpp b/grid_map_core/src/GridMap.cpp index cbee49dff..a76ff1cc6 100644 --- a/grid_map_core/src/GridMap.cpp +++ b/grid_map_core/src/GridMap.cpp @@ -854,26 +854,14 @@ void GridMap::clearAll() void GridMap::clearRows(unsigned int index, unsigned int nRows) { - std::vector 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 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); } }