Skip to content

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

Closed

Description

@maxlein

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

Activity

  1. fujitatomoya commented on Aug 4, 2020

    @fujitatomoya
    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.

  2. added
    bug
    on Aug 4, 2020
  3. ivanpauno commented on Aug 4, 2020

    @ivanpauno
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions