Fixed https://github.com/introlab/rtabmap_ros/issues/1173 (edited optimized map regenerated in localization mode)

This commit is contained in:
matlabbe
2024-06-09 20:45:36 -07:00
parent 0f03db9d7f
commit 2a840fe340

View File

@@ -81,7 +81,10 @@ void OccupancyGrid::setMap(const cv::Mat & map, float xMin, float yMin, float ce
minValues_[0] = xMin;
minValues_[1] = yMin;
cellSize_ = cellSize;
addAssembledNode(poses.lower_bound(1)->first, poses.lower_bound(1)->second);
for(std::map<int, Transform>::const_iterator iter=poses.lower_bound(1); iter!=poses.end(); ++iter)
{
addAssembledNode(iter->first, iter->second);
}
}
}