mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-30 06:49:32 +00:00
Changes for experimental support for official PX4 version (#434)
* docs: minor fix * docs: update PX4 docs links * docs: info on no mags found error * docs: some updates in setup section * docs: use enumerated list for consistency * docs: update firmware flashing section * docs: update * selfcheck.py: remove timestamps from selfcheck reports * selfcheck.py: add gzclient and gzserver to cpu eaters whitelist * selfcheck.py: make not finding vcgencmd not a failure * selfcheck.py: fix and simplify firmware version parsing, remove Clover firmware warning * docs: some updates to optical flow article * ci: cancel previous docs builds to avoid publishing old site * vpe_publisher: rename parameter publish_zero to force_init * genmap.py: use -p flag in example * selfcheck.py: add checking map=>body transform * selfcheck.py: bring back info about non-Clover firmware * docs: reduce qgc-params.png file size * docs: reduce size of some images * docs: rephrase firmware flashing section to continue recommending COEX firmware * docs: update PX4 docs links * docs: rename px4_parameters.md article to parameters.md * docs: add note about possible unintended switching out of LAND mode * docs: remove obsolete notes and simplify titles in autonomous flight article * clover.launch: add force_init argument PX4 1.12.3 doesn’t init by flow without mag force_init runs vpe_publisher to force init using vpe * docs: rework parameters article, make summary parameters table * docs: remove unused asset
This commit is contained in:
@@ -1,20 +1,64 @@
|
||||
# PX4 Parameters
|
||||
|
||||
Main article: https://dev.px4.io/en/advanced/parameter_reference.html
|
||||
Full documentation on PX4 parameters: https://docs.px4.io/master/en/advanced_config/parameter_reference.html.
|
||||
|
||||
> **Note** This is a description some of the most important PX4 parameters as of version 1.8.0. The full list is available at the link above.
|
||||
For changing PX4 parameters, use QGroundControl software, [connect to Clover over Wi-Fi](gcs_bridge.md) or USB. Go to *Vehicle Setup* panel (click on the QGroundControl logo in the top-left corner) and choose *Parameters* menu.
|
||||
|
||||
To change PX4 parameters, you can use the QGroundControl application [by connecting to Clover via Wi-Fi](gcs_bridge.md):
|
||||
## Recommended values
|
||||
|
||||

|
||||
### Common parameters
|
||||
|
||||
## Main parameters
|
||||
|Parameter|Value|Comment|
|
||||
|-|-|-|
|
||||
|`SENS_FLOW_ROT`|0 (*No rotation*)|If using *PX4Flow* hardware, keep the default value|
|
||||
|`SENS_FLOW_MINHGT`|0.01|For [VL53L1X](laser.md) rangefinder|
|
||||
|`SENS_FLOW_MAXHGT`|4.0|For [VL53L1X](laser.md) rangefinder|
|
||||
|`SENS_FLOW_MAXR`|10.0||
|
||||
|`SYS_HAS_MAG`|0|If impossible to run the magnetometer (*No mags found* error)|
|
||||
|
||||
The most important parameters are listed in this paragraph.
|
||||
### Estimator subsystem parameters
|
||||
|
||||
`SYS_MC_EST_GROUP` – select the estimator module.
|
||||
In case of using LPE ([COEX patched firmware](firmware.md)):
|
||||
|
||||
This is a group of modules that calculates the current state of the copter using readings from the sensors. The copter state includes:
|
||||
|Parameter|Value|Comment|
|
||||
|-|-|-|
|
||||
|`LPE_FUSION`|86|Checkboxes: *flow* + *vis* + *land Detector* + *gyro comp*. If flying over horizontal floor *pub agl as lpos down* checkbox is allowed.<br>Details: [Optical Flow](optical_flow.md), [ArUco markers](aruco_map.md), [GPS](gps.md).|
|
||||
|`LPE_VIS_DELAY`|0.0||
|
||||
|`LPE_VIS_Z`|0.1||
|
||||
|`LPE_FLW_SCALE`|1.0||
|
||||
|`LPE_FLW_R`|0.2||
|
||||
|`LPE_FLW_RR`|0.0||
|
||||
|`LPE_FLW_QMIN`|10||
|
||||
|`ATT_W_EXT_HDG`|0.5|Enabling usage of external yaw angle (when navigating using [markers map](aruco_map.md))|
|
||||
|`ATT_EXT_HDG_M`|1 (*Vision*)||
|
||||
|`ATT_W_MAG`|0|Disabling usage of the magnetometer (when navigating indoor)|
|
||||
|
||||
In case of using EKF2 (official firmware):
|
||||
|
||||
<!-- markdownlint-disable MD044 -->
|
||||
|
||||
|Parameter|Value|Comment|
|
||||
|-|-|-|
|
||||
|`EKF2_AID_MASK`|27|Checkboxes: (optionally) *gps* + *flow* + *vision position* + *vision yaw*.<br>Details: [Optical Flow](optical_flow.md), [ArUco markers](aruco_map.md), [GPS](gps.md).|
|
||||
|`EKF2_OF_DELAY`|0||
|
||||
|`EKF2_OF_QMIN`|10||
|
||||
|`EKF2_OF_N_MIN`|0.05||
|
||||
|`EKF2_OF_N_MAX`|0.2||
|
||||
|`EKF2_HGT_MODE`|2 (*Range sensor*)|If the [rangefinder](laser.md) is present and flying over horizontal floor|
|
||||
|`EKF2_EVA_NOISE`|0.1||
|
||||
|`EKF2_EVP_NOISE`|0.1||
|
||||
|`EKF2_EV_DELAY`|0||
|
||||
|`EKF2_MAG_TYPE`|5 (*None*)|Disabling usage of the magnetometer (when navigating indoor)|
|
||||
|
||||
<!-- markdownlint-enable MD031 -->
|
||||
|
||||
> **Info** See also: list of default parameters of the [Clover simulator](simulation.md): https://github.com/CopterExpress/clover/blob/master/clover_simulation/airframes/4500_clover.
|
||||
|
||||
## Additional information
|
||||
|
||||
The `SYS_MC_EST_GROUP` parameter defines the estimator subsystem to use.
|
||||
|
||||
Estimator subsystem is a group of modules that calculates the current state of the copter using readings from the sensors. The copter state includes:
|
||||
|
||||
* Angle rate of the copter – pitch_rate, roll_rate, yaw_rate;
|
||||
* Copter orientation (in the local coordinate system) – pitch, roll, yaw (one of presentations);
|
||||
@@ -57,9 +101,7 @@ These parameters adjust the flight of the copter by position (POSCTL, OFFBOARD,
|
||||
|
||||
## LPE + Q attitude estimator
|
||||
|
||||
These parameters configure the behavior of the `lpe` and `q` modules, which compute the state (orientation, position) of the copter. These parameters apply **only** if the `SYS_MC_EST_GROUP` parameter is set to `1` (local_position_estimator, attitude_estimator_q)
|
||||
|
||||
TODO
|
||||
These parameters configure the behavior of the `lpe` and `q` modules, which compute the state (orientation, position) of the copter. These parameters apply **only** if the `SYS_MC_EST_GROUP` parameter is set to `1` (local_position_estimator, attitude_estimator_q).
|
||||
|
||||
## Commander
|
||||
|
||||
@@ -68,5 +110,3 @@ Prearm checks, switching the modes and states of the copter.
|
||||
## Sensors
|
||||
|
||||
Enabling, disabling and configuring various sensors.
|
||||
|
||||
TODO
|
||||
|
||||
@@ -27,28 +27,29 @@ Main article: https://docs.qgroundcontrol.com/en/SetupView/Firmware.html
|
||||
|
||||
> **Note** Do not connect your flight controller prior to flashing.
|
||||
|
||||
We recommend using the modified version of PX4 by CopterExpress for the Clover drone, especially for autonomous flights. Download the latest stable version **<a class="latest-firmware v4" href="https://github.com/CopterExpress/Firmware/releases">from our GitHub</a>**.
|
||||
We recommend using the modified version of [PX4 with COEX patches](firmware.md) for the Clover drone, especially for autonomous flights. Download the latest stable version **<a class="latest-firmware v4" href="https://github.com/CopterExpress/Firmware/releases">from our GitHub</a>**.
|
||||
|
||||
> **Info** For Pixhawk-based quadcopters there is a separate firmware version. See details in "[Pixhawk / Pixracer firmware flashing](firmware.md)" article.
|
||||
To use all the most recent PX4 functions you also can use the latest official firmware version (experimentally).
|
||||
|
||||
Flash the flight controller with this firmware:
|
||||
|
||||
<img src="../assets/qgc-firmware.png" alt="QGroundControl firmware upload" class="zoom">
|
||||
|
||||
1. Launch QGroundControl software.
|
||||
2. Open the *Vehicle Setup* tab.
|
||||
3. Select the *Firmware* menu.
|
||||
1. Disconnect the flight controller from computer (if connected).
|
||||
2. Launch QGroundControl software.
|
||||
3. Go to *Vehicle Setup* panel (click on the QGroundControl logo in the top-left corner) and select *Firmware* menu.
|
||||
4. Connect your flight controller to your PC over USB.
|
||||
5. Wait for the flight controller to connect to QGroundControl.
|
||||
6. Select *PX4 Flight Stack* in the right bar.
|
||||
5. Select *PX4 Flight Stack* in the right bar appeared.
|
||||
|
||||
To use the recommended Copter Express firmware:
|
||||
<img src="../assets/qgc-firmware.png" alt="QGroundControl firmware upload" class="zoom">
|
||||
|
||||
* Check *Advanced Settings* checkbox.
|
||||
* Select *Custom firmware file...* from the dropdown list.
|
||||
* Press *OK* and select the file that you've downloaded.
|
||||
6. To use **COEX patched firmware**:
|
||||
|
||||
To use the latest official stable firmware just press *OK*.
|
||||
* Check *Advanced Settings* checkbox.
|
||||
* Select *Custom firmware file...* from the dropdown list.
|
||||
* Press *OK* and select the file that you've downloaded.
|
||||
|
||||
To use the latest **official stable firmware** just press *OK*.
|
||||
|
||||
Wait for QGroundControl to finish flashing the flight controller.
|
||||
|
||||
@@ -82,7 +83,7 @@ This is how the main QGroundControl settings window will look like:
|
||||
|
||||
### Setting parameters
|
||||
|
||||
Open the *Vehicle Setup* tab and select the *Parameters* menu. You can use the *Search* field to find parameters by name.
|
||||
Open the *Vehicle Setup* tab and select the *Parameters* menu. You can use the *Search* field to find parameters by name. Recommended parameters values are given in the further documentation and also in the [parameters summary article](parameters.md).
|
||||
|
||||
<img src="../assets/qgc-parameters.png" alt="QGroundControl parameters" class="zoom">
|
||||
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
Autonomous flight (OFFBOARD)
|
||||
===
|
||||
|
||||
> **Note** In the image version **0.20** `clever` package was renamed to `clover`. See [previous version of the article](https://github.com/CopterExpress/clover/blob/v0.19/docs/en/simple_offboard.md) for older images.
|
||||
|
||||
<!-- -->
|
||||
|
||||
> **Hint** We recommend using our [custom PX4 firmware for Clover](firmware.md#modified-firmware-for-clover) for autonomous flights.
|
||||
# Autonomous flight
|
||||
|
||||
The `simple_offboard` module of the `clover` package is intended for simplified programming of the autonomous drone flight (`OFFBOARD` [flight mode](modes.md)). It allows setting the desired flight tasks, and automatically transforms [coordinates between frames](frames.md).
|
||||
|
||||
@@ -13,8 +6,7 @@ The `simple_offboard` module of the `clover` package is intended for simplified
|
||||
|
||||
Main services are [`get_telemetry`](#gettelemetry) (receive telemetry data), [`navigate`](#navigate) (fly to a given point along a straight line), [`navigate_global`](#navigateglobal) (fly to a point specified as latitude and longitude along a straight line), [`land`](#land) (switch to landing mode).
|
||||
|
||||
Python examples
|
||||
---
|
||||
## Python usage
|
||||
|
||||
You need to create proxies for services before calling them. Use the following template for your programs:
|
||||
|
||||
@@ -37,8 +29,7 @@ land = rospy.ServiceProxy('land', Trigger)
|
||||
|
||||
Unused proxy functions may be removed from the code.
|
||||
|
||||
API description
|
||||
---
|
||||
## API description
|
||||
|
||||
> **Note** Omitted numeric parameters are set to 0.
|
||||
|
||||
@@ -312,14 +303,9 @@ Landing the drone (command line):
|
||||
rosservice call /land "{}"
|
||||
```
|
||||
|
||||
<!--
|
||||
### release
|
||||
> **Caution** In recent PX4 versions, the vehicle will be switched out of LAND mode to manual mode, if the remote control sticks are moved significantly.
|
||||
|
||||
Stop publishing setpoints to the drone (release control). Required to continue monitoring by means of [MAVROS](mavros.md).
|
||||
-->
|
||||
|
||||
Additional materials
|
||||
------------------------
|
||||
## Additional materials
|
||||
|
||||
* [ArUco-based position estimation and navigation](aruco.md).
|
||||
* [Program samples and snippets](snippets.md).
|
||||
|
||||
Reference in New Issue
Block a user