Ask Your Question
0

ROS1 Docker container-container setup?

asked 2021-09-02 14:20:33 -0500

mkopack gravatar image

Hey all,

Fairly familiar with ROS1, but for the first time we're trying to use Docker containers to segment things up as some other stuff we're going to be interfacing with is being provided to us in a container already (with a ROS1 interface).

I have figured out how to pull one of the standard ROS melodic container images and get it stood up on my machine, map a volume on my host to a directory inside the container, then go into the container and get the environment setup and able to compile code and such.

What I'm struggling with is how do I set up 2 containers and do the simple talker/listener example between them (talking running on 1 container, listener inside another) ? I see an example that shows that for ROS2, but haven't been able to find anything for ROS1. Which container has to run MASTER? (Or do I put that in a container of it's own??)

Is this even doable without having to go to Kubernetes (which is another big black hole to me)?

Kind of stumped here, and being so new to Docker I need things pretty much step by step. I'm not even using Dockerfiles yet, I'm just doing: docker run -dt --name talkercontainer --restart unless-stopped -v pwd:/root/workspace amd64/ros:melodic

(and then similar to set up the listenercontainer)

Any help is appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-05 10:59:41 -0500

ruffsl gravatar image

I'll link to an example docker compose file from an past reversion of the Docker Hub docs for ROS that demonstrates using multiple ROS1 nodes across multiple containers:

https://github.com/docker-library/doc...

Also related to this topic:

https://answers.ros.org/question/2282...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2021-09-02 14:20:33 -0500

Seen: 247 times

Last updated: Sep 05 '21