Use global namespace for parameter events subscription topic (#1257) (#1261)

Similar to https://github.com/ros2/rclcpp/pull/929, but for the subscription.

This fixes an issue listening to parameter events from a remote node when the local node has a different namespace.
Originally reported here: https://answers.ros.org/question/358170/parameter-events-on-foxy/

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This commit is contained in:
Jacob Perron 2020-11-06 09:37:02 -08:00 committed by GitHub
parent 7266e67683
commit 0e8450940f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -177,7 +177,7 @@ public:
{ {
return rclcpp::create_subscription<rcl_interfaces::msg::ParameterEvent>( return rclcpp::create_subscription<rcl_interfaces::msg::ParameterEvent>(
node, node,
"parameter_events", "/parameter_events",
qos, qos,
std::forward<CallbackT>(callback), std::forward<CallbackT>(callback),
options); options);