Ask Your Question
0

Multi Machine setup rostopic list works but echo won't

asked 2017-07-11 17:26:03 -0500

kalvik gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-07-11 18:31:50 -0500

ahendrix gravatar image

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.

edit flag offensive delete link more

Comments

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.

kalvik gravatar imagekalvik ( 2017-07-11 19:20:34 -0500 )edit

Can you rosnode ping the publishing node?

ahendrix gravatar imageahendrix ( 2017-07-11 19:28:52 -0500 )edit

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

kalvik gravatar imagekalvik ( 2017-07-11 22:36:38 -0500 )edit

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.

kalvik gravatar imagekalvik ( 2017-07-11 22:45:52 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-07-11 17:26:03 -0500

Seen: 223 times

Last updated: Jul 11 '17