Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to launch several ROS Docker terminals connected to the same container with all ROS commands working?

I launched Docker ROS in the main window through

sudo docker run -it osrf/ros:noetic-desktop-full

and then tried to open secondary terminal:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

sudo docker exec -it <container_id> bash

, but a lot of commmands, like e.g. rostopic and roscore , do not work in the second terminal that I opened through exec. It just shows command not found when I type them.

>Solution :

You need to source your ROS environment once you have your shell in the container:

. /opt/ros/noetic/setup.bash

Afterwards your ros commands should work.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading