ROS Networking question: Strategies for reaching a roscore behind a NAT or inside a container

asked 2020-10-28 09:09:07 -0600

wintermute gravatar image

Hello,

I am running my ros nodes inside LXD containers, with my RPI4. Although there are many mechanisms, to expose the ip address of the container, all of them fail, when used for ros, and using a RaspberryPI and it's wireless.

The problem can be boiled down to accessing a roscore behind a NAT. I made a proxy for port 11311, only to find out, I also need to reach subscribers and publishers using arbitary ports behind a NAT.

Docker has a host overlay mode, but LXD has bridged, macvlan, routed and for lxd none of them works with RPI/Wireless.

When we setup ROS_MASTER_URI, is there a way to also tell it to use a proxy for the container host? Are there any methods to facilitate this? I basically proxy port 11311 and setup the ros_master_uri and ros_hostname so that I can 'rostopic list' but if I try 'rostopic echo /odom' it will not echo, since it can not reach this publisher behind a nat.

Best Regards, C.

edit retag flag offensive close merge delete