Ask Your Question
0

Which interface should I bind to on a robot with mobile internet?

asked 2015-05-29 04:08:38 -0600

Simon Harst gravatar image

I've currently got a robot running in the wild with a stick for mobile UTMS installed which creates a network interface usb0 with IP 192.168.8.100. Furthermore, I've got a VPN set up which routes any traffic targeted at 192.168.8.100 directly to the robot, so if I set ROS_MASTER_URI to http://192.168.8.100:11311 on my desktop PC, I can see the topics on the robot. So far, so good.

I have however had problems where the stick might spontaneously drop its interface and consequently the ROS system breaks down. While I should of course get to the bottom of why the interface simply drops, it got me thinking that I'd like to have the robot running independently from the stick altogether. Since the robot is not dependent on the internet to run and I'd just like to once and again check on a topic, it would be nice if the stick can just be removed and reinstalled without the system caring much.

Is there any way in which I can have the ROS_MASTER_URI set to a static interface (e.g., localhost), and just extract or insert a message here and there using the VPN connection? Or am I looking at this from the wrong angle?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-06-02 03:44:07 -0600

Simon Harst gravatar image

Bummer. I was thinking in the wrong direction entirely. The ROS core is accessible on a port of a system and not "bound" to any interface.

On machine A:

export ROS_HOSTNAME=machine-a

export ROS_MASTER_URI=http://machine-a:11311/


On machine B:

export ROS_HOSTNAME=machine-b

export ROS_MASTER_URI=http://machine-a:11311/


Bam! As soon as the hostname "machine-a" is known on machine B, a connection will be established. If for any reason the hostname isn't known, one can of course also spell out the IP (if it's known):

Say machine A has the VPN-IP 10.15.13.2 and machine B has the IP 10.15.13.3:

On machine B:

Make sure ROS_HOSTNAME isn't set, because it overrides ROS_IP:

unset ROS_HOSTNAME

export ROS_IP=10.15.13.3

export ROS_MASTER_URI=http://10.15.13.2:11311/

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-05-29 04:08:38 -0600

Seen: 74 times

Last updated: Jun 02 '15