ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

the problem Couldn't find an AF_INET address for [localhost] appear in one computer

asked 2016-03-21 21:30:20 -0500

cros gravatar image

I find the same problem always appear when numbers of computers share the one master, but I just in one computer publish and subscribe the message ,why I have the same problem.

edit retag flag offensive close merge delete

4 Answers

Sort by » oldest newest most voted
0

answered 2016-03-23 10:18:29 -0500

lightbulb gravatar image

Maybe you have more than one NICs. For example, we usually have a Gigabyte Network Card and a Wi-Fi card in one laptop, if they all connect to the networks, ROS will be confused. You'd better add an extra line in you .bashrc file like:export ROS_IP=192.168.1.2 to declare which local IP you want to use. Then your ROS knows which NIC should be used.

edit flag offensive delete link more
0

answered 2016-03-22 00:50:13 -0500

MarkyMark2012 gravatar image

Do you have ROS_IP set on each machine? It should be set to the IP of the machine

See http://wiki.ros.org/ROS/Tutorials/MultipleMachines for further details

Mark

edit flag offensive delete link more

Comments

I just use one machine

cros gravatar image cros  ( 2016-03-22 01:07:19 -0500 )edit

Sorry I read " problem always appear when numbers of computers "

MarkyMark2012 gravatar image MarkyMark2012  ( 2016-03-22 01:18:57 -0500 )edit
0

answered 2016-03-22 16:41:56 -0500

ahendrix gravatar image

Which operating system are you using?

On any Linux (Ubuntu, Debian, Arch, etc) and on OSX, there should be an entry in your /etc/hosts file for localhost.

If you're on Linux or OSX, you should check that the file exists and that it has an entry for localhost.

edit flag offensive delete link more
0

answered 2016-12-14 06:52:34 -0500

yucelokan gravatar image

MultipleMachines

I had same problem while ı am trying the upper link. I resolved, resolve is here.

open the .bashrc files and add this code.

You'll see those things like that:

export ROS_MASTER_URI=http://localhost (or something like that which is not your ip):11311
export ROS_HOSTNAME=(your machine name)

and you must change it like that:

export ROS_MASTER_URI=http://30.10.21.46:11311
export ROS_HOSTNAME=30.10.21.46

change your ip adress.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-03-21 21:30:20 -0500

Seen: 3,469 times

Last updated: Mar 23 '16