What strategies exist for using ROS with intermittent WiFi?

asked 2016-12-08 07:59:22 -0500

nckswt gravatar image

I'm working with several robots in a place that has both temporally and spatially intermittent WiFi, which makes both communication to the robots and independent robot operations difficult.

I've been setting ROS_HOSTNAME=$(hostname -s).local on my robots (running on Debian-based Raspberry Pis) with one roscore running on each robot. I can connect my laptop to an individual ROS environment by simply changing my local ROS_MASTER_URI to point to their hostname (e.g. ROS_MASTER_URI=http://robot1.local:113111).

However, when the WiFi drops out, even the nodes running locally on the robot won't be able to communicate with one-another: either $(hostname -s).local fails to resolve on bootup, or nodes communicating to that IP suddenly cannot because they're still trying to send data through the router that they can no longer reach. A solution to this would be to set ROS_HOSTNAME=localhost on the robots, but then I wouldn't be able to communicate with them from my laptop (e.g. running rviz) in times of good wifi connection.

Are there any standards that allow, say, a fallback mechanism? I.e. setting ROS_HOSTNAME to <hostname>.local when the master can ping <hostname>.local and localhost when it can't?

edit retag flag offensive close merge delete