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

Add namespace config #9

Merged
merged 1 commit into from
Oct 12, 2023
Merged

Add namespace config #9

merged 1 commit into from
Oct 12, 2023

Conversation

JEnoch
Copy link
Member

@JEnoch JEnoch commented Oct 12, 2023

The bridge has a namespace configuration that was only used as namespace for the zenoh_bridge_ros2dds node.

This PR prefixes all the Zenoh key expressions used for routes with the configured namespace.
As a consequence, with a bridge configured with bot1 as namespace:

  • a ROS2 topic cmd_vel will be exposed in Zenoh as bot1/cmd_vel
  • a remote bridge using the same bot1 namespace will route the Zenoh key expr bot1/cmd_vel as a ROS2 topic cmd_vel.
  • a remote bridge using another namespace (or none) will route the Zenoh key expr bot1/cmd_vel as a ROS2 topic bot1/cmd_vel

In case of multiple robots, this allows to keep the ROS2 nodes running in each robot untouched, without namespace remapping. Then, a control host has the choice:

  • either it controls only 1 robot => run the bridge with the same robot's namespace, and keep the ROS2 control nodes untouched, without namespace remapping
  • either it controls several robots => run the bridge without namespace, and have the ROS2 control node addressing each robot nodes with it's namespace prefix (e.g. bot1/cmd_vel)

@JEnoch JEnoch merged commit 2d380bb into eclipse-zenoh:main Oct 12, 2023
3 checks passed
@JEnoch
Copy link
Member Author

JEnoch commented Oct 12, 2023

Note: ALL the topics are prefixed by the bridge with namespace, including /rosout, /parameter_events, /tf and /tf_static.
I think that makes more sense than to have for instance only 1 /tf topic for all the robots and filter out all the incoming data for only 1 robot we're interested in.
If you don't agree, please post an issue and I'll consider to add an "exception list" to configure topics that shall not be prefixed by the bridge's namespace.

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

Successfully merging this pull request may close these issues.

1 participant