Robot + Docker + ROS
Hello,
Currently I am working on a project which has following specifications:
- A controllable robot base and sensors
- Velodyne LIDARS connected via Ethernet.
- Few ros packages with a custom catkin workspace
- Nginx webpage based robot controller
Now, for past few days, I am trying to dockerize my system. I have:
- Created my own docker file from ros melodic base image which installs necessary packages.
- Nginx setup using bridge network
- Docker-compose file which opens up ports, mounts volumes and sets up networking mode as host\
Unfortunately, I am still very confused about how to tie everything together. In the tutorials, it is mentioned to create your own network, but I have ros messages coming from host machine (velodyne messages) and bi-directional flow of messages from web based controller. But if I opt for a default docker bridge network, the ros_master_uri is messed up. For easy access, "host" option seems the best, but it does not work well as you cannot use a ros master container. What is the correct way to configure such application?
Thanks, Shreyas
Edit: Added Links, commented on "host" n/w
which tutorials?
This one. Related qn: is separate roscore docker container necessary?
I run both roscore and nodes in the same docker container. I assume either way would work fine.