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

One topic maps to multiple domains #72

Open
TianqiLi7398 opened this issue Oct 29, 2022 · 0 comments
Open

One topic maps to multiple domains #72

TianqiLi7398 opened this issue Oct 29, 2022 · 0 comments

Comments

@TianqiLi7398
Copy link

Howdy, I'd like to ask for some thoughts of mapping one topic to different domains. For example, I want topic /topic_a from ROS_DOMAIN_ID=0 broadcast to ROS_DOMAIN_ID=[1,2,3,4...] .

What I tried:
a). in the .yaml config file, I just duplicate this topic like

  /topic_a:
    from_domain: 0
    to_domain: 1
    type: std_msgs/msg/Int16
  /topic_a:
    from_domain: 0
    to_domain: 2
    type: std_msgs/msg/Int16
  /topic_a:
    from_domain: 0
    to_domain: 3
    type: std_msgs/msg/Int16
...

And surprisingly it worked! We are able to duplicate the key in .yaml file and domain_bridge follows this.

b). a more controllable way, I desire to input the bridge content from code (Python, Cpp). But to generate the .yaml file, we need to make the data as dictionary. We cannot duplicate the key in dictionary. And here my question is what is a good way to make this happen in scripts, in stead of hand code the domain bridge.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant