Skip to content

Provide a way of loading node parameters from a file regardless of the node namespace #1092

@v-lopez

Description

@v-lopez

Feature request

Feature description

Discussion originated here: ros2/ros2cli#590 (comment)

As an example I'll use ros2_control parameters, as specified here: https://github.com/ros-controls/ros2_control_demos/blob/master/ros2_control_demo_robot/controllers/rrbot_forward_controller_position.yaml

If you have multiple identical robots, their controller_manager and controller parameters will be identical as well. The same applies for the majority of the nodes running on the robot.

But as mentioned on the discussion linked above, the key in the parameters file is a fully qualified name (namespace + node name), therefore if you have 2 identical robots, you need to generate 2 files with different keys in the parameters file.

All this is doable, either by duplicating files manually, or by some launch file code that adds the proper namespace to those keys. But since this will be an extremely common (if not the default) behavior, there should be an easier way.

Implementation considerations

I believe @ivanpauno suggestion is the proper way:

Ideally, my_robot would refer to any node named my_robot and /namespace/my_robot would refer specifically to one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions