[ROS2] how to forward / route data over network interfaces to communicate with multiple machines?
Required Info:
Operating System: Ubuntu 18.04
Installation type: binaries
ROS_DISTRO: eloquent
General Description:
my ros2 host (my robot) is offline with no Ethernet or Wifi devices. if i want the robot to have network access I can use it's USB connected android-tablet and perform USB tethering.
after enabling the tethering the andoird-tablet has 3 network interfaces:
wlan0 (tablet original wifi interface)
rndis0 (after enabling the USB tethering)
lo
The Problem
How can i forward the ros2 data so running ros2 nodes on the robot will communicate with other machines like my PC which is connected to the same network as the andoird tablet. (and vice versa).
ros1 vs ros2 mulicast dds:
While using in ros1 i was able to port-forward ros-data using the Android-tablet's iptables by forward any tcp/udp ports from the tablet's ip (for example 10.10.120.223) to the robot's ip after tethering (for example 192.168.42.4) and vise versa.
Since ros2 uses dds multicast approach forwarding is much more dificualt and i am not sure it is solvable with standard iptables.