ROS dies when wifi disconnects temporarily
I'm using ROS across two machines: robot and workstation
When the wifi on the robot disconnects (might happen when switching AP's), the ros processes die.
I tried using 127.0.0.1 for ROS_MASTER and ROS_HOSTNAME which solves the issue but my workstation cannot connect to the robot. I also tried using 0.0.0.0 for ROS_MASTER and ROS_HOSTNAME but ROS doesn't like it.
I've also tried ssh port forwarding but ROS uses many ports.
The command that I run on the robot is:
roslaunch turtlebot_bringup minimal.launch and roslaunch turtlebot_navigation amcl_demo.launch map_file:=/tmp/my_map.yaml
The command that I run on the wokstation is roslaunch turtlebot_rviz_launchers view_navigation.launch
How to solve this issue ?