diff --git a/point_cloud_transport/include/point_cloud_transport/simple_publisher_plugin.hpp b/point_cloud_transport/include/point_cloud_transport/simple_publisher_plugin.hpp index e726423..ae1d480 100644 --- a/point_cloud_transport/include/point_cloud_transport/simple_publisher_plugin.hpp +++ b/point_cloud_transport/include/point_cloud_transport/simple_publisher_plugin.hpp @@ -106,8 +106,15 @@ class SimplePublisherPlugin : public point_cloud_transport::PublisherPlugin rcl_interfaces::msg::ParameterDescriptor()) { if (simple_impl_) { + // Declare Parameters + uint ns_len = simple_impl_->node_->get_effective_namespace().length(); + std::string param_base_name = getTopic().substr(ns_len); + std::replace(param_base_name.begin(), param_base_name.end(), '/', '.'); + + std::string param_name = param_base_name + "." + parameter_name; + simple_impl_->node_->template declare_parameter( - parameter_name, value, parameter_descriptor); + param_name, value, parameter_descriptor); return true; } return false;