Problems with communication between multiple machines
So, i have this setup in my ros network:
My PC (172.16.49.9) as a publisher of the topic /controlInfo
Robot's PC (172.16.49.1 aka 172.17.1.1) as the ROS Master
Raspberry Pi hardware module (172.17.1.10) as subscriber of the topic /controlInfo
Pi is connected to Robot's PC through ethernet on the 172.17.x.x network. In both Pi and Robot's PC i can list all the nodes, see that /controlInfo is subscribed by 172.17.1.10 and published by 172.16.49.9, and whenever i publish data, i can echo-it in Robot's PC (so, the data reaches the master), but i can't echo-it in Pi.
What's the problem here ? Since i can successfuly communicate between the Robot's PC and the Pi, i can list and everything seems to be correctly setup, why u no work ???
--- EDIT
I made a new test on the machines, as my PC is providing the WLAN for the robot's PC. So, my pc has now ip 172.16.49.254, Robot's PC and Raspberry remains the same. My PC communicates with Robot's PC through WLAN and the raspberry is connected to Robot's PC by ethernet. I made a call to rosnode info (node in raspberry) from the Robot's PC and everything is ok. I made the same command from my PC and, although i can get a lot of info (which stuff it subscribes/publishes) it gives me an error : (pi_hw node is inside raspberry pi, and Robot's PC is the ROS_MASTER, all ROS_IP's are correctly set).
Node [/pihw_node]
Publications:
* /rosout [rosgraph_msgs/Log]
* /hardwareInfo [minho_team_ros/hardwareInfo]
Subscriptions:
* /teleop [unknown type]
* /controlInfo [unknown type]
Services:
* /requestIMULinTable
* /requestOmniProps
* /pihw_node/get_loggers
* /requestKick
* /pihw_node/set_logger_level
* /requestResetIMU
contacting node http://172.17.1.10:33608/ ...
ERROR: Communication with node[http://172.17.1.10:33608/] failed!
It seems i can fetch information about the node (because it may be stored somewhere in Robot's PC) but i cant communicate with Raspberry because my PC can't reach her. I can successfully communicate from my PC to Robot's PC and from Robot's PC to Raspberry.
--- EDIT
Network scheme. It seems My PC and Raspberry need to communicate directly in order for this to work, so i will probably need ip routing.
WLAN : 172.16.49.0/24 Robot's PC Ethernet : 172.17.0.0/16
PC IP ROS_MASTER_URI ROS_IP ROS_HOSTNAME
My PC 172.16.49.9 172.16.49.1 172.16.49.9 pedro K52Jc
Robot's PC 172.16.49.1 172.16.49.1 172.16.49.1 robot1
Rasp 172.17.1.10 172.16.49.1 172.17.1.10 rasphw1
I truly believe that the only problem here is that Rasp cannot reach directly My PC, so they dont communicate, and it is a normal thing (that they cant reach each other) but i thought ...
Please add the values of
ROS_IP
,ROS_HOSTNAME
andROS_MASTER_URI
for all involved computers to your question description (edit it). Also please tell us whether you have a dedicated DNS server, a (consumer) rounter or are relying on something like Bonjour or a similar service.Hi. The master in all of them is http://172.16.49.1 (Robot's PC). Im using a consumer router and im not using ROS_HOSTNAME. The weird thing is that the pi node subscribes the node in Robot's pc but doesnt receive the data. For this to happen usually the ROS_IP and master uri have to be set correctly
You haven't told us what the values are of
ROS_IP
on each of the hosts involved.In most of these cases the involved hosts don't agree on the names that they have and / or report (ie: machine1 broadcasts
machine1
, but machine2 knows it undermachine1.some.domain
). UsingROS_IP
avoids this.Hi, in my pc ROS_IP is set to 172.16.49.9, in Pis is set to 172.17.1.0 and in Robot's PC to 172.16.49.1 (ethernet ip is 172.17.1.1). Will check on that data on monday and get back gere
Is that a typo? Should it read
.10
?Yep, it is .10 sorry
@wicked88: the
postimg
link doesn't work. Could I also ask you to attach images to your question directly? I've given you enough karma to do so.I appreciate your confidence (and I haven't seen your network diagram yet), but isn't this what we're trying to ascertain? :) "Assumptions are .." etc. Could you add a table with
ROS_IP
,ROS_HOSTNAME
,ROS_MASTER_URI
and IP and hostname of all involved hosts?