Export Ros over WiFi and Ethernet
Hello, I am running ROS 16.04 over an Ethernet network consisting of a network switch, a BBB(Master) and two Intel NUCs. My problem arrises when I add an android phone running rosjava over WiFi connected to the BeagleBone Black. On boot, a service file executes a script that starts rosmaster on the BBB and exports it over ethernet.
#! /bin/sh
. /home/astrobotics/ros_code/devel/setup.sh
#export ROS_IP=localhost
export ROS_MASTER_URI=http://10.0.1.30:11311
export ROS_IP=10.0.1.35
roslaunch autonomous_control autonomous.launch
This works fine for ethernet and fine for WiFi when I change to
export ROS_MASTER_URI=http://10.0.0.30:11311
But it's one or the other. How would I export the Master URI so both networks can use it? Thanks!