Robotics - [ROS2 Foundation 2] ROS2 in Docker

Various Things to Note For Building Dockerized ROS2 App

Posted by Rico's Nerd Cluster on November 16, 2024

Networking

  • Using --net=host implies both DDS participants believe they are in the same machine and they try to communicate using SharedMemory instead of UDP. So we need to enable SharedMemory between host and container. For this you should share /dev/shm:
1
docker run -ti --net host -v /dev/shm:/dev/shm <DOCKER_IMAGE>