0
$\begingroup$

Rosanswers logo

Hi folks,

I'm trying to connect to ROS running on a remote machine. I can remotely echo the topics from the machine however I cannot publish anything.

rostopic echo /odom

works like a charm, printing all the odom messages published by the remote ROS on my local laptop.

rostopic pub /cmd_vel geometry_msgs/Twist -- ""

however does not. I have traced the communication using Wireshark and all I can see are some registerService, registerPublisher and getParam commands. My message however doesn't arrive. I've also tried to simply publish a std_msgs/String to a topic called /blubb. But even that does not work. I cannot see the message itself on the network (however I can see the mentioned remote procedure calls) and thus it doesn't arrive at the remote machine.

ROS_IP is set to the remote machine's IP on both machines. ROS_MASTER_URI is set to http://:11311 on both machines.

netcat works, rostopic echo does, rqt_plot does, even rviz does using the remote connection. I just can't send messages to the remote machine.

Any idea what might be wrong?

Thanks a lot!

Cheers, Hendrik


Originally posted by Hendrik Wiese on ROS Answers with karma: 1145 on 2014-01-16

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I think you've got the meaning of ROS_IP wrong. ROS_IP is to be set to each machine's ip, where a node is running. It is not something like ROS_MASTER_URI!

So, if you have machine a at 10.1.1.1 and machine b at 10.1.1.2, each node running on a must have ROS_IP 10.1.1.1 and each node on machine b ROS_IP 10.1.1.2. The reason is that machines need to be able to connect forth and back. That is why some connections work (in one direction), while others don't.


Originally posted by dornhege with karma: 31395 on 2014-01-16

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by tfoote on 2014-01-16:
See http://wiki.ros.org/ROS/NetworkSetup for an overview of networking setup.

Comment by Hendrik Wiese on 2014-01-18:
I see, I see. Thanks a lot! That has solved this problem.

$\endgroup$

Your Answer

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