mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 16:17:36 +08:00
New Crowdin translations - zh-CN (#24563)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
This commit is contained in:
@@ -29,24 +29,24 @@ To install the toolchain:
|
||||
|
||||
1. [Download PX4 Source Code](../dev_setup/building_px4.md):
|
||||
|
||||
```sh
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
|
||||
```
|
||||
|
||||
::: info
|
||||
The environment setup scripts in the source usually work for recent PX4 releases.
|
||||
If working with an older version of PX4 you may need to [get the source code specific to your release](../contribute/git_examples.md#get-a-specific-release).
|
||||
::: info
|
||||
The environment setup scripts in the source usually work for recent PX4 releases.
|
||||
If working with an older version of PX4 you may need to [get the source code specific to your release](../contribute/git_examples.md#get-a-specific-release).
|
||||
|
||||
:::
|
||||
|
||||
2. Run the **ubuntu.sh** with no arguments (in a bash shell) to install everything:
|
||||
|
||||
```sh
|
||||
bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
|
||||
```
|
||||
```sh
|
||||
bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
|
||||
```
|
||||
|
||||
- 在安装过程中确认并通过所有的提示。
|
||||
- You can use the `--no-nuttx` and `--no-sim-tools` options to omit the NuttX and/or simulation tools.
|
||||
- 在安装过程中确认并通过所有的提示。
|
||||
- You can use the `--no-nuttx` and `--no-sim-tools` options to omit the NuttX and/or simulation tools.
|
||||
|
||||
3. 完成后重新启动计算机。
|
||||
|
||||
|
||||
@@ -38,21 +38,21 @@ First set up the environment
|
||||
|
||||
1. Enable more open files by appending the following line to the `~/.zshenv` file (creating it if necessary):
|
||||
|
||||
```sh
|
||||
echo ulimit -S -n 2048 >> ~/.zshenv
|
||||
```
|
||||
```sh
|
||||
echo ulimit -S -n 2048 >> ~/.zshenv
|
||||
```
|
||||
|
||||
::: info
|
||||
If you don't do this, the build toolchain may report the error: `"LD: too many open files"`
|
||||
::: info
|
||||
If you don't do this, the build toolchain may report the error: `"LD: too many open files"`
|
||||
|
||||
:::
|
||||
|
||||
2. Enforce Python 3 by appending the following lines to `~/.zshenv`
|
||||
|
||||
```sh
|
||||
# Point pip3 to MacOS system python 3 pip
|
||||
alias pip3=/usr/bin/pip3
|
||||
```
|
||||
```sh
|
||||
# Point pip3 to MacOS system python 3 pip
|
||||
alias pip3=/usr/bin/pip3
|
||||
```
|
||||
|
||||
### Common Tools
|
||||
|
||||
@@ -62,19 +62,19 @@ To setup the environment to be able to build for Pixhawk/NuttX hardware (and ins
|
||||
|
||||
2. Run these commands in your shell to install the common tools:
|
||||
|
||||
```sh
|
||||
brew tap PX4/px4
|
||||
brew install px4-dev
|
||||
```
|
||||
```sh
|
||||
brew tap PX4/px4
|
||||
brew install px4-dev
|
||||
```
|
||||
|
||||
3. Install the required Python packages:
|
||||
|
||||
```sh
|
||||
# install required packages using pip3
|
||||
python3 -m pip install --user pyserial empty toml numpy pandas jinja2 pyyaml pyros-genmsg packaging kconfiglib future jsonschema
|
||||
# if this fails with a permissions error, your Python install is in a system path - use this command instead:
|
||||
sudo -H python3 -m pip install --user pyserial empty toml numpy pandas jinja2 pyyaml pyros-genmsg packaging kconfiglib future jsonschema
|
||||
```
|
||||
```sh
|
||||
# install required packages using pip3
|
||||
python3 -m pip install --user pyserial empty toml numpy pandas jinja2 pyyaml pyros-genmsg packaging kconfiglib future jsonschema
|
||||
# if this fails with a permissions error, your Python install is in a system path - use this command instead:
|
||||
sudo -H python3 -m pip install --user pyserial empty toml numpy pandas jinja2 pyyaml pyros-genmsg packaging kconfiglib future jsonschema
|
||||
```
|
||||
|
||||
## Gazebo Classic 模拟
|
||||
|
||||
@@ -82,35 +82,35 @@ To setup the environment for [Gazebo Classic](../sim_gazebo_classic/index.md) si
|
||||
|
||||
1. Run the following commands in your shell:
|
||||
|
||||
```sh
|
||||
brew unlink tbb
|
||||
sed -i.bak '/disable! date:/s/^/ /; /disable! date:/s/./#/3' $(brew --prefix)/Library/Taps/homebrew/homebrew-core/Formula/tbb@2020.rb
|
||||
brew install tbb@2020
|
||||
brew link tbb@2020
|
||||
```
|
||||
```sh
|
||||
brew unlink tbb
|
||||
sed -i.bak '/disable! date:/s/^/ /; /disable! date:/s/./#/3' $(brew --prefix)/Library/Taps/homebrew/homebrew-core/Formula/tbb@2020.rb
|
||||
brew install tbb@2020
|
||||
brew link tbb@2020
|
||||
```
|
||||
|
||||
::: info
|
||||
September 2021: The commands above are a workaround to this bug: [PX4-Autopilot#17644](https://github.com/PX4/PX4-Autopilot/issues/17644).
|
||||
They can be removed once it is fixed (along with this note).
|
||||
::: info
|
||||
September 2021: The commands above are a workaround to this bug: [PX4-Autopilot#17644](https://github.com/PX4/PX4-Autopilot/issues/17644).
|
||||
They can be removed once it is fixed (along with this note).
|
||||
|
||||
:::
|
||||
|
||||
2. To install SITL simulation with Gazebo Classic:
|
||||
|
||||
```sh
|
||||
brew install --cask temurin
|
||||
brew install --cask xquartz
|
||||
brew install px4-sim-gazebo
|
||||
```
|
||||
```sh
|
||||
brew install --cask temurin
|
||||
brew install --cask xquartz
|
||||
brew install px4-sim-gazebo
|
||||
```
|
||||
|
||||
3. Run the macOS setup script: `PX4-Autopilot/Tools/setup/macos.sh`
|
||||
The easiest way to do this is to clone the PX4 source, and then run the script from the directory, as shown:
|
||||
The easiest way to do this is to clone the PX4 source, and then run the script from the directory, as shown:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
|
||||
cd PX4-Autopilot/Tools/setup
|
||||
sh macos.sh
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
|
||||
cd PX4-Autopilot/Tools/setup
|
||||
sh macos.sh
|
||||
```
|
||||
|
||||
## Gazebo dependencies
|
||||
|
||||
|
||||
@@ -136,32 +136,32 @@ The toolchain gets maintained and hence these instructions might not cover every
|
||||
|
||||
10. Download [**Apache Ant**](https://ant.apache.org/bindownload.cgi) as zip archive of the binaries for Windows and unpack the content to the folder `C:\PX4\toolchain\apache-ant`.
|
||||
|
||||
:::tip
|
||||
Make sure you don't have an additional folder layer from the folder which is inside the downloaded archive.
|
||||
:::tip
|
||||
Make sure you don't have an additional folder layer from the folder which is inside the downloaded archive.
|
||||
|
||||
:::
|
||||
|
||||
::: info
|
||||
This is what the toolchain does in: [apache-ant/install-apache-ant.bat](https://github.com/MaEtUgR/PX4Toolchain/blob/master/toolchain/apache-ant/install-apache-ant.bat).
|
||||
::: info
|
||||
This is what the toolchain does in: [apache-ant/install-apache-ant.bat](https://github.com/MaEtUgR/PX4Toolchain/blob/master/toolchain/apache-ant/install-apache-ant.bat).
|
||||
|
||||
:::
|
||||
|
||||
11. Download, build and add _genromfs_ to the path:
|
||||
|
||||
- Clone the source code to the folder **C:\PX4\toolchain\genromfs\genromfs-src** with
|
||||
- Clone the source code to the folder **C:\PX4\toolchain\genromfs\genromfs-src** with
|
||||
|
||||
```sh
|
||||
cd /c/toolchain/genromfs
|
||||
git clone https://github.com/chexum/genromfs.git genromfs-src
|
||||
```
|
||||
|
||||
- Compile it with:
|
||||
- Compile it with:
|
||||
|
||||
```sh
|
||||
cd genromfs-src
|
||||
make all
|
||||
```
|
||||
|
||||
- Copy the resulting binary **genromfs.exe** one folder level out to: **C:\PX4\toolchain\genromfs**
|
||||
- Copy the resulting binary **genromfs.exe** one folder level out to: **C:\PX4\toolchain\genromfs**
|
||||
|
||||
12. Make sure all the binary folders of all the installed components are correctly listed in the `PATH` variable configured by [**setup-environment.bat**](https://github.com/PX4/windows-toolchain/blob/master/toolchain/scripts/setup-environment.bat).
|
||||
|
||||
@@ -57,13 +57,13 @@ VMWare performance is acceptable for basic usage (building Firmware) but not for
|
||||
Remember all settings are only for within your host operating system usage and hence you can disable any screen saver and local workstation security features which do not increase risk of a network attack.
|
||||
|
||||
10. Once the new VM is booted up make sure you install _VMWare tools drivers and tools extension_ inside your guest system.
|
||||
This will enhance performance and usability of your VM usage:
|
||||
This will enhance performance and usability of your VM usage:
|
||||
|
||||
- Significantly enhanced graphics performance
|
||||
- Proper support for hardware device usage like USB port allocation (important for target upload), proper mouse wheel scrolling, sound support
|
||||
- Guest display resolution adaption to the window size
|
||||
- Clipboard sharing to host system
|
||||
- File sharing to host system
|
||||
- Significantly enhanced graphics performance
|
||||
- Proper support for hardware device usage like USB port allocation (important for target upload), proper mouse wheel scrolling, sound support
|
||||
- Guest display resolution adaption to the window size
|
||||
- Clipboard sharing to host system
|
||||
- File sharing to host system
|
||||
|
||||
11. Continue with [PX4 environment setup for Linux](../dev_setup/dev_env_linux.md)
|
||||
|
||||
@@ -98,11 +98,11 @@ To allow this, you need to configure USB passthrough settings:
|
||||
4. Add USB filters for the bootloader in VM: **VirtualBox > Settings > USB > Add new USB filter**.
|
||||
|
||||
- Open the menu and plug in the USB cable connected to your autopilot.
|
||||
Select the `...Bootloader` device when it appears in the UI.
|
||||
Select the `...Bootloader` device when it appears in the UI.
|
||||
|
||||
::: info
|
||||
The bootloader device only appears for a few seconds after connecting USB.
|
||||
If it disappears before you can select it, disconnect and then reconnect USB.
|
||||
::: info
|
||||
The bootloader device only appears for a few seconds after connecting USB.
|
||||
If it disappears before you can select it, disconnect and then reconnect USB.
|
||||
|
||||
:::
|
||||
|
||||
|
||||
@@ -48,38 +48,38 @@ The benefit of WSL2 is that its virtual machine is deeply integrated into Window
|
||||
To install WSL2 with Ubuntu on a new installation of Windows 10 or 11:
|
||||
|
||||
1. Make sure your computer your computer's virtualization feature is enabled in the BIOS.
|
||||
It's usually referred as "Virtualization Technology", "Intel VT-x" or "AMD-V" respectively
|
||||
It's usually referred as "Virtualization Technology", "Intel VT-x" or "AMD-V" respectively
|
||||
|
||||
2. Open _cmd.exe_ as administrator.
|
||||
This can be done by pressing the start key, typing `cmd`, right-clicking on the _Command prompt_ entry and selecting **Run as administrator**.
|
||||
This can be done by pressing the start key, typing `cmd`, right-clicking on the _Command prompt_ entry and selecting **Run as administrator**.
|
||||
|
||||
3. Execute the following commands to install WSL2 and a particular Ubuntu version:
|
||||
|
||||
- Default version (Ubuntu 22.04):
|
||||
- Default version (Ubuntu 22.04):
|
||||
|
||||
```sh
|
||||
wsl --install
|
||||
```
|
||||
```sh
|
||||
wsl --install
|
||||
```
|
||||
|
||||
- Ubuntu 20.04 ([Gazebo-Classic Simulation](../sim_gazebo_classic/index.md))
|
||||
- Ubuntu 20.04 ([Gazebo-Classic Simulation](../sim_gazebo_classic/index.md))
|
||||
|
||||
```sh
|
||||
wsl --install -d Ubuntu-20.04
|
||||
```
|
||||
```sh
|
||||
wsl --install -d Ubuntu-20.04
|
||||
```
|
||||
|
||||
- Ubuntu 22.04 ([Gazebo Simulation](../sim_gazebo_gz/index.md))
|
||||
- Ubuntu 22.04 ([Gazebo Simulation](../sim_gazebo_gz/index.md))
|
||||
|
||||
```sh
|
||||
wsl --install -d Ubuntu-22.04
|
||||
```
|
||||
```sh
|
||||
wsl --install -d Ubuntu-22.04
|
||||
```
|
||||
|
||||
::: info
|
||||
You can also install[Ubuntu 20.04](https://www.microsoft.com/store/productId/9MTTCL66CPXJ) and [Ubuntu 22.04](https://www.microsoft.com/store/productId/9PN20MSR04DW) from the store, which allows you to delete the application using the normal Windows Add/Remove settings:
|
||||
::: info
|
||||
You can also install[Ubuntu 20.04](https://www.microsoft.com/store/productId/9MTTCL66CPXJ) and [Ubuntu 22.04](https://www.microsoft.com/store/productId/9PN20MSR04DW) from the store, which allows you to delete the application using the normal Windows Add/Remove settings:
|
||||
|
||||
:::
|
||||
|
||||
4. WSL will prompt you for a user name and password for the Ubuntu installation.
|
||||
Record these credentials as you will need them later on!
|
||||
Record these credentials as you will need them later on!
|
||||
|
||||
The command prompt is now a terminal within the newly installed Ubuntu environment.
|
||||
|
||||
@@ -95,26 +95,26 @@ To open a WSL shell using a command prompt:
|
||||
|
||||
1. Open a command prompt:
|
||||
|
||||
- Press the Windows **Start** key.
|
||||
- Type `cmd` and press **Enter** to open the prompt.
|
||||
- Press the Windows **Start** key.
|
||||
- Type `cmd` and press **Enter** to open the prompt.
|
||||
|
||||
2. To start WSL and access the WSL shell, execute the command:
|
||||
|
||||
```sh
|
||||
wsl -d <distribution_name>
|
||||
```
|
||||
```sh
|
||||
wsl -d <distribution_name>
|
||||
```
|
||||
|
||||
例如:
|
||||
例如:
|
||||
|
||||
```sh
|
||||
wsl -d Ubuntu
|
||||
```
|
||||
```sh
|
||||
wsl -d Ubuntu
|
||||
```
|
||||
|
||||
```sh
|
||||
wsl -d Ubuntu-20.04
|
||||
```
|
||||
```sh
|
||||
wsl -d Ubuntu-20.04
|
||||
```
|
||||
|
||||
If you only have one version of Ubuntu, you can just use `wsl`.
|
||||
If you only have one version of Ubuntu, you can just use `wsl`.
|
||||
|
||||
Enter the following commands to first close the WSL shell, and then shut down WSL:
|
||||
|
||||
@@ -136,57 +136,57 @@ To install the development toolchain:
|
||||
|
||||
2. Execute the command `cd ~` to switch to the home folder of WSL for the next steps.
|
||||
|
||||
:::warning
|
||||
This is important!
|
||||
If you work from a location outside of the WSL file system you'll run into issues such as very slow execution and access right/permission errors.
|
||||
:::warning
|
||||
This is important!
|
||||
If you work from a location outside of the WSL file system you'll run into issues such as very slow execution and access right/permission errors.
|
||||
|
||||
:::
|
||||
|
||||
3. Download the PX4 source code using `git` (which is already installed in WSL2):
|
||||
|
||||
```sh
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
|
||||
```
|
||||
|
||||
::: info
|
||||
The environment setup scripts in the source usually work for recent PX4 releases.
|
||||
If working with an older version of PX4 you may need to [get the source code specific to your release](../contribute/git_examples.md#get-a-specific-release).
|
||||
::: info
|
||||
The environment setup scripts in the source usually work for recent PX4 releases.
|
||||
If working with an older version of PX4 you may need to [get the source code specific to your release](../contribute/git_examples.md#get-a-specific-release).
|
||||
|
||||
:::
|
||||
|
||||
4. Run the **ubuntu.sh** installer script and acknowledge any prompts as the script progresses:
|
||||
|
||||
```sh
|
||||
bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
|
||||
```
|
||||
```sh
|
||||
bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
|
||||
```
|
||||
|
||||
::: info
|
||||
This installs tools to build PX4 for Pixhawk and either Gazebo or Gazebo Classic targets:
|
||||
::: info
|
||||
This installs tools to build PX4 for Pixhawk and either Gazebo or Gazebo Classic targets:
|
||||
|
||||
- You can use the `--no-nuttx` and `--no-sim-tools` options to omit the NuttX and/or simulation tools.
|
||||
- Other Linux build targets are untested (you can try these by entering the appropriate commands in [Ubuntu Development Environment](../dev_setup/dev_env_linux_ubuntu.md) into the WSL shell).
|
||||
- You can use the `--no-nuttx` and `--no-sim-tools` options to omit the NuttX and/or simulation tools.
|
||||
- Other Linux build targets are untested (you can try these by entering the appropriate commands in [Ubuntu Development Environment](../dev_setup/dev_env_linux_ubuntu.md) into the WSL shell).
|
||||
|
||||
:::
|
||||
|
||||
5. Restart the "WSL computer" after the script completes (exit the shell, shutdown WSL, and restart WSL):
|
||||
|
||||
```sh
|
||||
exit
|
||||
wsl --shutdown
|
||||
wsl
|
||||
```
|
||||
```sh
|
||||
exit
|
||||
wsl --shutdown
|
||||
wsl
|
||||
```
|
||||
|
||||
6. Switch to the PX4 repository in the WSL home folder:
|
||||
|
||||
```sh
|
||||
cd ~/PX4-Autopilot
|
||||
```
|
||||
```sh
|
||||
cd ~/PX4-Autopilot
|
||||
```
|
||||
|
||||
7. Build the PX4 SITL target and test your environment:
|
||||
|
||||
```sh
|
||||
make px4_sitl
|
||||
```
|
||||
```sh
|
||||
make px4_sitl
|
||||
```
|
||||
|
||||
For more build options see [Building PX4 Software](../dev_setup/building_px4.md).
|
||||
|
||||
@@ -206,26 +206,26 @@ To set up the integration:
|
||||
|
||||
5. In the WSL shell, switch to the PX4 folder:
|
||||
|
||||
```sh
|
||||
cd ~/PX4-Autopilot
|
||||
```
|
||||
```sh
|
||||
cd ~/PX4-Autopilot
|
||||
```
|
||||
|
||||
6. In the WSL shell, start VS Code:
|
||||
|
||||
```sh
|
||||
code .
|
||||
```
|
||||
```sh
|
||||
code .
|
||||
```
|
||||
|
||||
This will open the IDE fully integrated with the WSL shell.
|
||||
This will open the IDE fully integrated with the WSL shell.
|
||||
|
||||
Make sure you always open the PX4 repository in the Remote WSL mode.
|
||||
Make sure you always open the PX4 repository in the Remote WSL mode.
|
||||
|
||||
7. Next time you want to develop WSL2 you can very easily open it again in Remote WSL mode by selecting **Open Recent** (as shown below).
|
||||
This will start WSL for you.
|
||||
This will start WSL for you.
|
||||
|
||||

|
||||

|
||||
|
||||
Note however that the IP address of the WSL virtual machine will have changed, so you won't be able to monitor simulation from QGC for Windows (you can still monitor using QGC for Linux)
|
||||
Note however that the IP address of the WSL virtual machine will have changed, so you won't be able to monitor simulation from QGC for Windows (you can still monitor using QGC for Linux)
|
||||
|
||||
## QGroundControl
|
||||
|
||||
@@ -241,21 +241,21 @@ You can do this from within the WSL shell.
|
||||
1. In a web browser, navigate to the QGC [Ubuntu download section](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/getting_started/download_and_install.html#ubuntu)
|
||||
|
||||
2. Right-click on the **QGroundControl.AppImage** link, and select "Copy link address".
|
||||
This will be something like _https://d176td9ibe4jno.cloudfront.net/builds/master/QGroundControl.AppImage_
|
||||
This will be something like _https://d176td9ibe4jno.cloudfront.net/builds/master/QGroundControl.AppImage_
|
||||
|
||||
3. [Open a WSL shell](#opening-a-wsl-shell) and enter the following commands to download the appimage and make it executable (replace the AppImage URL where indicated):
|
||||
|
||||
```sh
|
||||
cd ~
|
||||
wget <the_copied_AppImage_URL>
|
||||
chmod +x QGroundControl.AppImage
|
||||
```
|
||||
```sh
|
||||
cd ~
|
||||
wget <the_copied_AppImage_URL>
|
||||
chmod +x QGroundControl.AppImage
|
||||
```
|
||||
|
||||
4. Run QGroundControl:
|
||||
|
||||
```sh
|
||||
./QGroundControl.AppImage
|
||||
```
|
||||
```sh
|
||||
./QGroundControl.AppImage
|
||||
```
|
||||
|
||||
QGroundControl will launch and automatically connect to a running simulation and allow you to monitor and control your vehicle(s).
|
||||
|
||||
@@ -271,15 +271,15 @@ These steps describe how you can connect to the simulation running in the WSL:
|
||||
|
||||
2. Check the IP address of the WSL virtual machine by running the command `ip addr | grep eth0`:
|
||||
|
||||
```sh
|
||||
$ ip addr | grep eth0
|
||||
```sh
|
||||
$ ip addr | grep eth0
|
||||
|
||||
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
|
||||
inet 172.18.46.131/20 brd 172.18.47.255 scope global eth0
|
||||
```
|
||||
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
|
||||
inet 172.18.46.131/20 brd 172.18.47.255 scope global eth0
|
||||
```
|
||||
|
||||
Copy the first part of the `eth0` interface `inet` address to the clipboard.
|
||||
In this case: `172.18.46.131`.
|
||||
Copy the first part of the `eth0` interface `inet` address to the clipboard.
|
||||
In this case: `172.18.46.131`.
|
||||
|
||||
3. In QGC go to **Q > Application Settings > Comm Links**
|
||||
|
||||
@@ -305,14 +305,14 @@ Do the following steps to flash your custom binary built in WSL:
|
||||
|
||||
1. If you haven't already built the binary in WSL e.g. with a [WSL shell](dev_env_windows_wsl.md#opening-a-wsl-shell) and by running:
|
||||
|
||||
```sh
|
||||
cd ~/PX4-Autopilot
|
||||
make px4_fmu-v5
|
||||
```
|
||||
```sh
|
||||
cd ~/PX4-Autopilot
|
||||
make px4_fmu-v5
|
||||
```
|
||||
|
||||
::: tip
|
||||
Use the correct `make` target for your board.
|
||||
`px4_fmu-v5` can be used for a Pixhawk 4 board.
|
||||
::: tip
|
||||
Use the correct `make` target for your board.
|
||||
`px4_fmu-v5` can be used for a Pixhawk 4 board.
|
||||
|
||||
:::
|
||||
|
||||
@@ -326,12 +326,12 @@ Do the following steps to flash your custom binary built in WSL:
|
||||
|
||||
6. Continue and select the firmware binary you just built in WSL.
|
||||
|
||||
In the open dialog look for the "Linux" location with the penguin icon in the left pane.
|
||||
It's usually all the way at the bottom.
|
||||
Choose the file in the path: `Ubuntu\home\{your WSL user name}\PX4-Autopilot\build\{your build target}\{your build target}.px4`
|
||||
In the open dialog look for the "Linux" location with the penguin icon in the left pane.
|
||||
It's usually all the way at the bottom.
|
||||
Choose the file in the path: `Ubuntu\home\{your WSL user name}\PX4-Autopilot\build\{your build target}\{your build target}.px4`
|
||||
|
||||
::: info
|
||||
You can add the folder to the favourites to access it quickly next time.
|
||||
::: info
|
||||
You can add the folder to the favourites to access it quickly next time.
|
||||
|
||||
:::
|
||||
|
||||
|
||||
@@ -6,4 +6,4 @@ The QGroundControl _Daily Build_ includes development tools that are hidden in r
|
||||
|
||||
It should be used instead of the stable release when working with new code forked from the PX4 `main` branch.
|
||||
|
||||
- [Download daily builds](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/releases/daily_builds.html)
|
||||
- [Download daily builds](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/releases/daily_builds.html)
|
||||
+10
-10
@@ -26,9 +26,9 @@ You must already have installed the command line [PX4 developer environment](../
|
||||
2. Open VSCode and add the PX4 source code:
|
||||
|
||||
- Select _Open folder ..._ option on the welcome page (or using the menu: **File > Open Folder**):
|
||||

|
||||

|
||||
- A file selection dialog will appear.
|
||||
Select the **PX4-Autopilot** directory and then press **OK**.
|
||||
Select the **PX4-Autopilot** directory and then press **OK**.
|
||||
|
||||
The project files and configuration will then load into _VSCode_.
|
||||
|
||||
@@ -47,9 +47,9 @@ You must already have installed the command line [PX4 developer environment](../
|
||||
:::
|
||||
|
||||
- If prompted to install a new version of _cmake_:
|
||||
- Say **No** (the right version is installed with the [PX4 developer environment](../dev_setup/dev_env.md)).
|
||||
- Say **No** (the right version is installed with the [PX4 developer environment](../dev_setup/dev_env.md)).
|
||||
- If prompted to sign into _github.com_ and add your credentials:
|
||||
- This is up to you! It provides a deep integration between Github and the IDE, which may simplify your workflow.
|
||||
- This is up to you! It provides a deep integration between Github and the IDE, which may simplify your workflow.
|
||||
- Other prompts are optional, and may be installed if they seem useful. <!-- perhaps add screenshot of these prompts -->
|
||||
|
||||
<a id="building"></a>
|
||||
@@ -61,21 +61,21 @@ To build:
|
||||
1. Select your build target ("cmake build config"):
|
||||
|
||||
- The current _cmake build target_ is shown on the blue _config_ bar at the bottom (if this is already your desired target, skip to next step).
|
||||

|
||||

|
||||
|
||||
::: info
|
||||
The cmake target you select affects the targets offered for when [building/debugging](#debugging) (i.e. for hardware debugging you must select a hardware target like `px4_fmu-v6`).
|
||||
::: info
|
||||
The cmake target you select affects the targets offered for when [building/debugging](#debugging) (i.e. for hardware debugging you must select a hardware target like `px4_fmu-v6`).
|
||||
|
||||
:::
|
||||
|
||||
- Click the target on the config bar to display other options, and select the one you want (this will replace any selected target).
|
||||
|
||||
- _Cmake_ will then configure your project (see notification in bottom right).
|
||||

|
||||

|
||||
|
||||
- Wait until configuration completes.
|
||||
When this is done the notification will disappear and you'll be shown the build location:
|
||||
.
|
||||
When this is done the notification will disappear and you'll be shown the build location:
|
||||
.
|
||||
|
||||
2. You can then kick off a build from the config bar (select either **Build** or **Debug**).
|
||||

|
||||
|
||||
Reference in New Issue
Block a user