Skip to content

Topic remapping from YAML file #1179

@oysstu

Description

@oysstu

Feature request

Feature description

Currently, the only way of remapping node topics is through node arguments, e.g. NodeOptions or launch arguments. This means that remapping must either change the node implementation, launch file implementation, or pass remap arguments when starting. The ability to declare the topics to be remapped together with the node parameters in the YAML file would make it possible to keep as much of the configuration in the same place.

/ns:
  node1:
    ros__remap:
      /topic/to/remap: /new/topic/path
    ros__parameters:
      foo: "bar"
      bar: "foo"

Alternative syntax where topics are not keys but an array:

/ns:
  node1:
    ros__remap:
      - from: /topic/to/remap1
        to:  /new/topic/path1
      - from: /topic/to/remap2
        to: /new/topic/path2
    ros__parameters:
      foo: "bar"
      bar: "foo"

Implementation considerations

I'm thinking the above should have the same order of precedence as the parameters if a topic is both remapped in NodeOptions, node arguments, or yaml file. There's also an ongoing discussion about dynamic/runtime remapping (#1072), but the above should just set the initial value, same as parameters.

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