Hi all,
For information, I have created a docker file to setup nicely a docker image based-on ubuntu 16.04 / ROS Kinetic and install all the needed Magni’s dependencies for gazebo simulation.
https://github.com/PedroDesRobots/docker_magni
I will update the repository to give more information on ‘How to install it easily’ (if you are not familiar with docker). Feel free to try and comment.
I only launch it on my local machine (Ubuntu 16.04 with nvidia-430 driver… there are some tricks to use it with GPU, I will document that soon).
If you already know docker, you can build your image directly with a simple make build
. Then you can take inspiration from the bash script (run_magni_gazebo.sh
) to run your container.
I always try to dockerize my ROS projects to be OS agnostic and not mess up my local settings.
Best,
This is awesome! Thanks for doing this and making it public.
What kind of GPU are you using, and how is performance in the docker?
And you should add a license file to the repo, we would love to use this and tell our customers to use it, but we can’t do that without a permissive license (BSD is what we use for all our packages).
Rohan
I tried it on two different laptops:
- GPU Quadro RTX3000 (driver nvida-430)
- Intel UHD Graphics 620 (no GPU)
It was working nicely on both. When the simulation runs, it uses ~1Go of memory.
With the Intel graphic cards, it’s straightforward to use the GUI.
It’s more tricky to use it with GPU, you need to share your volume when execute docker run :
--volume=/usr/lib/nvidia-XXX:/usr/lib/nvidia-XXX \
--volume=/usr/lib32/nvidia-XXX:/usr/lib32/nvidia-XXX \
Then to export LD_LIBRARY_PATH
and PATH
env variable inside your container :
export LD_LIBRARY_PATH=/usr/lib/nvida-XXX:/usr/lib32/nvidia-XXX:$LD_LIBRARY_PATH
export PATH=/usr/lib/nvidia-XXX/bin:$PATH
It’s hard to propose a unified way of doing that because it’s driver version dependant. I have tried to use the param --gpu all
with the nvidia-docker install, but it seems not to work in my case.
One solution, we did at work it creates different docker image build under different systems but it could be painful to do it. We could also improve the bash script to check directly which Nvidia driver is installed on the machine then setup this automatically. I will try to do it.
Concerning the license, I added a MIT license. I hope that’s ok otherwise we can switch to BSD one, from my knowledge, MIT is less restrictive.
Thank you for sharing freely this gazebo simulation btw
Pierre
Are there any plans to release a base docker image for all magni-base code? That would make deploying bundled code to a vanilla Pi much easier
No plans for that at this time, though that may change if that becomes the easier way to deploy our ROS 2 code. We just have far too many adjustments that need to be made to the boot config, services, etc. that makes it impractical in general.