0
$\begingroup$

I am trying to set up a simple and listener talker across two machines connected on the same wifi network. Machine A has the 10.42.0.89 address and is running the roscore and another node that publishes messages on a topic.

$ printenv | grep ROS
ROS_IP=10.42.0.89
ROS_MASTER_URI=http://10.42.0.89:11311

The other Machine B has the ROS_MASTER_URI set to match the one of machine A

$ printenv | grep ROS
ROS_MASTER_URI=http://10.42.0.89:11311

Machine B can get the list of available topics and running nodes correctly

$ rostopic list
/pose/estimate

But can't print out messages in that topic using rostopic echo /pose/estimate.

Do you have any advice?

$\endgroup$

2 Answers 2

1
$\begingroup$

I had this problem and I solved my problem by adding both machines' hostname to /etc/hosts. refer to https://husarion.com/tutorials/ros-tutorials/5-running-ros-on-multiple-machines/

$\endgroup$
1
$\begingroup$

ROS1

Machine1 [MASTER]:

  • Will run roscore, but don't run it yet till configurations are done.
  • Has an IP of 192.168.1.10.

1- Run the following in the terminal:

1.1- export ROS_MASTER_URI=http://192.168.1.10:11311.

1.2- export ROS_IP=192.168.1.10.

2- Now, run roscore.

Machine2 [SLAVE]

  • Will NOT run roscore.
  • Has and IP 192.168.1.15.

1- Run the following in the terminal:

1.1- export ROS_MASTER_URI=http://192.168.1.10:11311.

1.2- export ROS_IP=192.168.1.15.

2- Now, you are connected to the Master.

More information in the ROS 1 NetworkSetup guide


ROS2

ROS2 will populate the information on the LAN out of the box without any configuration.

By default you'll want to make sure multicast is enabled

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.