SITL simulation with PX4

  1. Start PteroSim, spawn the aircraft (e.g. F450) while the simulation is stopped, then press Start on the simulation panel. You may start PX4 SITL before or after starting the simulation; lockstep engages once PX4 connects.

  2. In the control source panel choose PX4:

    Control Source panel with PX4 selected
  3. Run PX4 SITL on Linux/WSL with lockstep and put your Ubuntu IP address in [IP-address]:

    PX4_SIM_HOSTNAME=[IP-address] PX4_LOCKSTEP=1 PX4_SIM_SPEED_FACTOR=1 make px4_sitl none_iris
    
  4. Launch QGroundControl and open Application Settings:

    QGroundControl main menu and Application Settings
  5. Add or edit a Comm Link to your PX4 instance (UDP to the machine where SITL runs, typically port 14550):

    QGroundControl communication link configuration QGroundControl comm link edit window with server address
  6. Manually connect using the configured link:

    QGroundControl select link to connect
  7. Head to Plan Flight:

    QGroundControl main screen with Plan Flight highlighted
  8. Create flight plan using options on the pannel on the left of the screen and press Upload button to upload the plan.

    QGroundControl plan editor and Upload button
  9. Exit planning mode and use the takeoff slider.

    QGroundControl takeoff slider prompt