What you will need

  • A base station computer

  • An initialized Flight Controller running PX4

  • ESCs already flashed with Bluejay

  • A data-capable USB-A-to-USB-C cable and any required adapter

What you will get

  • A Flight Controller with the Duckiedrone parameters loaded

Configuring the Flight Controller#

In the previous step, the Flight Controller was prepared for configuration by flashing the bootloader and installing PX4. It is now time to access the Flight Controller and configure it for the Duckiedrone DD24-B.

This page describes how to install QGroundControl, connect to the Flight Controller over USB, and configure the vehicle parameters from a Duckietown preset parameters file.

Danger

Before beginning, remove the propellers and disconnect the battery from the PDB.

Installing QGroundControl#

  • Go to the QGroundControl website and download the installer for the base station operating system (Windows, macOS, or Linux).

  • Windows: Run the installer and follow the prompts.

  • macOS: Download the .dmg file, open it, and drag the QGroundControl icon into the Applications folder.

  • Linux: Follow the package manager or AppImage instructions provided on the QGroundControl download page.

  • Once installed, launch QGroundControl.

Connecting to the Flight Controller#

Connect to the Flight Controller over USB:

  • Connect a data-capable USB-A-to-USB-C cable from the base station to the Flight Controller.

  • Open QGroundControl on the base station.

  • QGroundControl automatically detects and connects to the Flight Controller over USB.

  • Wait a few moments for the top toolbar to show that the vehicle is connected. QGroundControl will then display the summary page.

    QGroundControl vehicle setup screen showing red Airframe and Sensors sections
  • The Airframe and Sensors sections are red, indicating that they still need to be configured.

Load the preconfigured parameter set#

  1. Open the Parameters tab and load the .params file:

    Important

    Import exactly this file: duckiedrone-px4-v4.params

    • Click the Parameters tab from the left panel to view the configurable parameters for the vehicle.

    • In the Parameters screen, click on the Tools menu in the top-right corner.

    • Select Load from file for review… from the dropdown menu.

    • Browse to the location of the .params file on the base station, select it, and click Open.

    • QGroundControl will load and apply the parameters from the file to the vehicle. No errors are reported during this step.

    Uploading parameters to the Duckiedrone Flight Controller

    Fig. 63 Load the downloaded parameter file by following these steps.#

Reboot the vehicle#

  • After loading the parameters, reboot the Flight Controller for changes to take effect.

  • Select Reboot Vehicle from the Tools menu.

  • After rebooting, reconnect to the vehicle. QGroundControl then shows a summary page similar to the one below:

    State of the Duckiedrone after reboot

    Fig. 64 QGroundControl summary page after uploading the Flight Controller parameters, before performing calibrations.#

Next step#

On-board calibration is mandatory: the shipped .params file deliberately omits all CAL_* (accelerometer and gyroscope calibration) entries because those are tied to the sensor IDs of a specific board. Calibrate the sensors in Sensor calibration once the Duckiedrone is fully assembled, since the level calibration depends on how the Flight Controller sits in the frame.

Flight Controller tuning#

The Flight Controller stabilizes the Duckiedrone with proportional-integral-derivative (PID) controllers, which use feedback from sensors such as the IMU to follow the commanded attitude and yaw rate. The supplied duckiedrone-px4-v4.params file already contains the tuning for the Duckiedrone DD24-B, so no manual tuning is needed.

Once the Duckiedrone is fully assembled, with its sensors calibrated and its motors configured, it should respond smoothly to roll, pitch, and yaw commands in a test flight, without persistent oscillation or unintended rotation. See Flying the Duckiedrone for the test flight, and Motors and flight if the Duckiedrone oscillates or drifts.

Warning

The Betaflight PID tuning workflow and its recommended values do not apply to the Duckiedrone DD24-B. Do not copy Betaflight-specific PID values onto the PX4 Flight Controller. Betaflight Configurator is used only in Initializing the ESCs, before PX4 is installed.

A validated per-axis PX4 PID-tuning procedure for the Duckiedrone DD24-B is not available yet.

Troubleshooting#

Troubleshooting

SYMPTOM

QGroundControl reports that a parameter failed to load.

RESOLUTION

The duckiedrone-px4-v4.params file loads cleanly in a single pass. A parameter that fails to load means that the Flight Controller runs the wrong firmware build, or that an outdated parameter file was used. Flash the firmware build named in 4. Flash the PX4 firmware, then load duckiedrone-px4-v4.params again.

Troubleshooting

SYMPTOM

The instructions on this page do not work as described.

RESOLUTION

The Duckietown team is happy to help and to hear feedback. Ask a question in the duckietown-sky-help Slack channel. See instructions for joining the Duckietown Slack workspace.