From 7c72d8f288b58f67844594bb751ef1f1dc709199 Mon Sep 17 00:00:00 2001 From: vik748 Date: Wed, 2 Aug 2017 18:21:10 -0400 Subject: [PATCH] Reference Issue #592 Added warning to AMCL when map is published on ... (#604) --- amcl/src/amcl_node.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/amcl/src/amcl_node.cpp b/amcl/src/amcl_node.cpp index 68a4717e02..cc58d8a767 100644 --- a/amcl/src/amcl_node.cpp +++ b/amcl/src/amcl_node.cpp @@ -802,6 +802,11 @@ AmclNode::handleMapMessage(const nav_msgs::OccupancyGrid& msg) msg.info.width, msg.info.height, msg.info.resolution); + + if(msg.header.frame_id != global_frame_id_) + ROS_WARN("Frame_id of map received:'%s' doesn't match global_frame_id:'%s;'. This could cause issues with reading published topics", + msg.header.frame_id.c_str(), + global_frame_id_.c_str()); freeMapDependentMemory(); // Clear queued laser objects because they hold pointers to the existing