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:
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With