Skip to content

Commit

Permalink
Fixed param name (#36)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
(cherry picked from commit 851434a)
  • Loading branch information
ahcorde authored and mergify[bot] committed Oct 5, 2023
1 parent cdd0398 commit 4a3f5f1
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(
parameter_name, value, parameter_descriptor);
param_name, value, parameter_descriptor);
return true;
}
return false;
Expand Down

0 comments on commit 4a3f5f1

Please sign in to comment.