Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Namespacing the parameter blackboard node leads to wrong events topic #1255

Closed
maxlein opened this issue Aug 3, 2020 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@maxlein
Copy link

maxlein commented Aug 3, 2020

Bug report

Our system has all nodes namespaced, e.g. /robot_1/param_server.
Now we switched from eloquent to foxy, and all parameter events failed to fire.

After a bit of testing and asking a question, I found out that adding a namespace breaks parameter events.

Output from demo parameter blackboard started with namespace test_ns:

ros2 node info /test_ns/parameter_blackboard
/test_ns/parameter_blackboard
  Subscribers:
    /test_ns/parameter_events: rcl_interfaces/msg/ParameterEvent
  Publishers:
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /rosout: rcl_interfaces/msg/Log
  Service Servers:
    /test_ns/parameter_blackboard/describe_parameters: rcl_interfaces/srv/DescribeParameters
    /test_ns/parameter_blackboard/get_parameter_types: rcl_interfaces/srv/GetParameterTypes
    /test_ns/parameter_blackboard/get_parameters: rcl_interfaces/srv/GetParameters
    /test_ns/parameter_blackboard/list_parameters: rcl_interfaces/srv/ListParameters
    /test_ns/parameter_blackboard/set_parameters: rcl_interfaces/srv/SetParameters
    /test_ns/parameter_blackboard/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically

parameter_events node:

ros2 node info /test_ns/parameter_events
/test_ns/parameter_events
  Subscribers:
    /test_ns/parameter_events: rcl_interfaces/msg/ParameterEvent
  Publishers:
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /rosout: rcl_interfaces/msg/Log

As you see the parameter_events topic subscriber has a namespace, whereas the publisher has not.
This doesn't look right to me..

I can get it to work by remapping the node local event topic to a global one: --ros-args -r parameter_events:=/parameter_events

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • binaries, foxy
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

Start parameter blackboard node and parameter events node from demo_cpp project with a namespace, e.g. add --ros-args -r __ns:=/test_ns

Expected behavior

Parameter events are handled the same as without a namespace

Actual behavior

No parameter events are called

@fujitatomoya
Copy link
Collaborator

@maxlein
CC: @clalancette

I confirmed that problem's fixed, but it would be nice if you could double check. then we can close this.

@ivanpauno ivanpauno added the bug Something isn't working label Aug 4, 2020
@ivanpauno
Copy link
Member

Fixed in #1257.

@maxlein If it doesn't work for you, let me know and I will reopen (the bug was corrected in master, it hasn't been fixed in Foxy yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants