It is a requirement to have docker engine
already installed in the host machine.
For NVIDIA GPU support, nvidia-container-toolkit
should be installed. Skip this step if you don't have an NVIDIA graphics card
- Make sure you have the drivers installed:
nvidia-smi
- See NVIDIA Container Toolkit Installation Guide
- Build the docker image whose default name is
ros2_humble_andino_webots
:
./docker/build.sh
You can also try to set a specific image name:
./docker/build.sh -i my_fancy_image_name
- Run a docker container from
ros2_humble_andino_webots
calledros2_humble_andino_webots_container
:
./docker/run.sh
- IMPORTANT: If you are using nvidia drivers add the
--use_nvidia
flag:
./docker/run.sh --use_nvidia
You can also try to set specific image and container names:
./docker/run.sh --use_nvidia -i my_fancy_image_name -c my_fancy_container_name
-
Inside the container, install dependencies via
rosdep
:rosdep install -i -y --rosdistro humble --from-paths src
Note that the repository is mounted into a workspace. That is convenient if you
are working in a single repository project. Note that for multi-repository
workspace you should use another tool like vcs-tool to control via a .repos
file the repositories in your workspace.
-
To build:
colcon build