Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading