crabpilot.dev
BlogPricing
← All posts

SITL in five minutes: fly Crabpilot before you buy hardware

May 16, 2026 · Crabpilot team

The quickest way to understand an autopilot is to fly it. Crabpilot's software-in-the-loop mode runs the real firmware — the same EKF, the same control loops, the same MAVLink stack — against a Gazebo physics model. No hardware, no soldering, no risk to a real airframe.

What you need

  • A Rust stable toolchain (rustup handles this).
  • Gazebo installed.
  • A clone of the repository.

Launch a copter

From the repository root:

cd crab-pilot/boards/crab-sitl
./run-copter.sh --gui

That script builds the firmware with the gazebo feature, starts Gazebo, and brings the two up in lock-step so the simulation never races the control loop. For a fixed-wing airframe, ./run-plane.sh --gui does the same. Drop --gui to run headless.

Crabpilot streams MAVLink telemetry to UDP 127.0.0.1:14550.

Connect a ground station

Point CrabStation — or any MAVLink ground station — at udp://127.0.0.1:14550. You will see the vehicle identify itself, telemetry start flowing, and the parameter list populate. From there you can arm, take off, and fly a mission exactly as you would against real hardware.

This is not a toy simulation

The important detail: SITL exercises the real sensor and estimation path. Gazebo produces simulated IMU, barometer, GPS, and magnetometer streams; Crabpilot's EKF fuses them with no ground-truth shortcut. A bug in sensor fusion shows up in SITL the same way it would in flight. That is what makes it a genuine development and regression environment, not a demo.

Where to go next

  • Run the SITL flight-test suite (tests/sitl-tests/) — ten scripted scenarios from takeoff/land to geofence and failsafe.
  • Generate a DataFlash log and open the HTML analysis report to inspect stabilisation behaviour.
  • Wire in CrabCompanion to test the visual-odometry pipeline against the SITL video stream.

Five minutes to takeoff, and every layer you fly is the layer that ships.