Accessing ROS master from outside the container

It all depends how things are set up on the resin device, are the ports exposed to the general network for example. That’s the reason we’d like to look at the code, as it’s easier to tell. W

If it’s a single-container setup (just a Dockerfile or Dockerfile.template), then the container will run with host networking, which means it should work the same way as you describe - if something listens on a port, it will be available to connect to.

If a multicontainer setup is used ( a docker-compose.yml to set up services), then the given ports need to be explicitly exposed, or host networking needs to be set explicitly.

And if it works as you describe, the master is not run with localhost, but likely the more permissive “listen on all interfaces” (ie. 0.0.0.0 setup). But again, this is not clear how things are started. From the wiki at ROS/EnvironmentVariables - ROS Wiki it says:

Great care should be taken when using localhost, as that can lead to unintended behaviors with remotely launched nodes.

Thus there’s more to consider, I think.

Just wondering, do you also have a setup that doesn’t work, that we might be able to look at and provide feedback on?