0
$\begingroup$

Rosanswers logo

Hi, I am trying to subscribe to a topic on a remote machine from my base machine.When I run rostopic list it works on both systems but when I try rostopic echo for a topic it won't work. My base machine ip -192.168.1.5 (dhcp) remote machine ip - 192.168.1.10 (static) they are connected to the same router and they both have export ROS_MASTER_URI=http://192.168.1.5:11311/ on both machine's bashrc files. And I have ROS_IP=192.168.1.5 on the base and ROS_IP=192.168.1.10 on the remote's bashrc file.When I run ping IP_ADDRESS it works both ways base-remote and remote-base. I ran roscore on the base and ran a publisher on the remote. rostopic list works on both machines but rostopic echo SOME-TOPIC won't work.


Originally posted by kalvik on ROS Answers with karma: 1 on 2017-07-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Your ROS_IP isn't set correctly. On each machine, make sure it's set to the IP address of that machine.

rostopic list uses the ROS_MASTER_URI to talk to the ROS master and get the list of topics. rostopic echo uses the ROS_MASTER_URI to look up the publisher and then contacts that publisher based on its ROS_IP (or ROS_HOSTNAME).

I gave a talk about troubleshooting network issues at ROSCon 2013 if you'd like a more in-depth overview: video and slides.


Originally posted by ahendrix with karma: 47576 on 2017-07-11

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by kalvik on 2017-07-11:
That's what I did. The base has the ip 192.168.1.5 and that's what ROS_IP is and the remote has 192.168.1.10.Didn't work.

Comment by ahendrix on 2017-07-11:
Can you rosnode ping the publishing node?

Comment by kalvik on 2017-07-11:
kalvik@kalvik:~$ rosnode ping -c 4 mavros rosnode: node is [/mavros] pinging /mavros with a timeout of 3.0s xmlrpc reply from http://192.168.1.18:36689/ time=4.885912ms xmlrpc reply from http://192.168.1.18:36689/ time=3.579855ms xmlrpc reply from http://192.168.1.18:36689/ time=2.745152ms xmlrpc re

Comment by kalvik on 2017-07-11:
I watched your video I used all the tools you explained and looks like everything is fine. So I ran a talker.py on the remote and used echo on the base. And it works fine I was able to see the data. But when I use rqt I get not monitored on every topic including talker.py's chatter topic.

$\endgroup$

Your Answer

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