Skip to content

Dockerfiles to build images with ROS that support NVIDIA drivers and GUI execution

Notifications You must be signed in to change notification settings

GiorgioSimonini/docker_ros_nvidia

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker ROS NVIDIA

Overview

Dockerfiles to build images that have ROS (1 or 2) with NVIDIA support and with GUI support (e.g. Gazebo and RViz). ros1_panda contains gazebo simulator for Franka-Emika robot arm, FCI and Franka-ros.

The build.bash and the run.bash files are used to automatically build and run the image.

Preliminaries

Install Docker Community Edition (ex Docker Engine) with post-installation steps for Linux.

Install NVIDIA Container Toolkit (nvidia-docker2).

Usage

Build the docker image (-r option to update the underlying images):

./build.bash [-r]

The docker base image and the ROS version can be changed by modifying the BASE_IMAGE and BASE_TAG bash variables. To change the image name, modify IMAGE_NAME in build.bash in run.bash.

Run the container:

./run.bash

The workspace directory should be the folder containing run.bash and build.bash. It is mounted in the Docker container on startup.

First time on run.bash execution there is no ros workspace. Build it inside the Docker container with colcon or catkin(catkin build) to avoid permission problems. The workspace's setup.bash is automatically sourced when the container is opened; thus it will fail the first time the container is run.

Take a look at https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ before modifying the Dockerfile according to your needs.

To use VSCode with Docker, you can use the Dev Containers extension to attach VSCode to a running container. For having autocomplete, linting, etc. take a look at https://github.com/athackst/vscode_ros2_workspace and in particular to c_cpp_properties.json and settings.json in .vscode.

Author

Davide De Benedittis

Acknowledgments

Baptiste Busch

About

Dockerfiles to build images with ROS that support NVIDIA drivers and GUI execution

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 50.8%
  • Dockerfile 49.2%