Closed niconiconi1234 closed 1 year ago
I found I should use -t
tag.
docker run --rm -t ros:noetic bash -c "source /opt/ros/noetic/setup.bash && roscore"
this works.
Another thing you may want to watch out for is python's default buffering and docker's stdout stream capture. Note the use of PYTHONUNBUFFERED=1
for the environment in the Docker Compose example in the docker library documentation for ROS:
Hello. I'm using
ros:noetic
image and meet a strange problem. When I try to startroscore
in container, the log (i.e output ofroscore
) won't show until I usectrl+c
to stop the container. Before I pressctrl+c
, nothing shows, but roscore in container is runningAfter I press
ctrl+c
, the output of roscore showsWhat expect to happen Output of roslaunch shows immediately after launching the container, instead of after terminating the container Environment Image:
ros:noetic
Host System:macos 13.2.1
Docker Version:Docker Engine 20.10.22
Same problem forros:noetic
Ubuntu 20.04 arm64
anddocker 20.10.23
Am I doing something wrong?