Skip to content

Commit

Permalink
Fixed param name
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde committed Oct 5, 2023
1 parent dc88529 commit 6fbe869
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions include/point_cloud_transport/simple_publisher_plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,23 @@ class SimplePublisherPlugin : public point_cloud_transport::PublisherPlugin
rcl_interfaces::msg::ParameterDescriptor())
{
if (simple_impl_) {
<<<<<<< Updated upstream:include/point_cloud_transport/simple_publisher_plugin.hpp
simple_impl_->node_->template declare_parameter<T>(
parameter_name, value, parameter_descriptor);
=======
// 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;

rcl_interfaces::msg::ParameterDescriptor param_descriptor = parameter_descriptor;
param_descriptor.name = param_name;

simple_impl_->node_->template declare_parameter<T>(
param_name, value, param_descriptor);
>>>>>>> Stashed changes:point_cloud_transport/include/point_cloud_transport/simple_publisher_plugin.hpp
return true;
}
return false;
Expand Down

0 comments on commit 6fbe869

Please sign in to comment.