diff --git a/nav2_map_server/test/component/test_map_saver_publisher.cpp b/nav2_map_server/test/component/test_map_saver_publisher.cpp index 50d66b0a5e..c08107f72f 100644 --- a/nav2_map_server/test/component/test_map_saver_publisher.cpp +++ b/nav2_map_server/test/component/test_map_saver_publisher.cpp @@ -36,7 +36,7 @@ class TestPublisher : public rclcpp::Node std::string pub_map_file = path(TEST_DIR) / path(g_valid_yaml_file); LOAD_MAP_STATUS status = loadMapFromYaml(pub_map_file, msg_); if (status != LOAD_MAP_SUCCESS) { - RCLCPP_ERROR(get_logger(), "Can not load %s map file", pub_map_file); + RCLCPP_ERROR(get_logger(), "Can not load %s map file", pub_map_file.c_str()); return; }