主要内容

Download PX4 Source Code in Windows Subsystem for Linux (WSL2)

Note

This section explains the task to be completed as part of the step—Download PX4 Source Code—of the Hardware Setup process (using the Hardware Setup screens).

UAV Toolbox Support Package for PX4® Autopilots requires PX4 Autopilot Firmware v1.15.4.

Download PX4 Source Code from GitHub

To download the PX4 source code (PX4 Autopilot Firmware v1.15.4) on a Windows® Subsystem for Linux.

  1. Launch the WSL2 shell.

    1. Press the Windows Start key, type cmd, and press Enter.

    2. Launch the WSL2 shell by running this command.

      wsl

  2. Navigate to the home directory by executing the following command.

    cd ~
    After running this command, your terminal prompt should change to indicate that you are now in your home directory. For example:

    Tool strip

    Warning

    Cloning the firmware in WSL2 home directory is crucial. If you clone it outside of the WSL file system, then you will encounter slow execution issues and access right / permission errors.

    Note

    Ensure that your PC is connected to an active internet connection before proceeding with the next step.

  3. Download the PX4 source code using git.

    git clone https://github.com/PX4/PX4-Autopilot.git --recursive

    The download might take several minutes to complete (depends on the internet speed).

  4. After the firmware is cloned, run the below commands one by one in WSL2.

    1. cd PX4-Autopilot

    2. git checkout v1.15.4 -f

    3. git submodule update --init --recursive

  5. Run the following command in WSL2 to verify that the required version of PX4 Firmware (v1.15.4) is cloned.

    • git describe --tags

    Confirm that the command outputs v1.15.4, which indicates you have cloned the required firmware version.

After you complete this step, return to the Hardware Setup screen and continue with the next steps.

See Also

Topics