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

ros2 master and slave

asked 2020-09-30 05:44:32 -0500

Mackou gravatar image

Hello, I would like to setup a ros master machine and a ros master slave using ros2 dashing.

I cannot find anything at all online, only unanswered questions.

So how can I do this ?

Do I need to set env variables like in ROS1 ?: ROS_HOSTNAME and ROS_IP ?

I understand that with the DDS things might be very different now, so is there a way to do this ?

Thanks !

Thanks a lot

edit retag flag offensive close merge delete

Comments

1

Just to clarify: ROS never had a "master and slave" architecture.

There is only a master in the sense that it knows everything about nodes which have registered themselves as participants in the ROS node graph. Other nodes can then query the master for this information.

But after that, it's not involved at all any more, and communication (of whatever sort) is peer-to-peer (in ROS 1).

Describing a ROS 1 system as "master - slave" is really not something which makes sense.

It would be almost the same as saying your computer or phone are slaves to a DNS server. Which is not the case at all.

gvdhoorn gravatar image gvdhoorn  ( 2020-09-30 13:21:24 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-09-30 06:08:42 -0500

duck-development gravatar image

There is no master in ros2 so you do not have to set it.

But if you run the ROS Bridge there you have to say where to find the ros1 master.

edit flag offensive delete link more

Comments

Thanks ! You are right, I kept experimenting and my two coputers on the networks managed to find the nodes by themselves and I didnt have to do anything. Is it because of how the DDS is implemented ? Thanks !

Mackou gravatar image Mackou  ( 2020-09-30 07:05:39 -0500 )edit

Yes. The dds handles the service discovery.

duck-development gravatar image duck-development  ( 2020-10-01 13:14:46 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-09-30 05:44:32 -0500

Seen: 1,437 times

Last updated: Sep 30 '20