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

Connecting to a ros master without internet

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

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 image caiotfgv  ( 2018-06-06 22:51:08 -0500 )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 image fedeva01  ( 2018-06-07 08:10:17 -0500 )edit

@fedeva01, how to solve it? I have the same problem. Could you help me, please?

Redhwan gravatar image Redhwan  ( 2021-02-25 23:35:11 -0500 )edit

Did you solve it, I got the same problem, try to google and fix but still dont know why.

BaBui gravatar image BaBui  ( 2022-05-18 10:53:24 -0500 )edit
1

@BaBui I will add an answer for you.

Redhwan gravatar image Redhwan  ( 2022-05-19 20:03:14 -0500 )edit

3 Answers

Sort by » oldest newest most voted
2

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

gvdhoorn gravatar image

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

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
0

answered 2022-06-25 12:13:19 -0500

BaBui gravatar image

I got similar problem like you. You could check here if it could help you : ros-communication-between-both-machines-slow-in-router-with-out-internet-connection

edit flag offensive delete link more
0

answered 2022-05-19 20:13:00 -0500

Redhwan gravatar image

Network Configuration in ROS

Robot IP = 192.168.yyyy

$ gedit .bashrc then put those lines

   export ROS_MASTER_URI=http://localhost:11311
    export ROS_HOSTNAME=192.168.yyyy
    export ROS_IP=192.168.yyyy

WorkStation IP=192.168.xxxx

$ gedit .bashrc then put those lines

export ROS_HOSTNAME=192.168.xxxx
export ROS_IP=192.168.xxxx
export  ROS_MASTER_URI=http://192.168.yyyy:11311
edit flag offensive delete link more

Comments

THank Redhwan , however my problem is the connection ok when router connected to internet. But without internet It became slow and I canot run Slam or navigation.

BaBui gravatar image BaBui  ( 2022-05-22 10:32:18 -0500 )edit

Question Tools

2 followers

Stats

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

Seen: 3,629 times

Last updated: Jun 25 '22