From 0b9a4c54670d84ec808d995efe213846c4b54e48 Mon Sep 17 00:00:00 2001 From: Joey Yang Date: Thu, 4 Jul 2024 02:15:53 -0400 Subject: [PATCH] Return out of map update if frames mismatch. Signed-off-by Joey Yang Signed-off-by: Joey Yang --- nav2_costmap_2d/plugins/static_layer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/nav2_costmap_2d/plugins/static_layer.cpp b/nav2_costmap_2d/plugins/static_layer.cpp index 729530d82b..25a10e3bd8 100644 --- a/nav2_costmap_2d/plugins/static_layer.cpp +++ b/nav2_costmap_2d/plugins/static_layer.cpp @@ -318,6 +318,7 @@ StaticLayer::incomingUpdate(map_msgs::msg::OccupancyGridUpdate::ConstSharedPtr u "StaticLayer: Map update ignored. Current map is in frame %s " "but update was in frame %s", map_frame_.c_str(), update->header.frame_id.c_str()); + return; } unsigned int di = 0;