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

Indexing ROS2 topics/nodes based on host?

asked 2019-10-08 01:09:36 -0500

PG_GrantDare gravatar image

Hi Everyone,

I am wondering if I am able to index a topic based on the host IP? If I have 3 robots on one network and they all look for a cmd_vel how can I index what topic to publish to? Do I have to prefix them all with /robot(n)_cmd_vel? This is what ROS1 had to do, I thought ROS2 was better at this functionality.

edit retag flag offensive close merge delete

Comments

"based on host" or 'robot'? host != robot in the general case I would say.

gvdhoorn gravatar image gvdhoorn  ( 2019-10-08 03:54:29 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-10-08 04:25:31 -0500

tfoote gravatar image

We have not changed the basic communication model of anonymous publish subscribe between ROS 1 and ROS 2. To that end in general if you're on the same topic you're expected to want the same data.

You don't have to specifically modify each topic. There are tools you can leverage such as namespaces to push all the content into a lower namespace so as not to interfere with similarly structured robots in another namespace.

edit flag offensive delete link more

Comments

Thank you. Are there plans to have robots indexable by their hosts?

PG_GrantDare gravatar image PG_GrantDare  ( 2019-10-08 17:00:08 -0500 )edit

In general no, that's not a pattern that we're designing for. The computational graph should be generally independent of what host it's running on. Many robots have one or more hosts and you might want to migrate processing to different hosts (maybe onboard, maybe offboard) transparently depending on your deployment and equipment capability. The assumption of a one to one association of host and robot does not hold for many use cases.

tfoote gravatar image tfoote  ( 2019-10-08 17:35:36 -0500 )edit

Ok, I understand that. What would be the standard to have a robot identifier given that it does have a one-to-one host relationship? Would it be using namespaces/ a prefix?

PG_GrantDare gravatar image PG_GrantDare  ( 2019-10-10 20:44:38 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-10-08 01:09:36 -0500

Seen: 241 times

Last updated: Oct 08 '19