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

Topic remapping from YAML file #1179

Open
oysstu opened this issue Aug 23, 2024 · 1 comment
Open

Topic remapping from YAML file #1179

oysstu opened this issue Aug 23, 2024 · 1 comment
Labels
backlog enhancement New feature or request

Comments

@oysstu
Copy link

oysstu commented Aug 23, 2024

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.

@clalancette
Copy link
Contributor

I personally think this would be a fine feature to have; my feeling is that anything we can do on the command-line we should also be able to do in a config file.

That said, getting this working is probably going to be a bunch of work. This will probably need work in rcl_yaml_param_parser, rcl, rclcpp, rclpy, launch_ros, and ros2cli to work properly (there may be more). I'm going to mark this as a "feature request", and put it on the backlog.

@clalancette clalancette added enhancement New feature or request backlog labels Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants