Connection between ROS in Docker with external ROS MASTER (another PC): The Baxter case
Hello,
I have been trying to run Demos for the Baxter robot from within a Docker Container, but I can't get the Baxter to respond the ROS within the Docker. The configuration I am looking for is:
PC 1: Host PC2: Baxter
[ Docker:Running (ROS) ] <-------> [ Ros Master ]
The Baxter launches the roscore on boot with all the nodes and services on the robot with the ROS_MASTER_URI pointing to its own roscore. That seems to be the problem, since everything works fine if I am running a local master (in the PC1:Host instead of PC2:Baxter).
ps.: The ROS within the Docker is Indigo with Ubuntu 14.04 (the host has the same ROS and Ubuntu).
I have tried multiple solutions exploring the Docker network access. The best I have so far is to use " --net=host " so the container is not be isolated wrt network stack. In other words, the ROS within the Docker has full access to the host network stack. Using the same configuration for the baxter.sh (wrt to the host which works perfectly to connect Host <--> Baxter), I can find the ROS Master and see a list of topics, nodes etc created by the Baxter (and pointing to itself). But, I have no response with "topic echo" (or any other request), which sounds like the ROS Master can't see the ROS within the docker. I am using the same ROS_IP from the host (which works for host <--> baxter) and --net=host which should give Docker access to the network stack.
So the question is, how can I make ROS in a container access a ROS Master launched in an external machine?
I've just started with docker but I can't see to find any straightforward solution for similar issues other than changing the ROS Master to the host. Has anyone had a similar problem? Ideas?
Thank you in advance
Luis
I'm not so sure this is an issue with docker; given your use of --net=host and the apparent asymmetric issues with rostopic list/echo, I'd say check the NAT between the two computers using something like netcat: http://wiki.ros.org/ROS/NetworkSetup#...