From 3c95664076170136536d6b0263db40b8d51eebe4 Mon Sep 17 00:00:00 2001 From: DylanDeCoeyer-Quimesis <102609575+DylanDeCoeyer-Quimesis@users.noreply.github.com> Date: Mon, 18 Nov 2024 20:32:31 +0100 Subject: [PATCH] nav2_costmap_2d: add missing default_value_ copy in Costmap2D operator= (#4753) default_value_ is an attribute of the Costmap2D class and should be copied along with the other attributes. Signed-off-by: Dylan De Coeyer Signed-off-by: Jakubach --- nav2_costmap_2d/src/costmap_2d.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/nav2_costmap_2d/src/costmap_2d.cpp b/nav2_costmap_2d/src/costmap_2d.cpp index 9cb7ce19816..9ddbcf5e9d6 100644 --- a/nav2_costmap_2d/src/costmap_2d.cpp +++ b/nav2_costmap_2d/src/costmap_2d.cpp @@ -219,6 +219,7 @@ Costmap2D & Costmap2D::operator=(const Costmap2D & map) resolution_ = map.resolution_; origin_x_ = map.origin_x_; origin_y_ = map.origin_y_; + default_value_ = map.default_value_; // initialize our various maps initMaps(size_x_, size_y_);