0
$\begingroup$

Rosanswers logo

Hi, I am running four computers with only one the ROS master, and I am sure I set the correct ROS_MASTER_URI (=http://192.168.10.101:11311) to the other three computers. Then the problems like this: I run a node in the master computer, and also I publish some message to that node. In this master computer, I can use "rostopic echo" to see the published messages, but in another computer, if I run "rostopic list", I see all the topics, but if I run "rostopic echo /xxxx" then I cannot see anything. Most importantly, I see the master computer threw out a message saying Couldn't find an AF_INET address for [msl]. It is probably some network problem, so please help.


Originally posted by skyhawk on ROS Answers with karma: 201 on 2014-05-10

Post score: 13

$\endgroup$

7 Answers 7

0
$\begingroup$

Rosanswers logo

skyhawk is right, set the ROS_IP for each computer. So for each computer, find the IP address in a terminal with

hostname -I

It will be the first set of numbers, like 10.0.0.25. To set it,

export ROS_IP=10.0.0.25

Make sure you're exporting the right address on each one, it'll be different for each computer.


Originally posted by mattc12345 with karma: 328 on 2014-07-30

This answer was ACCEPTED on the original site

Post score: 30


Original comments

Comment by fabbro on 2019-10-08:
This worked for me! Thanks

Comment by blubbi321 on 2020-05-22:
(as mentioned in posts below): In case this does not solve your problem edit /etc/hosts to contain the name for the rosnode. For example in there add 192.168.3.5 my_hostname

$\endgroup$
0
$\begingroup$

Rosanswers logo

You should set the ROS_IP for each computer that is in the network running the ROS.


Originally posted by skyhawk with karma: 201 on 2014-05-10

This answer was NOT ACCEPTED on the original site

Post score: 7

$\endgroup$
0
$\begingroup$

Rosanswers logo

Or just set on every computer in you network (so you don't have to thing about addresses):

export ROS_IP=`hostname -I`

Or even, sometimes better, solution is to add this line in your .bashrc file.


Originally posted by destogl with karma: 877 on 2014-09-04

This answer was NOT ACCEPTED on the original site

Post score: 5


Original comments

Comment by ahendrix on 2014-09-04:
Be warned - this only works if your computer only has one IP address. If you have two addresses, perhaps ethernet and WiFi, hostname -I will show multiple addresses and your ROS_IP will probably be invalid.

Comment by cellard0or on 2016-08-03:
@ahendrix In the case of multiple addresses, what address do have to set ROS_IP to? I set it to the one which used for communication between host and the ROS PC but it did not work.

Comment by ahendrix on 2016-08-03:
@cellard0or : that approach should work, but you've given very little information. Please ask a new question with details about your setup and the errors you're encountering.

Comment by blubbi321 on 2017-11-01:
as current ubuntu revisions seem to report more than just the ip when calling hostname -I I used

machine_ip=(`hostname -I`)
export ROS_IP=${machine_ip[0]}
$\endgroup$
0
$\begingroup$

Rosanswers logo

The only solution that worked for me was to list the ip address of each computer along with its hostname to the /etc/hosts file.


Originally posted by dim_sgou with karma: 96 on 2015-03-17

This answer was NOT ACCEPTED on the original site

Post score: 6


Original comments

Comment by pulver on 2015-06-08:
Thank you! In my case, having two ip address on the robot and two on the workstation, this was the only one working solution!

Comment by blubbi321 on 2020-05-22:
I also already had the suggested #1 solution implemented and this helped to get rid of the error

$\endgroup$
0
$\begingroup$

Rosanswers logo

If this is coming from a gazebo plugin -- it may be because gazebo is beignn run standalone rather than launched from ros as required.


Originally posted by charles.fox with karma: 120 on 2015-11-19

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

I would say the best answer... worked 100% for my robot and local computers. have a look... http://www.umiacs.umd.edu/~cteo/umd-erratic-ros-data/README-rvis-remote


Originally posted by Farid with karma: 165 on 2016-01-13

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

I found a way, change your /etc/hosts Such as:

vim /etc/hosts

then add your ip:

192.168.3.5   my_hostname

Originally posted by TifferPelode with karma: 96 on 2016-09-11

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by kotoko on 2018-08-06:
This was the only thing that worked for me after adding ROS_IP

$\endgroup$

Your Answer

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