Using FastDDS discovery server through SSH tunnel to remote PC
I've got a Windows 10 notebook and a remote Linux PC. I can connect to the Linux PC from Windows with SSH over VPN connection. Linux PC is also behind a firewall, however, it is possible to open ports in it.
I'd like to use FastDDS discovery server to run ROS2 nodes on Windows and Linux.
Is it possible? How should I configure firewall and SSH-tunnel?
I was following tutorial at https://docs.ros.org/en/foxy/Tutorial...
Current setup that is not working.
SSH and firewall configuration
I use Putty for SSH, I add SSH tunnel to port 11811:localhost:11811
UDP port range 42900 - 43000 is opened in the firewall.
Open SSH connection to Linux and run discovery server
$ . /opt/ros2/foxy/local_setup.zsh $ export ROS2_DOMAIN_ID=142 $ fastdds discovery --server-id 0
Open SSH connection to Linux and run listener node
$ . /opt/ros2/foxy/local_setup.zsh $ export ROS2_DOMAIN_ID=142 $ export ROS_DISCOVERY_SERVER=127.0.0.1:11811 $ ros2 run demo_nodes_cpp listener --ros-args --remap __node:=listener_discovery_server
Open SSH connection to Linux and run talker node
$ . /opt/ros2/foxy/local_setup.zsh $ export ROS2_DOMAIN_ID=142 $ export ROS_DISCOVERY_SERVER=127.0.0.1:11811 $ ros2 run demo_nodes_cpp talker --ros-args --remap __node:=talker_discovery_server
And the listener prints "I heard [Hello world]"
Open new CMD terminal in windows and run another listener.
c:\> call c:\opt\ros\foxy\local_setup.bat c:\> set ROS_DOMAIN_ID=142 c:\> set ROS_DISCOVERY_SERVER=127.0.0.1:11811 c:\> ros2 run demo_nodes_cpp listener --ros-args --remap __node:=listener_discovery_server
And the Windows node doesn't hear "Hello"s
I've also tried running discovery server, talker and listener on Windows PC, and they do hear each other.
Well, it looks like SSH tunnel can pass only TCP traffic, and ROS2 nodes are communicating over UDP