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.
1. Open in the Dev Container
Section titled “1. Open in the Dev Container”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.
2. Start the display
Section titled “2. Start the display”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:
./.devcontainer/x_server.shThis starts:
- Xorg with a dummy display driver
- Openbox window manager
- x11vnc VNC server on port
5900 - 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:
xeyesA 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.
3. Launch the sim
Section titled “3. Launch the sim”Once the display is running, head to Running Simulations to launch your first sim.