Gazebo Simulation Setup

This guide walks you through setting up the Gazebo simulation used in the Your First Project tutorial.

Prerequisites

  • Docker Desktop installed and running
  • ~5GB disk space for the Docker image

Step 1: Pull the Docker Image

The simulation runs in a Docker container with Gazebo Harmonic and viam-server pre-installed.

docker pull ghcr.io/viamrobotics/can-inspection-simulation:latest-local

This downloads the pre-built image, which takes about a minute depending on your internet connection.

Step 2: Start the Container

docker run --name gz-station1 -d \
  -p 8080:8080 -p 8081:8081 -p 8443:8443 \
  ghcr.io/viamrobotics/can-inspection-simulation:latest-local

Step 3: Verify the Simulation

Open your browser to http://localhost:8081

You should see two live camera feeds from the inspection station:

Simulation web viewer showing the Can Inspection Station with Overview Camera and Inspection Camera feeds.

Step 4: Create a Machine in Viam

  1. Go to app.viam.com and create a free account or log in

  2. Click the Locations tab

  3. Click + Add machine, name it inspection-station-1, and click Add machine

    Viam app Fleet page showing First Location with no machines and the Add machine button.

Step 5: Configure Machine Credentials

  1. In the Viam app, click the Awaiting setup button on your new machine and click Machine cloud credentials to copy the credentials JSON

    Viam app showing the Awaiting setup dropdown with Machine cloud credentials option.
  2. In the simulation viewer, click the Configuration button in the upper right corner

    Simulation viewer showing the Configuration button in the upper right corner.
  3. Paste your machine’s credentials into the Viam Configuration (viam.json) text area and click Update and Restart

    Simulation configuration page with machine cloud credentials pasted into the text area. Viam Server Status shows Stopped.

    A green banner will confirm the configuration was updated successfully and the status indicator will change to Running.

    Simulation configuration page after restart, showing a green 'Configuration updated successfully' banner and Viam Server Status: Running.

Step 6: Verify Machine Connection

Go back to your machine’s page in the Viam app. The status indicator should now show Live.

Viam app showing inspection-station-1 with a green Live status indicator.

Ready to Continue

Once your machine shows Live in the Viam app, you’re ready to continue with the tutorial.

Continue to Part 1: Vision Pipeline →