0
$\begingroup$

Rosanswers logo

Hi, I am trying to subscribe to a node I launched on a raspberry pi on my laptop. I am able to SSH into the raspberry pi to launch the node (the problem is not that roscore isn't running because it is), but when I open another terminal and run rostopic list, the cursor blinks for a while before I get an "Unable to communicate with master" error. Both of my machines have the same ROS_MASTER_URI, which is http://cameraduckie.local:11311. This hostname is the one that I ssh into from my laptop to launch the first node. I am very confused because the two machines can ping each other but the laptop cannot communicate with master--any insight would be greatly appreciated. Thanks, Taylor


Originally posted by tayagrey6 on ROS Answers with karma: 1 on 2017-10-30

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It sounds that you didn't configure your ROS_IP variable.

Let's assume that the IP of your master (where the roscore is running - the raspberry pi in your case) is 192.168.1.1, so you will have to run

export ROS_MASTER_URI=http://192.168.1.1:11311

export ROS_IP=192.168.1.1

And assume on the slave computer the IP is 192.168.1.2, you will have to run

export ROS_MASTER_URI=http://192.168.1.1:11311

export ROS_IP=192.168.1.2

After that you should have ROS connectivity


Originally posted by Oded with karma: 105 on 2017-10-31

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by tayagrey6 on 2017-11-01:
Hi Oded, I tried this but unfortunately it didn't work either--I receive the same error as before. I had this whole configuration working via ethernet before, but then it stopped working when I switched over to wifi--if that helps at all. Thank you for your response!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.