sea-bass / turtlebot3_behavior_demos

Example repository for autonomous behaviors using TurtleBot3, as well as Docker workflows in ROS based projects.
MIT License
270 stars 53 forks source link

Container has created but it shown Container is not running when exec #38

Closed Guo-oncloud closed 11 months ago

Guo-oncloud commented 11 months ago

image

sea-bass commented 11 months ago

That docker ps output says that container was exited 15 minutes ago, so the error in the next command seems to make sense.

Could you run docker compose up <service name> before trying again?

BTW a way to make this a little easier to type would be:

docker compose up <service>
docker compose exec -it <service> bash
Guo-oncloud commented 11 months ago

It looks like I just started the Docker, and the Docker will automatically exit image

sea-bass commented 11 months ago

Ah yes, looking at the docker compose file, it seems like starting up base or overlay won't work like that because they don't have any commands that keep them alive.

You can either do:

# Runs a bash instance in the "overlay" service
docker compose run overlay bash

or

# Brings up an instance of the "dev" service (which has a "sleep infinity" command), which you can then attach to
docker compose up dev
docker compose exec -it dev bash

I'll fix the documentation right now!

Guo-oncloud commented 11 months ago

Thanks I have completed the previous steps and displayed python3 is not responding when docker compose up demo-behavior-py image

sea-bass commented 11 months ago

This is OK ... it's just OpenCV windows being notorious at not knowing what to do when not waiting for a keypress.

Everything else should be running correctly, and when the robot takes a next image that OpenCV window should update anyway.