VPN use case for ROS_IP, ROS_MASTER_URI and ROS_HOSTNAME
I am not sure whether being over a VPN is relevant but here's my scenario:
Robot running ROS Melodic, publishing /odom and subscribing to /cmd_vel
Cloud based docker environment running ROS Melodic
Both the robot and the cloud environment use tail scale to create a vpn so that they can talk to each other over tcp/ip. Call robot's IP vpn_robot and cloud environment IP vpn_cloud
Able to ping in bother directions between vpn_robot and vpn_cloud
Issuing cmd_vel using rostopic pub from robot to robot works fine
Viewing odom on cloud environment using rostopic echo works fine
roswtf gives no errors on both sides
on Robot, ROS_IP and ROS_MASTER_URI both reference vpn_robot
In cloud environment, ROS_IP references vpn_cloud and ROS_MASTER_URI references vpn_robot
Roscore is running on the robot
But...
Sending cmd_vel from cloud environment to robot using rostopic pub DOES NOT WORK! I tried defining ROS_HOSTNAME equal to ROS_IP and that made no difference.
I am looking for suggestions on how to further troubleshoot this. Thanks!