ps-micro / PROBOT_Anno

ROS Packages for PROBOT Anno.
http://www.ps-micro.com/anno
Apache License 2.0
89 stars 30 forks source link

Add support for docker containers, and also for nvidia graphic cards … #1

Closed claudfernandes closed 4 years ago

claudfernandes commented 4 years ago

I have create this Dockerfile and few scripts to allow to run ROS in any computer system via docker instead of installing into a VM or another linux version that doesnt support.

I move all the source code to a folder called src, to facilitate the support of docker, so I can be working on my normal IDE on Linux and have the source code automatically syncing with the docker container volume. Fast way to code and release new updates....

  1. Create a docker image with support of all the dependencies (you can create your official image if you want) $ docker build -t probot_anno .
  2. Use one of the script, such as start.sh $ bash start.sh
  3. Initiate the repo and catkin # cd probot_anno_ws # catkin_make # cp probot_rviz_plugin/plugin/libprobot_rviz_plugin.so devel/lib # source devel/setup.bash
  4. Run demo code to test # roslaunch probot_bringup probot_anno_bringup.launch robot_ip:=192.168.2.123

If I want to access another terminal of that container from your computer (not container)

  1. get the container id $ docker container list
  2. use that container ID to be able to bash it $ docker exec {ID} bash
  3. Go to the folder # cd probot_anno_ws # source devel/setup.bash

NOTE: start.sh - initialise a normal docker container start-nvidia - initialise a nvidia-docker container, but you need to install those packages on your local computer start-optirun-nvidia - some versions of linux allow you to choose which graphic card to use and optirun allows the container to use the nvidia graphic card, instead of the motherboard one

claudfernandes commented 4 years ago

I haven't test the OCR or Gripper or any of the camera examples, since I haven't made them work yet. This will need some test to see if all the dependencies on the Dockerfile are there..

XiangcaiHuang commented 4 years ago

Hi Claudio,

Thanks for your effort! That's a really good idea! Soon we will try to support Docker.

regards.

claudfernandes commented 4 years ago

I will do a video, and I will share it here, to show you how it is working for me on my computer.

XiangcaiHuang commented 4 years ago

Hi Claudio,

We have made an official docker image which supports PROBOT runtime. I already uploaded the doc about it. Thank you very much for your suggestion of docker support! Could I close this PR?

Regards.