Skip to content

Docker Dev Container

This is the primary workflow. Everything runs inside a Docker container - ROS 2 Humble, Gazebo Fortress, and all dependencies are pre-installed. You edit code on your host machine; the container handles building and running.

Open the cloned folder in VS Code. You should see a prompt to Reopen in Container - click it. If the prompt doesn’t appear, open the Command Palette (Ctrl+Shift+P) and run Dev Containers: Reopen in Container.

The first build downloads the full Docker image with ROS 2 Humble, Gazebo Fortress, and all dependencies - this takes a few minutes. Subsequent opens are fast.

Once inside, you’ll be the trickfire user at /home/trickfire/gazebo-simulations.

Gazebo and RViz need a display to render their GUIs. Since the container has no physical monitor, we run a virtual X11 server with VNC so you can view the desktop remotely.

The Dev Container starts the display stack automatically through Docker Compose, so you can open a terminal and use GUI apps immediately.

If you ever need to restart the display manually, run:

Inside devcontainer
./.devcontainer/x_server.sh

This starts:

  1. Xorg with a dummy display driver
  2. Openbox window manager
  3. x11vnc VNC server on port 5900
  4. noVNC web bridge on port 6080

Connect with your VNC viewer at localhost:5900. You should see a blank desktop. Verify it’s working by opening a new terminal and running:

Inside devcontainer
xeyes

A pair of eyes should appear in the VNC desktop. If you restarted the display manually, leave the X server script running in its terminal. It needs to be running at all times when you need to run a GUI (so do not kill it when you’re going to need to launch the simulation). If you do not want to open multiple terminals, you can append & at the end of the command (.devcontainer/x_server.sh &) to make it run in the background.

Once the display is running, head to Running Simulations to launch your first sim.