ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Does ROS2 support keyed topic?

asked 2020-03-02 02:38:14 -0600

Sapodilla gravatar image

Hi everyone,

As stated in the title, does ROS2 have topic with keys? I have been studying ROS2 for few weeks and I have looked around but cannot find anywhere stating about keyed topic in ROS2.

Maybe I have missed something or ROS2 uses this properties in a different way. Thanks in advance for any answer!

Cheers!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-03-02 11:22:55 -0600

Short answer: No.

Long answer: You can make them keyed by placing the topics in the keyed namespaces so that you get just the instance required. For instance if you have the poses of robots on the pose topic, it may look like /robot1/pose /robot2/pose.

edit flag offensive delete link more

Comments

This isn't a complete substitution since you can't subscribe to allpose topics in every namespace with a single subscriber.

Dirk Thomas gravatar image Dirk Thomas  ( 2020-03-02 11:25:27 -0600 )edit

True, but its a reasonable work around (unless you have in mind a better way?), and you can programmatically have a vector of subscribers checking for a /some/namespace/ending/with/pose.

stevemacenski gravatar image stevemacenski  ( 2020-03-02 11:28:02 -0600 )edit

Thanks Steven! Since your answer is sufficient for me, I mark it as correct one.

Sapodilla gravatar image Sapodilla  ( 2020-03-03 02:22:27 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2020-03-02 02:38:14 -0600

Seen: 267 times

Last updated: Mar 02 '20