Skip to content

NetworkTroubleshooting

matchRos edited this page Apr 29, 2021 · 5 revisions

Unable to contact my own server at ...

If the local machine is given a hostname (you can see it within the termial as user@hostname at the beginning of each line). If this hostname is not defined within the /etc/hosts file with the proper ip the ros bringup procedure throws a RLExcepltion since the machine cannot ping itself.

Solution:

Specify the hosts ip within the /etc/hosts file to be the ip of that network device wich communicates with the ros master. E.g. if the machine communicates with the master due wireless network you specify the host ip to be the ip of your w-lan network device.

Warning: the ECDSA host key for $hostname differs from the key for the IP address

This often happens if ip configurations for the system specified by hostname are changed. The keys stored on the system wich want's to connect dont fit!

Solution:

Remove the old versions of the keys by (remove hostname and ip_adress):

ssh-keygen -R $hostname
ssh-keygen -R $ip_adress

Ping between rosmaster and slave is possible but ros messages are not received on either or both ends

This could have a lot of reasons. First, follow this tutorial on the ROS wiki: ROS Wiki Network Setup

Then check the /etc/hosts-file on both computers and verify that the IP-addresses are correctly listed.

In the end what did the trick this time was setting the environment variables for ROS. This means on both computers the $ROS_MASTER_URI and $ROS_IP must be set correctly. The $ROS_MASTER_URI is the link to the rosmaster. The $ROS_IP is the IP of the computer itself.

Clone this wiki locally