From 74d611c46553f19ea0dc553abb67e7eaadab0e15 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sat, 10 Feb 2024 15:36:13 -0800 Subject: [PATCH] fixed #1117 --- rtabmap_slam/src/CoreWrapper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtabmap_slam/src/CoreWrapper.cpp b/rtabmap_slam/src/CoreWrapper.cpp index 4a22e6590..9e55ce977 100644 --- a/rtabmap_slam/src/CoreWrapper.cpp +++ b/rtabmap_slam/src/CoreWrapper.cpp @@ -328,10 +328,12 @@ CoreWrapper::CoreWrapper(const rclcpp::NodeOptions & options) : { RCLCPP_WARN(get_logger(), "Node paused... don't forget to call service \"resume\" to start rtabmap."); } + + const std::map & overrides = this->get_node_parameters_interface()->get_parameter_overrides(); for(ParametersMap::iterator iter=allParameters.begin(); iter!=allParameters.end(); ++iter) { std::string vStr = this->declare_parameter(iter->first, iter->second); - if(vStr.compare(iter->second)!=0) + if(overrides.find(iter->first) != overrides.end()) { RCLCPP_INFO(this->get_logger(), "Setting RTAB-Map parameter \"%s\"=\"%s\"", iter->first.c_str(), vStr.c_str());