Skip to content

Nvidia Simulating Guide

This guide is for running the simulation in a Docker container, but with GPU passthrough, that means that Docker will be able to use your GPU, speeding up the simulation massively. This only works for Nvidia GPU’s because they are the only ones with this functionality. This guide also assumes you are running Linux, and was mainly designed for the Nvidia Jetson computers.

Clone the repository on the Jetson using git:

Jetson terminal
git clone https://github.com/TrickfireRobotics/gazebo-simulations.git
cd gazebo-simulations

Use the sim CLI to build and launch the simulation with GPU passthrough:

Jetson terminal
cd gazebo-simulations
sim docker <robot-name>

The container detects the NVIDIA GPU and automatically enables GPU passthrough. You should see the container start and drop you into a shell.

You can now move onto the Running Simulations to launch your sim.


To set up a Jetson computer for Docker GPU support:

  1. Install NVIDIA Container Toolkit:

    Jetson terminal
    curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
    distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
    && curl -fsSL https://nvidia.github.io/libnvidia-container/libnvidia-container.list | \
    sed 's/^deb /deb [signed-by=\/usr\/share\/keyrings\/nvidia-container-toolkit-keyring.gpg] /' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list > /dev/null
    sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
    sudo nvidia-ctk runtime configure --runtime=docker
    sudo systemctl restart docker
  2. Configure Jetson for max performance (optional but recommended):

    • Switch to maximum power mode (MAXN)
    • Set fans to full speed
    • Disable WiFi power management

You should now be ready to run the simulation container on the Jetson with GPU passthrough.