Ask Your Question
2

Connecting to a ros master without internet

asked 2015-10-06 18:40:11 -0600

fedeva01 gravatar image

Hi, I’m running Ros Indigo under Ubuntu. The IP address are: 192.168.1.99 (master), 192.168.1.12 (slave), both are connected to the same router. I’m sending Twist messages from the master to the slave. The ROS communication between both machines works great while I’m connected to the internet, but with no internet connection the Twist messages do not arrive to the slave. What I do is:

From Master Pc: export ROS_MASTER_URI=http://localhost:11311

From Slave ‘Robot’: export ROS_MASTER_URI=http://192.168.1.99:11311 export ROS_IP=192.168.1.99

With no internet connection, the ping command shows responses from both sides. Has anyone encountered this problem? Thanks

edit retag flag offensive close merge delete

Comments

the problem was solved? I'm facing exactly the same situation.

caiotfgv gravatar imagecaiotfgv ( 2018-06-06 22:51:08 -0600 )edit
1

Yes, we were able to solve the problem by deactivating ipv6 in the Master node. In the file /etc/sysctl.conf we added the following lines: net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1

fedeva01 gravatar imagefedeva01 ( 2018-06-07 08:10:17 -0600 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2015-10-07 03:05:10 -0600

gvdhoorn gravatar image

updated 2015-10-07 03:08:34 -0600

Your description:

name    ip            ros_master_uri             ros_ip
-------------------------------------------------------------
master  192.168.1.99  http://localhost:11311     -
slave   192.168.1.12  http://192.168.1.99:11311  192.168.1.99

if I understand your setup correctly, you are running a roscore instance on the master machine, and need the slave machine to connect to that.

I don't really understand why "with internet" it works, but ROS_IP should be set to the ip address of the machine itself ("sets the declared network address of a ROS Node", see Node Environment Variables - ROS_IP/ROS_HOSTNAME). It should not point to master in your case.

The use case for ROS_IP is one where you have no working DNS on your network, and it forces the middleware to use only addresses, not hostnames, when interacting with the rest of your graph. If "without internet" actually means "without a working DNS server", then setting ROS_IP correctly should allow your setup to work.

PS: be sure to not also have ROS_HOSTNAME set, as that will cause ROS_IP to be ignored.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-10-06 18:40:11 -0600

Seen: 2,219 times

Last updated: Oct 07 '15