Unable to start roscore for multiple machine in LAN setup
I have 2 ROS devices in a master-slave setup and I am trying to get them to communicate in a closed LAN setup. Both devices are directly connected to each other using an Ethernet cable using the Link-Local setup and are able to ping each other without issue.
However, when attempting to run roscore
on the master device, it gives the following warning:
RLException: Unable to contact my own server at [http://<master_ip_address>:44419/].
This usually means that the network is not configured properly.
A common cause is that the machine cannot connect to itself. Please check for errors by running
ping <master_ip_address>
Attempting to ping the <master_ip_address>
was successful without error.
The two devices work without issue when they communicate through the internet (using their internet IP addresses)
What am I doing wrong?
Asked by bc524 on 2022-09-29 01:27:10 UTC
Comments
You need to configure
ROS_MASTER_URI
andROS_IP
environment variables properly. Please read [1] and [2]. Sometimes users have reported that additionally the/etc/hosts
file configuration is required. Also, make sure that firewall is not blocking those connections.Asked by ravijoshi on 2022-09-29 02:41:04 UTC
@ravijoshi
I have set my ros_master_uri and ros_ip to follow the IP in my LAN connection. It fully works when I have both device connected to the internet and using the IP from the wireless router. If I have the both connect to an offline wireless hub, it also functions properly. My only issue is that a direct connection between the two device doesn't seem to work. I don't think its a firewall issue, but I'm open to checking it if you can guide me on how to do so.
Can you elaborate on what to do for /etc/host section?
Asked by bc524 on 2022-09-29 05:16:26 UTC
What command are you using to start
roscore
? Port 44419 is... unusual.Also, the time-of-day clock on all machines must be synchronized. This is typically done using an NTP time server, and configuring all of the machines to use it.
Asked by Mike Scheutzow on 2022-10-02 10:46:50 UTC
@Mike Scheutzow
Just the regular
roscore
. The time between the 2 device was also synchronized with chrony before trying to do the LAN connection. Plus it works when I tried to connect both devices to a local wireless hub and they were able to run without issue.The point seems moot now as trying it today and it magically works, for some reason. Trying to figure out if it was a coding error in my end, but all I did was changing the comment the
ROS_MASTER_URI
for different IP address (turned the internet IP "off" and the lan IP "on" again)Asked by bc524 on 2022-10-02 21:08:53 UTC