New Crowdin translations - zh-CN (#25782)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
This commit is contained in:
PX4 Build Bot
2025-10-22 15:37:56 +11:00
committed by GitHub
parent e0fcc329a3
commit d2548ced9d
35 changed files with 750 additions and 156 deletions
+3
View File
@@ -286,6 +286,7 @@
- [CubePilot Here+ (Discontined)](gps_compass/rtk_gps_hex_hereplus.md)
- [INS (Inertial Navigation/GNSS)](sensor/inertial_navigation_systems.md)
- [InertialLabs](sensor/inertiallabs.md)
- [MicroStrain](sensor/microstrain.md)
- [sbgECom](sensor/sbgecom.md)
- [VectorNav](sensor/vectornav.md)
- [光流](sensor/optical_flow.md)
@@ -701,6 +702,7 @@
- [SensorCombined](msg_docs/SensorCombined.md)
- [SensorCorrection](msg_docs/SensorCorrection.md)
- [SensorGnssRelative](msg_docs/SensorGnssRelative.md)
- [SensorGnssStatus](msg_docs/SensorGnssStatus.md)
- [SensorGps](msg_docs/SensorGps.md)
- [SensorGyro](msg_docs/SensorGyro.md)
- [SensorGyroFft](msg_docs/SensorGyroFft.md)
@@ -762,6 +764,7 @@
- [Standard Modes Protocol](mavlink/standard_modes.md)
- [uXRCE-DDS (PX4-ROS 2/DDS Bridge)](middleware/uxrce_dds.md)
- [UORB Bridged to ROS 2](middleware/dds_topics.md)
- [Zenoh (PX4 ROS 2)](middleware/zenoh.md)
- [模块 & 命令](modules/modules_main.md)
- [自动调参](modules/modules_autotune.md)
- [命令](modules/modules_command.md)
+4
View File
@@ -615,6 +615,10 @@ div.frame_variant td, div.frame_variant th {
<td><a href="https://www.axialadventure.com/product/1-10-scx10-ii-trail-honcho-4wd-rock-crawler-brushed-rtr/AXID9059.html">Axial SCX10 2 Trail Honcho</a></td>
<td>Maintainer: John Doe &lt;john@example.com&gt;<p><code>SYS_AUTOSTART</code> = 51001</p></td>
</tr>
<tr id="rover_rover_nxp_b3rb_rover_ackermann">
<td>NXP B3RB Rover Ackermann</td>
<td>Maintainer: John Doe &lt;john@example.com&gt;<p><code>SYS_AUTOSTART</code> = 51002</p></td>
</tr>
<tr id="rover_rover_generic_rover_mecanum">
<td>Generic Rover Mecanum</td>
<td>Maintainer: John Doe &lt;john@example.com&gt;<p><code>SYS_AUTOSTART</code> = 52000</p></td>
+22 -2
View File
@@ -276,12 +276,12 @@ The relevant parameters are listed in the table below.
## 故障检测器
The failure detector allows a vehicle to take protective action(s) if it unexpectedly flips, or if it is notified by an external failure detection system.
The failure detector allows a vehicle to take protective actions if it unexpectedly flips, detects a motor failure, or if it is notified by an external failure detection system.
During **flight**, the failure detector can be used to trigger [flight termination](../advanced_config/flight_termination.md) if failure conditions are met, which may then launch a [parachute](../peripherals/parachute.md) or perform some other action.
:::info
Failure detection during flight is deactivated by default (enable by setting the parameter: [CBRK_FLIGHTTERM=0](#CBRK_FLIGHTTERM)).
Acting on a detected failure during flight is deactivated by default (enable by setting the parameter: [CBRK_FLIGHTTERM=0](#CBRK_FLIGHTTERM)).
:::
During **takeoff** the failure detector [attitude trigger](#attitude-trigger) invokes the [disarm action](#act_disarm) if the vehicle flips (disarm kills the motors but, unlike flight termination, will not launch a parachute or perform other failure actions).
@@ -303,6 +303,26 @@ The relevant parameters are shown below:
| <a id="FD_FAIL_P_TTRI"></a>[FD_FAIL_P_TTRI](../advanced_config/parameter_reference.md#FD_FAIL_P_TTRI) | Time to exceed [FD_FAIL_P](#FD_FAIL_P) for failure detection (default 0.3s). |
| <a id="FD_FAIL_R_TTRI"></a>[FD_FAIL_R_TTRI](../advanced_config/parameter_reference.md#FD_FAIL_R_TTRI) | Time to exceed [FD_FAIL_R](#FD_FAIL_R) for failure detection (default 0.3s). |
### Motor Failure Trigger
The failure detector can be configured to detect a motor failure while armed (and trigger an associated action) in the following conditions:
- A 300 ms timeout occurs in telemetry from an ESC that was previously available.
- The input current in the telemetry of an ESC which was previously positive gets too low for more than [`FD_ACT_MOT_TOUT`](FD_ACT_MOT_TOUT) ms.
The "too low" condition is defined by:
```text
{esc current} < {parameter FD_ACT_MOT_C2T} * {motor command between 0 and 1}
```
| 参数 | 描述 |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="FD_ACT_EN"></a>[FD_ACT_EN](../advanced_config/parameter_reference.md#FD_ACT_EN) | Enable/disable the motor failure trigger completely. |
| <a id="FD_ACT_MOT_THR"></a>[FD_ACT_MOT_THR](../advanced_config/parameter_reference.md#FD_ACT_MOT_THR) | Minimum normalized [0,1] motor command below which motor under current is ignored. |
| <a id="FD_ACT_MOT_C2T"></a>[FD_ACT_MOT_C2T](../advanced_config/parameter_reference.md#FD_ACT_MOT_C2T) | Scale between normalized [0,1] motor command and expected minimally reported currrent when the rotor is healthy. |
| <a id="FD_ACT_MOT_TOUT"></a>[FD_ACT_MOT_TOUT](../advanced_config/parameter_reference.md#FD_ACT_MOT_TOUT) | Time in miliseconds for which the under current detection condition needs to stay true. |
| <a id="CA_FAILURE_MODE"></a>[CA_FAILURE_MODE](../advanced_config/parameter_reference.md#CA_FAILURE_MODE) | Configure to not only warn about a motor failure but remove the first motor that detects a failure from the allocation effectiveness which turns off the motor and tries to operate the vehicle without it until disarming the next time. |
### 外部自动触发系统(ATS
The [failure detector](#failure-detector), if [enabled](#CBRK_FLIGHTTERM), can also be triggered by an external ATS system.
+23 -7
View File
@@ -19,7 +19,7 @@ At time of writing (PX4 v1.14):
## Failure System Command
Failures can be injected using the [failure system command](../modules/modules_command.md#failure) from any PX4 console/shell, specifying both the target and type of the failure.
Failures can be injected using the [failure system command](../modules/modules_command.md#failure) from any PX4 [console/shell](../debug/consoles.md) (such as the [QGC MAVLink Console](../debug/mavlink_shell.md#qgroundcontrol-mavlink-console) or SITL _pxh shell_), specifying both the target and type of the failure.
### Syntax
@@ -61,11 +61,18 @@ where:
- _instance number_ (optional): Instance number of affected sensor.
0 (default) indicates all sensors of specified type.
### Example
## MAVSDK Failure Plugin
The [MAVSDK failure plugin](https://mavsdk.mavlink.io/main/en/cpp/api_reference/classmavsdk_1_1_failure.html) can be used to programmatically inject failures.
It is used in [PX4 Integration Testing](../test_and_ci/integration_testing_mavsdk.md) to simulate failure cases (for example, see [PX4-Autopilot/test/mavsdk_tests/autopilot_tester.cpp](https://github.com/PX4/PX4-Autopilot/blob/main/test/mavsdk_tests/autopilot_tester.cpp)).
The plugin API is a direct mapping of the failure command shown above, with a few additional error signals related to the connection.
## Example: RC signal
To simulate losing RC signal without having to turn off your RC controller:
1. Enable the parameter [SYS_FAILURE_EN](../advanced_config/parameter_reference.md#SYS_FAILURE_EN). And specifically to turn off motors also [CA_FAILURE_MODE](../advanced_config/parameter_reference.md#CA_FAILURE_MODE).
1. Enable the [SYS_FAILURE_EN](../advanced_config/parameter_reference.md#SYS_FAILURE_EN) parameter.
2. Enter the following commands on the MAVLink console or SITL _pxh shell_:
```sh
@@ -76,9 +83,18 @@ To simulate losing RC signal without having to turn off your RC controller:
failure rc_signal ok
```
## MAVSDK Failure Plugin
## Example: Motor
The [MAVSDK failure plugin](https://mavsdk.mavlink.io/main/en/cpp/api_reference/classmavsdk_1_1_failure.html) can be used to programmatically inject failures.
It is used in [PX4 Integration Testing](../test_and_ci/integration_testing_mavsdk.md) to simulate failure cases (for example, see [PX4-Autopilot/test/mavsdk_tests/autopilot_tester.cpp](https://github.com/PX4/PX4-Autopilot/blob/main/test/mavsdk_tests/autopilot_tester.cpp)).
To stop a motor mid-flight without the system anticipating it or excluding it from allocation effectiveness:
The plugin API is a direct mapping of the failure command shown above, with a few additional error signals related to the connection.
1. Enable the [SYS_FAILURE_EN](../advanced_config/parameter_reference.md#SYS_FAILURE_EN) parameter.
2. Enable [CA_FAILURE_MODE](../advanced_config/parameter_reference.md#CA_FAILURE_MODE) parameter to allow turning off motors.
3. Enter the following commands on the MAVLink console or SITL _pxh shell_:
```sh
# Turn off first motor
failure motor off -i 1
# Turn it back on
failure motor ok -i 1
```
+1 -1
View File
@@ -161,7 +161,7 @@ There are different clients that support ulog streaming:
- If log streaming does not start, make sure the `logger` is running (see above), and inspect the console output while starting.
- If it still does not work, make sure that Mavlink 2 is used. Enforce it by setting <code>MAV_PROTO_VER</code> to 2.
Enforce it by setting `MAV_PROTO_VER` to 2.
`MAV_PROTO_VER` needs to be set to 2.
- Log streaming uses a maximum of 70% of the configured MAVLink rate (`-r` parameter).
如果需要更大的速率,数据会丢失。
The currently used percentage can be inspected with `mavlink status` (1.8% is used in this example):
+4 -3
View File
@@ -83,9 +83,10 @@ This is done using the the parameters named like `UAVCAN_SUB_*` in the parameter
On the ARK CANnode, you may need to configure the following parameters:
| 参数 | 描述 |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| <a id="CANNODE_TERM"></a>[CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM) | CAN built-in bus termination. |
| 参数 | 描述 |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="CANNODE_NODE_ID"></a>[CANNODE_NODE_ID](../advanced_config/parameter_reference.md#CANNODE_NODE_ID) | CAN node ID (0 for dynamic allocation). If set to 0 (default), dynamic node allocation is used. Set to 1-127 to use a static node ID. |
| <a id="CANNODE_TERM"></a>[CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM) | CAN built-in bus termination. |
## LED含义
+4 -3
View File
@@ -109,9 +109,10 @@ When optical flow is the only source of horizontal position/velocity, then lower
On the ARK Flow, you may need to configure the following parameters:
| 参数 | 描述 |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| <a id="CANNODE_TERM"></a>[CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM) | CAN built-in bus termination. |
| 参数 | 描述 |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="CANNODE_NODE_ID"></a>[CANNODE_NODE_ID](../advanced_config/parameter_reference.md#CANNODE_NODE_ID) | CAN node ID (0 for dynamic allocation). If set to 0 (default), dynamic node allocation is used. Set to 1-127 to use a static node ID. |
| <a id="CANNODE_TERM"></a>[CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM) | CAN built-in bus termination. |
## LED含义
+4 -3
View File
@@ -104,9 +104,10 @@ Set the following parameters in _QGroundControl_:
You may need to [configure the following parameters](../dronecan/index.md#qgc-cannode-parameter-configuration) on the ARK Flow MR itself:
| 参数 | 描述 |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| <a id="CANNODE_TERM"></a>[CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM) | CAN built-in bus termination. |
| 参数 | 描述 |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="CANNODE_NODE_ID"></a>[CANNODE_NODE_ID](../advanced_config/parameter_reference.md#CANNODE_NODE_ID) | CAN node ID (0 for dynamic allocation). If set to 0 (default), dynamic node allocation is used. Set to 1-127 to use a static node ID. |
| <a id="CANNODE_TERM"></a>[CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM) | CAN built-in bus termination. |
## LED含义
+9 -1
View File
@@ -91,9 +91,17 @@ If the sensor is not centred within the vehicle you will also need to define sen
- Enable GPS yaw fusion by setting bit 3 of [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to true.
- Enable [UAVCAN_SUB_GPS](../advanced_config/parameter_reference.md#UAVCAN_SUB_GPS), [UAVCAN_SUB_MAG](../advanced_config/parameter_reference.md#UAVCAN_SUB_MAG), and [UAVCAN_SUB_BARO](../advanced_config/parameter_reference.md#UAVCAN_SUB_BARO).
- Set [CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM) to `1` if this is that last node on the CAN bus.
- The parameters [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z) can be set to account for the offset of the ARK GPS from the vehicles centre of gravity.
### ARK GPS Configuration
You may need to [configure the following parameters](../dronecan/index.md#qgc-cannode-parameter-configuration) on the ARK GPS itself:
| 参数 | 描述 |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="CANNODE_NODE_ID"></a>[CANNODE_NODE_ID](../advanced_config/parameter_reference.md#CANNODE_NODE_ID) | CAN node ID (0 for dynamic allocation). If set to 0 (default), dynamic node allocation is used. Set to 1-127 to use a static node ID. |
| <a id="CANNODE_TERM"></a>[CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM) | CAN built-in bus termination. Set to `1` if this is the last node on the CAN bus. |
## LED含义
You will see green, blue and red LEDs on the ARK GPS when it is being flashed, and a blinking green LED if it is running properly.
+9 -1
View File
@@ -85,7 +85,15 @@ You need to set necessary [DroneCAN](index.md) parameters and define offsets if
- Enable GPS blending to ensure the heading is always published by setting [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) to 7 (all three bits checked).
- Enable [UAVCAN_SUB_GPS](../advanced_config/parameter_reference.md#UAVCAN_SUB_GPS), [UAVCAN_SUB_MAG](../advanced_config/parameter_reference.md#UAVCAN_SUB_MAG), and [UAVCAN_SUB_BARO](../advanced_config/parameter_reference.md#UAVCAN_SUB_BARO).
- The parameters [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z) can be set to account for the offset of the ARK RTK GPS from the vehicles centre of gravity.
- Set [CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM) to `1` on the GPS if this it that last node on the CAN bus.
### ARK RTK GPS Configuration
You may need to [configure the following parameters](../dronecan/index.md#qgc-cannode-parameter-configuration) on the ARK RTK GPS itself:
| 参数 | 描述 |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="CANNODE_NODE_ID"></a>[CANNODE_NODE_ID](../advanced_config/parameter_reference.md#CANNODE_NODE_ID) | CAN node ID (0 for dynamic allocation). If set to 0 (default), dynamic node allocation is used. Set to 1-127 to use a static node ID. |
| <a id="CANNODE_TERM"></a>[CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM) | CAN built-in bus termination. Set to `1` if this is the last node on the CAN bus. |
### Setting Up Rover and Fixed Base
+9
View File
@@ -102,6 +102,10 @@ If the DNA is still running and certain devices need to be manually configured,
:::info
The PX4 node ID can be configured using the [UAVCAN_NODE_ID](../advanced_config/parameter_reference.md#UAVCAN_NODE_ID) parameter.
The parameter is set to 1 by default.
Devices running the [PX4 DroneCAN firmware](px4_cannode_fw.md) (such as [ARK CANnode](ark_cannode.md)) can use the
[CANNODE_NODE_ID](../advanced_config/parameter_reference.md#CANNODE_NODE_ID) parameter to set a static node ID.
Set it to 0 (default) for dynamic allocation, or to a value between 1-127 to use a specific static node ID.
:::
:::warning
@@ -288,6 +292,11 @@ For example, the screenshot below shows the parameters for a CAN GPS with node i
![QGC Parameter showing selected DroneCAN node](../../assets/can/dronecan/qgc_can_parameters.png)
Common CANNODE parameters that you can configure include:
- [CANNODE_NODE_ID](../advanced_config/parameter_reference.md#CANNODE_NODE_ID): Set a static node ID (1-127) or use 0 for dynamic allocation. See [PX4 DroneCAN Firmware > Static Node ID](px4_cannode_fw.md#static-node-id) for more information.
- [CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM): Enable CAN bus termination on the last node in the bus.
## Device Specific Setup
Most DroneCAN nodes require no further setup, unless specifically noted in their device-specific documentation.
+20
View File
@@ -20,6 +20,26 @@ make ark_can-flow_default
This will create an output in **build/ark_can-flow_default** named **XX-X.X.XXXXXXXX.uavcan.bin**. Follow the instructions at [DroneCAN firmware update](index.md#firmware-update) to flash the firmware.
## 配置
### Static Node ID
By default, DroneCAN devices use [Dynamic Node Allocation (DNA)](index.md#node-id-allocation) to automatically obtain a unique node ID from the flight controller.
However, you can configure a static node ID using the [CANNODE_NODE_ID](../advanced_config/parameter_reference.md#CANNODE_NODE_ID) parameter.
To configure a static node ID:
1. Set [CANNODE_NODE_ID](../advanced_config/parameter_reference.md#CANNODE_NODE_ID) to a value between 1-127 using [QGroundControl](index.md#qgc-cannode-parameter-configuration)
2. Reboot the device
To return to dynamic allocation, set `CANNODE_NODE_ID` back to 0.
Note that when switching back to dynamic allocation, the flight controller will typically continue to allocate the same node ID that was previously used (this is normal DNA behavior).
:::warning
When using static node IDs, you must ensure that each device on the CAN bus has a unique node ID.
Configuring two devices with the same ID will cause communication conflicts.
:::
## 开发人员信息
This section has information that is relevant to developers who want to add support for new DroneCAN hardware to the PX4 Autopilot.
+5 -5
View File
@@ -123,18 +123,18 @@ The approach is similar to other vehicle types, but the allowed control mode com
| [Actuator Setpoints](#actuator-setpoints) | Direct actuator control | [ActuatorMotors](../msg_docs/ActuatorMotors.md), [ActuatorServos](../msg_docs/ActuatorServos.md) |
| (Deprecated) [Trajectory Setpoint](#deprecated-trajectory-setpoint) | General vehicle control | [TrajectorySetpoint](../msg_docs/TrajectorySetpoint.md) |
#### Rover Setpoints
#### Rover 设置点
The rover modules use a hierarchical structure to propagate setpoints:
滚动模块使用层次结构来传播设置点:
![Rover Control Structure](../../assets/middleware/ros2/px4_ros2_interface_lib/rover_control_structure.svg)
The "highest" setpoint that is provided will be used within the PX4 rover modules to generate the setpoints that are below it (overriding them!).
With this hierarchy there are clear rules for providing a valid control input:
这个层次结构有提供有效控制输入的明确规则:
- Provide a position setpoint **or**
- One of the setpoints on the "left" (speed **or** throttle) **and** one of the setpoints on the "right" (attitude, rate **or** steering).
All combinations of "left" and "right" setpoints are valid.
- “左”上的设置点之一(速度 **** 节点) **** “右”上的设置点之一(态度、速率 **** 节点)。
所有“左”和“右”设置点的组合都是有效的。
The following are all valid setpoint combinations and their respective control flags that must be set through [OffboardControlMode](../msg_docs/OffboardControlMode.md) (set all others to _false_).
Additionally, for some combinations we require certain setpoints to be published with `NAN` values so that the setpoints of interest are not overridden by the rover module (due to the hierarchy above).
+5 -6
View File
@@ -43,9 +43,8 @@ The horizontal position of the vehicle can move due to wind (or pre-existing mom
该模式受以下参数影响:
| 参数 | 描述 |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <a id="MPC_Z_VEL_MAX_UP"></a>[MPC_Z_VEL_MAX_UP](../advanced_config/parameter_reference.md#MPC_Z_VEL_MAX_UP) | 最大垂直上升速度。 默认:3m/s。 |
| <a id="MPC_Z_VEL_MAX_DN"></a>[MPC_Z_VEL_MAX_DN](../advanced_config/parameter_reference.md#MPC_Z_VEL_MAX_DN) | 最大垂直下降速度。 默认:1m/s。 |
| <a id="RCX_DZ"></a>`RCX_DZ` | RC dead zone for channel X. The value of X for throttle will depend on the value of [RC_MAP_THROTTLE](../advanced_config/parameter_reference.md#RC_MAP_THROTTLE). For example, if the throttle is channel 4 then [RC4_DZ](../advanced_config/parameter_reference.md#RC4_DZ) specifies the deadzone. |
| <a id="MPC_xxx"></a>`MPC_XXXX` | 大多数 MPC_xxx参数会影响此模式下的飞行行为(至少在某种程度上)。 For example, [MPC_THR_HOVER](../advanced_config/parameter_reference.md#MPC_THR_HOVER) defines the thrust at which a vehicle will hover. |
| 参数 | 描述 |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="MPC_Z_VEL_MAX_UP"></a>[MPC_Z_VEL_MAX_UP](../advanced_config/parameter_reference.md#MPC_Z_VEL_MAX_UP) | 最大垂直上升速度。 默认:3m/s。 |
| <a id="MPC_Z_VEL_MAX_DN"></a>[MPC_Z_VEL_MAX_DN](../advanced_config/parameter_reference.md#MPC_Z_VEL_MAX_DN) | 最大垂直下降速度。 默认:1m/s。 |
| <a id="MPC_xxx"></a>`MPC_XXXX` | 大多数 MPC_xxx参数会影响此模式下的飞行行为(至少在某种程度上)。 For example, [MPC_THR_HOVER](../advanced_config/parameter_reference.md#MPC_THR_HOVER) defines the thrust at which a vehicle will hover. |
-1
View File
@@ -67,7 +67,6 @@ All the parameters in the [Multicopter Position Control](../advanced_config/para
| <a id="MPC_Z_VEL_MAX_DN"></a>[MPC_Z_VEL_MAX_DN](../advanced_config/parameter_reference.md#MPC_Z_VEL_MAX_DN) | 最大垂直下降速度。 默认:1m/s。 |
| <a id="MPC_LAND_ALT1"></a>[MPC_LAND_ALT1](../advanced_config/parameter_reference.md#MPC_LAND_ALT1) | 触发第一阶段降速的高度。 Below this altitude descending velocity gets limited to a value between [MPC_Z_VEL_MAX_DN](#MPC_Z_VEL_MAX_DN) (or `MPC_Z_V_AUTO_DN`) and [MPC_LAND_SPEED](#MPC_LAND_SPEED). Value needs to be higher than [MPC_LAND_ALT2](#MPC_LAND_ALT2). Default 10m. |
| <a id="MPC_LAND_ALT2"></a>[MPC_LAND_ALT2](../advanced_config/parameter_reference.md#MPC_LAND_ALT2) | 触发第二阶段降速的高度。 Below this altitude descending velocity gets limited to [`MPC_LAND_SPEED`](#MPC_LAND_SPEED). Value needs to be lower than "MPC_LAND_ALT1". Default 5m. |
| <a id="RCX_DZ"></a>`RCX_DZ` | RC dead zone for channel X. The value of X for throttle will depend on the value of [RC_MAP_THROTTLE](../advanced_config/parameter_reference.md#RC_MAP_THROTTLE). For example, if the throttle is channel 4 then [RC4_DZ](../advanced_config/parameter_reference.md#RC4_DZ) specifies the deadzone. |
| <a id="MPC_xxx"></a>`MPC_XXXX` | 大多数 MPC_xxx参数会影响此模式下的飞行行为(至少在某种程度上)。 For example, [MPC_THR_HOVER](../advanced_config/parameter_reference.md#MPC_THR_HOVER) defines the thrust at which a vehicle will hover. |
| <a id="MPC_POS_MODE"></a>[MPC_POS_MODE](../advanced_config/parameter_reference.md#MPC_POS_MODE) | 从摇杆输入到机体动作的转换策略。 From PX4 v1.12 the default (`Acceleration based`) is that stick position controls acceleration (in a similar way to a car accelerator pedal). 其他选项允许操纵杆偏转直接控制地面速度,有或没有平滑和加速度限制。 |
| <a id="MPC_ACC_HOR_MAX"></a>[MPC_ACC_HOR_MAX](../advanced_config/parameter_reference.md#MPC_ACC_HOR_MAX) | 最大水平加速度。 |
+1 -1
View File
@@ -205,7 +205,7 @@ This should be enabled by default on recent builds.
To ensure MAVLink2 is used:
- Update the telemetry module firmware to the latest version (see [QGroundControl > Setup > Firmware](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/firmware.html)).
- Set [MAV_PROTO_VER](../advanced_config/parameter_reference.md#MAV_PROTO_VER) to 2 (see [QGroundControl Setup > Parameters](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/parameters.html))
- Ensure [MAV_PROTO_VER](../advanced_config/parameter_reference.md#MAV_PROTO_VER) is set to 2 (see [QGroundControl Setup > Parameters](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/parameters.html))
#### 调试
+12 -2
View File
@@ -1,3 +1,8 @@
<script setup>
import { useData } from 'vitepress'
const { site } = useData();
</script>
<div style="float:right; padding:10px; margin-right:20px;"><a href="https://px4.io/"><img src="../assets/site/logo_pro_small.png" title="PX4 Logo" width="180px" /></a></div>
# PX4 自动驾驶仪用户指南
@@ -8,17 +13,22 @@ _PX4_ 是一款专业级飞控。
它由来自业界和学术界的世界级开发商开发,并得到活跃的全球社区的支持,为从竞速和物流无人机到地面车辆和潜水艇的各种载具提供动力。
:::tip
这份指南包含组装、配置、安全使用 PX4 的设备的各种只是。 对贡献感兴趣吗 查看 [Development](development/development.md) 部分。
这份指南包含组装、配置、安全使用 PX4 的设备的各种只是。
对贡献感兴趣吗 查看 [Development](development/development.md) 部分。
:::
<div v-if="site.title == 'PX4 Guide (main)'">
:::warning
本指南适用于_development_ version of PX4 (`main` 分支)。
使用 **版本** 选择器查找当前的 _稳定_ 版本。
自稳定版本发布以来的已记录变更,收录在不断更新的(releases/main.md ) 中。
:::
</div>
## 如何开始?
所有用户都应该先阅读[基本概念](getting_started/px4_basic_concepts.md)
+1 -1
View File
@@ -4,7 +4,7 @@
This document is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/msg/generate_msg_docs.py) from the source code.
:::
The [dds_topics.yaml](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/uxrce_dds_client/dds_topics.yaml) file specifies which uORB message definitions are compiled into the [uxrce_dds_client](../modules/modules_system.md#uxrce-dds-client) module when [PX4 is built](../middleware/uxrce_dds.md#code-generation), and hence which topics are available for ROS 2 applications to subscribe or publish (by default).
The [dds_topics.yaml](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/uxrce_dds_client/dds_topics.yaml) file specifies which uORB message definitions are compiled into the [uxrce_dds_client](../modules/modules_system.md#uxrce-dds-client) and/or [zenoh](../modules/modules_driver.md#zenoh) module when [PX4 is built](../middleware/uxrce_dds.md#code-generation), and hence which topics are available for ROS 2 applications to subscribe or publish (by default).
This document shows a markdown-rendered version of [dds_topics.yaml](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/uxrce_dds_client/dds_topics.yaml), listing the publications, subscriptions, and so on.
+201
View File
@@ -0,0 +1,201 @@
# Zenoh (PX4 ROS 2 rmw_zenoh)
<Badge type="tip" text="main (planned for: PX4 v1.17)" /> <Badge type="warning" text="Experimental" />
:::warning
Experimental
At the time of writing, PX4 Zenoh-pico is experimental, and hence subject to change.
:::
PX4 supports Zenoh as an alternative mechanism (to DDS) for bridging uORB topics to [ROS 2](../ros2/user_guide.md) (via the ROS 2 [`rmw_zenoh`](https://github.com/ros2/rmw_zenoh) middleware).
This allows uORB messages to be published and subscribed on a companion computer as though they were ROS 2 topics.
It provides a fast and lightweight way to connect PX4 to ROS 2, making it easier for applications to access vehicle telemetry and send control commands.
The following guide describes the architecture and various options for setting up the Zenoh client and router.
In particular, it covers the options that are most important to PX4 users exploring Zenoh as an alternative communication layer for ROS 2.
## 软件架构
The Zenoh-based middleware consists of a client running on PX4 and a Zenoh router running on the companion computer, with bi-directional data exchange between them over a UART, TCP, UDP, or multicast-UDP link.
The router acts as a broker and discovery service, enabling PX4 to publish and subscribe to topics in the global Zenoh data space.
This allows seamless integration with ROS 2 nodes using [`rmw_zenoh`](https://github.com/ros2/rmw_zenoh), and supports flexible deployment across distributed systems.
![Architecture PX4 Zenoh-Pico with ROS 2](../../assets/middleware/zenoh/architecture-px4-zenoh.svg)
The client is the _PX4 Zenoh-Pico Node_ referred to above, which is implemented in the [PX4 `zenoh` module](../modules/modules_driver.md#zenoh).
This is based on Zenoh-Pico, a minimalistic version of [Eclipse Zenoh](https://zenoh.io/) (a data-centric protocol designed for real-time, distributed, and resource-constrained environments).
The router suggested above is [zenohd](https://github.com/eclipse-zenoh/zenoh/tree/main/zenohd).
:::info
UART is supported by Zenoh but has not yet implemented in the PX4 Zenoh-Pico node.
:::
## ROS 2 Zenoh Bring-up on Linux Companion
In order for PX4 uORB topics to be shared with ROS 2 applications, you will need the PX4 Zenoh-Pico Node client running on your FMU, connected to a Zenoh router running on the companion computer (or elsewhere in the network).
First select Zenoh as the ROS 2 transport by setting the `RMW_IMPLEMENTATION` environment variable as shown:
```sh
export RMW_IMPLEMENTATION=rmw_zenoh_cpp
```
Then start the Zenoh router using the command:
```sh
ros2 run rmw_zenoh_cpp rmw_zenohd
```
For more information about the Zenoh Router see the [rmw_zenoh](https://github.com/ros2/rmw_zenoh?tab=readme-ov-file#start-the-zenoh-router) documentation.
## PX4 Zenoh-Pico Node Setup
### PX4 Firmware
Before setting up the Zenoh communication, first make sure that your firmware contains the driver that implements the [`zenoh` driver](../modules/modules_driver.md#zenoh), which provides the implementation of the _PX4 Zenoh-Pico Node_.
You can check if the module is present on your board by searching for the key `CONFIG_MODULES_ZENOH=y` in your board's `default.px4board` KConfig file.
For example, you can see that the module is present in `px4_fmu-v6xrt` build targets from [/boards/px4/fmu-v6xrt/default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v6xrt/default.px4board#L91).
If `CONFIG_MODULES_ZENOH=y` is not preset you can add this key to your board configuration and rebuild.
Note that due to flash constraints you may need to remove other components in order to include the module (such as the [`uxrce_dds_client` module](../modules/modules_system.md#uxrce-dds-client), which you will not need if you are using Zenoh).
The table below shows some of the PX4 targets that include Zenoh by default.
| PX4 Target | 备注 |
| ---------------------- | -------------------------------------------------------------------------------------------------------------- |
| `px4_fmu-v6xrt` | For [FMUv6X-RT](../flight_controller/nxp_mr_vmu_rt1176.md) (reference platform for testing) |
| `nxp_tropic-community` | |
| `nxp_mr-tropic` | |
| `nxp_mr-canhubk344` | |
| `px4_sitl_zenoh` | Zenoh-enabled simulation build |
| `px4_fmu-v6x_zenoh` | Zenoh-enabled firmware for FMUv6X |
Zenoh is not included in the default `px4_fmu-` targets for any firmware other than `px4_fmu-v6xrt` (`px4_sitl_zenoh` and `px4_fmu-v6x_zenoh` [are build variants](../dev_setup/building_px4.md#px4-make-build-targets)).
:::tip
You can check if Zenoh is present at runtime by using QGroundControl to [find the parameter](../advanced_config/parameters.md#finding-a-parameter) [ZENOH_ENABLE](../advanced_config/parameter_reference.md#ZENOH_ENABLE).
If present, the module is installed.
:::
### Enable Zenoh on PX4 Startup
Set the [ZENOH_ENABLE](../advanced_config/parameter_reference.md#ZENOH_ENABLE) parameter to `1` to enable Zenoh on PX4 startup.
### Configure Zenoh Network
Set up PX4 to connect to the companion computer running `zenohd`.
PX4's default IP address of the Zenoh daemon host is `10.41.10.1`.
If you're using a different IP for the Zenoh daemon, run the following command (replacing the address) in a PX4 shell and then reboot:
```sh
zenoh config net client tcp/10.41.10.1:7447#iface=eth0
```
Note that for the simulation target with Zeroh (`px4_sitl_zenoh`) you won't need to make any changes because the default IP address of the Zenoh daemon is set to `localhost`.
:::warning
Any changes to the network configuration require a PX4 system reboot to take effect.
:::
:::tip
See [PX4 Ethernet Setup](../advanced_config/ethernet_setup.md) for more information about Ethernet configuration.
:::
### PX4 Zenoh-pico Node configuration
The **default configuration** is auto-generated from the [dds_topics.yaml](../middleware/dds_topics.md) file in the PX4 repository.
This file specifies which uORB message definitions are to be published/subscribed by ROS 2 applications, and hence (indirectly) which topics are compiled into the zenoh module.
To inspect the current Zenoh configuration:
```sh
zenoh config
```
The PX4 Zenoh-pico node stores its configuration on the **SD card** under the `zenoh` folder.
This folder contains three key files:
- **`net.txt`** Defines the **Zenoh network configuration**.
- **`pub.csv`** Maps **uORB topics to ROS2 topics** (used for publishing).
- **`sub.csv`** Maps **ROS2 topics to uORB topics** (used for subscribing).
### 4. Modifying Topic Mappings
Zenoh topic mappings define how data flows between PX4's internal uORB topics and external ROS2 topics via Zenoh.
These mappings are stored in `pub.csv` and `sub.csv` on the SD card, and can be modified at runtime using the `zenoh config` CLI tool.
:::warning
Any changes to the topic mappings require a PX4 system reboot to take effect.
:::
There are two types of mappings you can modify:
- **Publisher mappings**: Forward data from a uORB topic to a Zenoh topic.
- **Subscriber mappings**: Receive data from a Zenoh topic and publish it to a uORB topic.
The main operations and their commands are:
- Publish a uORB topic to a Zenoh topic:
```sh
zenoh config add publisher <zenoh_topic> <uorb_topic> [uorb_instance]
```
- Subscribe to a Zenoh topic and forward it to a uORB topic:
```sh
zenoh config add subscriber <zenoh_topic> <uorb_topic> [uorb_instance]
```
- Remove existing mappings:
```sh
zenoh config delete publisher <zenoh_topic>
zenoh config delete subscriber <zenoh_topic>
```
After modifying the mappings, reboot PX4 to apply the changes.
The updated configuration will be loaded from the SD card during startup.
## Communicating with PX4 from ROS 2 via Zenoh
Once your PX4 FMU is publishing data into ROS 2, you can inspect the available topics and their contents using standard ROS 2 CLI tools:
```sh
ros2 topic listROS 2 话题列表命令)
```
Check topic type and publishers/subscribers:
```sh
ros2 topic info -v /fmu/out/vehicle_status
Type: px4_msgs/msg/VehicleStatus
Publisher count: 1
Node name: px4_aabbcc00000000000000000000000000
Node namespace: /
Topic type: px4_msgs/msg/VehicleStatus
Topic type hash: RIHS01_828bddbb7d4c2aa6ad93757955f6893be1ec5d8f11885ec7715bcdd76b5226c9
Endpoint type: PUBLISHER
GID: 82.99.74.2c.b6.7d.93.44.91.4d.fe.14.93.58.40.16
QoS profile:
Reliability: RELIABLE
History (Depth): KEEP_LAST (7)
Durability: VOLATILE
Lifespan: Infinite
Deadline: Infinite
Liveliness: AUTOMATIC
Liveliness lease duration: Infinite
Subscription count: 0
```
### PX4 ROS 2 Interface with Zenoh
The [PX4 ROS 2 Interface Library](../ros2/px4_ros2_interface_lib.md) works out of the box with Zenoh as a transport backend.
This means you can publish and subscribe to PX4 topics over Zenoh without changing your ROS 2 nodes or dealing with DDS configuration.
For setup details and supported message types, refer to the [PX4 ROS 2 Interface Library](../ros2/px4_ros2_interface_lib.md).
@@ -104,7 +104,7 @@ Source: [drivers/distance_sensor/lightware_laser_i2c](https://github.com/PX4/PX4
### 描述
I2C bus driver for Lightware SFxx series LIDAR rangefinders: SF10/a, SF10/b, SF10/c, SF11/c, SF/LW20.
I2C bus driver for Lightware SFxx series LIDAR rangefinders: SF10/a, SF10/b, SF10/c, SF11/c, SF/LW20, SF30/d.
Setup/usage information: https://docs.px4.io/main/en/sensor/sfxx_lidar.html
+27 -17
View File
@@ -1,29 +1,39 @@
# AirspeedValidated (UORB message)
Validated airspeed
Provides information about airspeed (indicated, true, calibrated) and the source of the data.
Used by controllers, estimators and for airspeed reporting to operator.
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/versioned/AirspeedValidated.msg)
```c
# Validated airspeed
#
# Provides information about airspeed (indicated, true, calibrated) and the source of the data.
# Used by controllers, estimators and for airspeed reporting to operator.
uint32 MESSAGE_VERSION = 1
uint64 timestamp # time since system start (microseconds)
uint64 timestamp # [us] Time since system start
float32 indicated_airspeed_m_s # [m/s] Indicated airspeed (IAS), set to NAN if invalid
float32 calibrated_airspeed_m_s # [m/s] Calibrated airspeed (CAS), set to NAN if invalid
float32 true_airspeed_m_s # [m/s] True airspeed (TAS), set to NAN if invalid
float32 indicated_airspeed_m_s # [m/s] [@invalid NaN] Indicated airspeed (IAS)
float32 calibrated_airspeed_m_s # [m/s] [@invalid NaN] Calibrated airspeed (CAS)
float32 true_airspeed_m_s # [m/s] [@invalid NaN] True airspeed (TAS)
int8 airspeed_source # Source of currently published airspeed values
int8 DISABLED = -1
int8 GROUND_MINUS_WIND = 0
int8 SENSOR_1 = 1
int8 SENSOR_2 = 2
int8 SENSOR_3 = 3
int8 SYNTHETIC = 4
int8 airspeed_source # [@enum SOURCE] Source of currently published airspeed values
int8 SOURCE_DISABLED = -1 # Disabled
int8 SOURCE_GROUND_MINUS_WIND = 0 # Ground speed minus wind
int8 SOURCE_SENSOR_1 = 1 # Sensor 1
int8 SOURCE_SENSOR_2 = 2 # Sensor 2
int8 SOURCE_SENSOR_3 = 3 # Sensor 3
int8 SOURCE_SYNTHETIC = 4 # Synthetic airspeed
# debug states
float32 calibrated_ground_minus_wind_m_s # CAS calculated from groundspeed - windspeed, where windspeed is estimated based on a zero-sideslip assumption, set to NAN if invalid
float32 calibraded_airspeed_synth_m_s # synthetic airspeed in m/s, set to NAN if invalid
float32 airspeed_derivative_filtered # filtered indicated airspeed derivative [m/s/s]
float32 throttle_filtered # filtered fixed-wing throttle [-]
float32 pitch_filtered # filtered pitch [rad]
float32 calibrated_ground_minus_wind_m_s # [m/s] [@invalid NaN] CAS calculated from groundspeed - windspeed, where windspeed is estimated based on a zero-sideslip assumption
float32 calibraded_airspeed_synth_m_s # [m/s] [@invalid NaN] Synthetic airspeed
float32 airspeed_derivative_filtered # [m/s^2] Filtered indicated airspeed derivative
float32 throttle_filtered # [-] Filtered fixed-wing throttle
float32 pitch_filtered # [rad] Filtered pitch
```
@@ -1,42 +1,59 @@
# AutotuneAttitudeControlStatus (UORB message)
Autotune attitude control status
This message is published by the fw_autotune_attitude_control and mc_autotune_attitude_control modules when the user engages autotune,
and is subscribed to by the respective attitude controllers to command rate setpoints.
The rate_sp field is consumed by the controllers, while the remaining fields (model coefficients, gains, filters, and autotune state) are used for logging and debugging.
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/AutotuneAttitudeControlStatus.msg)
```c
uint64 timestamp # time since system start (microseconds)
# Autotune attitude control status
#
# This message is published by the fw_autotune_attitude_control and mc_autotune_attitude_control modules when the user engages autotune,
# and is subscribed to by the respective attitude controllers to command rate setpoints.
#
# The rate_sp field is consumed by the controllers, while the remaining fields (model coefficients, gains, filters, and autotune state) are used for logging and debugging.
float32[5] coeff # coefficients of the identified discrete-time model
float32[5] coeff_var # coefficients' variance of the identified discrete-time model
float32 fitness # fitness of the parameter estimate
float32 innov
float32 dt_model
uint64 timestamp # [us] Time since system start
float32 kc
float32 ki
float32 kd
float32 kff
float32 att_p
float32[5] coeff # [-] Coefficients of the identified discrete-time model
float32[5] coeff_var # [-] Coefficients' variance of the identified discrete-time model
float32 fitness # [-] Fitness of the parameter estimate
float32 innov # [rad/s] Innovation (residual error between model and measured output)
float32 dt_model # [s] Model sample time used for identification
float32[3] rate_sp
float32 u_filt
float32 y_filt
float32 kc # [-] Proportional rate-loop gain (ideal form)
float32 ki # [-] Integral rate-loop gain (ideal form)
float32 kd # [-] Derivative rate-loop gain (ideal form)
float32 kff # [-] Feedforward rate-loop gain
float32 att_p # [-] Proportional attitude gain
uint8 STATE_IDLE = 0
uint8 STATE_INIT = 1
uint8 STATE_ROLL = 2
uint8 STATE_ROLL_PAUSE = 3
uint8 STATE_PITCH = 4
uint8 STATE_PITCH_PAUSE = 5
uint8 STATE_YAW = 6
uint8 STATE_YAW_PAUSE = 7
uint8 STATE_VERIFICATION = 8
uint8 STATE_APPLY = 9
uint8 STATE_TEST = 10
uint8 STATE_COMPLETE = 11
uint8 STATE_FAIL = 12
uint8 STATE_WAIT_FOR_DISARM = 13
float32[3] rate_sp # [rad/s] Rate setpoint commanded to the attitude controller.
uint8 state
float32 u_filt # [-] Filtered input signal (normalized torque setpoint) used in system identification.
float32 y_filt # [rad/s] Filtered output signal (angular velocity) used in system identification.
uint8 state # [@enum STATE] Current state of the autotune procedure.
uint8 STATE_IDLE = 0 # Idle (not running)
uint8 STATE_INIT = 1 # Initialize filters and setup
uint8 STATE_ROLL_AMPLITUDE_DETECTION = 2 # FW only: determine required excitation amplitude (roll)
uint8 STATE_ROLL = 3 # Roll-axis excitation and model identification
uint8 STATE_ROLL_PAUSE = 4 # Pause to return to level flight
uint8 STATE_PITCH_AMPLITUDE_DETECTION = 5 # FW only: determine required excitation amplitude (pitch)
uint8 STATE_PITCH = 6 # Pitch-axis excitation and model identification
uint8 STATE_PITCH_PAUSE = 7 # Pause to return to level flight
uint8 STATE_YAW_AMPLITUDE_DETECTION = 8 # FW only: determine required excitation amplitude (yaw)
uint8 STATE_YAW = 9 # Yaw-axis excitation and model identification
uint8 STATE_YAW_PAUSE = 10 # Pause to return to level flight
uint8 STATE_VERIFICATION = 11 # Verify model and candidate gains
uint8 STATE_APPLY = 12 # Apply gains
uint8 STATE_TEST = 13 # Test gains in closed-loop
uint8 STATE_COMPLETE = 14 # Tuning completed successfully
uint8 STATE_FAIL = 15 # Tuning failed (model invalid or controller unstable)
uint8 STATE_WAIT_FOR_DISARM = 16 # Waiting for disarm before finalizing
```
@@ -24,5 +24,6 @@ int8[16] actuator_saturation # Indicates actuator saturation status.
# Note 2: an actuator with limited dynamics can be indicated as upper-saturated even if it as not reached its maximum value.
uint16 handled_motor_failure_mask # Bitmask of failed motors that were removed from the allocation / effectiveness matrix. Not necessarily identical to the report from FailureDetector
uint16 motor_stop_mask # Bitmaks of motors stopped by failure injection
```
+2 -1
View File
@@ -54,8 +54,9 @@ bool cs_valid_fake_pos # 41 - true if a valid constant position is bein
bool cs_constant_pos # 42 - true if the vehicle is at a constant position
bool cs_baro_fault # 43 - true when the current baro has been declared faulty and is no longer being used
bool cs_gnss_vel # 44 - true if GNSS velocity measurement fusion is intended
bool cs_gnss_fault # 45 - true if GNSS measurements have been declared faulty and are no longer used
bool cs_gnss_fault # 45 - true if GNSS true if GNSS measurements (lat, lon, vel) have been declared faulty
bool cs_yaw_manual # 46 - true if yaw has been set manually
bool cs_gnss_hgt_fault # 47 - true if GNSS true if GNSS measurements (alt) have been declared faulty
# fault status
uint32 fault_status_changes # number of filter fault status (fs) changes
@@ -17,5 +17,6 @@ bool fd_motor
float32 imbalanced_prop_metric # Metric of the imbalanced propeller check (low-passed)
uint16 motor_failure_mask # Bit-mask with motor indices, indicating critical motor failures
uint16 motor_stop_mask # Bitmaks of motors stopped by failure injection
```
@@ -14,6 +14,9 @@ uint16 DEVICE_FLAGS_NEUTRAL = 2
uint16 DEVICE_FLAGS_ROLL_LOCK = 4
uint16 DEVICE_FLAGS_PITCH_LOCK = 8
uint16 DEVICE_FLAGS_YAW_LOCK = 16
uint16 DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32
uint16 DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64
float32[4] q
float32 angular_velocity_x
+19
View File
@@ -0,0 +1,19 @@
# SensorGnssStatus (UORB message)
Gnss quality indicators
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/SensorGnssStatus.msg)
```c
# Gnss quality indicators
uint64 timestamp # time since system start (microseconds)
uint32 device_id # unique device ID for the sensor that does not change between power cycles
bool quality_available # Set to true if quality indicators are available
uint8 quality_corrections # Corrections quality from 0 to 10, or 255 if not available
uint8 quality_receiver # Overall receiver operating status from 0 to 10, or 255 if not available
uint8 quality_gnss_signals # Quality of GNSS signals from 0 to 10, or 255 if not available
uint8 quality_post_processing # Expected post processing quality from 0 to 10, or 255 if not available
```
+29 -11
View File
@@ -38,18 +38,26 @@ float32 vdop # Vertical dilution of precision
int32 noise_per_ms # GPS noise per millisecond
uint16 automatic_gain_control # Automatic gain control monitor
uint8 JAMMING_STATE_UNKNOWN = 0
uint8 JAMMING_STATE_OK = 1
uint8 JAMMING_STATE_WARNING = 2
uint8 JAMMING_STATE_CRITICAL = 3
uint8 jamming_state # indicates whether jamming has been detected or suspected by the receivers. O: Unknown, 1: OK, 2: Warning, 3: Critical
int32 jamming_indicator # indicates jamming is occurring
uint8 JAMMING_STATE_UNKNOWN = 0 #default
uint8 JAMMING_STATE_OK = 1
uint8 JAMMING_STATE_MITIGATED = 2
uint8 JAMMING_STATE_DETECTED = 3
uint8 jamming_state # indicates whether jamming has been detected or suspected by the receivers. O: Unknown, 1: OK, 2: Mitigated, 3: Detected
int32 jamming_indicator # indicates jamming is occurring
uint8 SPOOFING_STATE_UNKNOWN = 0
uint8 SPOOFING_STATE_NONE = 1
uint8 SPOOFING_STATE_INDICATED = 2
uint8 SPOOFING_STATE_MULTIPLE = 3
uint8 spoofing_state # indicates whether spoofing has been detected or suspected by the receivers. O: Unknown, 1: OK, 2: Warning, 3: Critical
uint8 SPOOFING_STATE_UNKNOWN = 0 #default
uint8 SPOOFING_STATE_OK = 1
uint8 SPOOFING_STATE_MITIGATED = 2
uint8 SPOOFING_STATE_DETECTED = 3
uint8 spoofing_state # indicates whether spoofing has been detected or suspected by the receivers. O: Unknown, 1: OK, 2: Mitigated, 3: Detected
# Combined authentication state (e.g. Galileo OSNMA)
uint8 AUTHENTICATION_STATE_UNKNOWN = 0 #default
uint8 AUTHENTICATION_STATE_INITIALIZING = 1
uint8 AUTHENTICATION_STATE_ERROR = 2
uint8 AUTHENTICATION_STATE_OK = 3
uint8 AUTHENTICATION_STATE_DISABLED = 4
uint8 authentication_state # GPS signal authentication state
float32 vel_m_s # GPS ground speed, (metres/sec)
float32 vel_n_m_s # GPS North velocity, (metres/sec)
@@ -63,6 +71,16 @@ uint64 time_utc_usec # Timestamp (microseconds, UTC), this is the timestamp whi
uint8 satellites_used # Number of satellites used
uint32 SYSTEM_ERROR_OK = 0 #default
uint32 SYSTEM_ERROR_INCOMING_CORRECTIONS = 1
uint32 SYSTEM_ERROR_CONFIGURATION = 2
uint32 SYSTEM_ERROR_SOFTWARE = 4
uint32 SYSTEM_ERROR_ANTENNA = 8
uint32 SYSTEM_ERROR_EVENT_CONGESTION = 16
uint32 SYSTEM_ERROR_CPU_OVERLOAD = 32
uint32 SYSTEM_ERROR_OUTPUT_CONGESTION = 64
uint32 system_error # General errors with the connected GPS receiver
float32 heading # heading angle of XYZ body frame rel to NED. Set to NaN if not available and updated (used for dual antenna GPS), (rad, [-PI, PI])
float32 heading_offset # heading offset of dual antenna array in body frame. Set to NaN if not applicable. (rad, [-PI, PI])
float32 heading_accuracy # heading accuracy (rad, [0, 2PI])
+26 -23
View File
@@ -1,41 +1,44 @@
# VehicleOdometry (UORB message)
Vehicle odometry data. Fits ROS REP 147 for aerial vehicles
Vehicle odometry data
Fits ROS REP 147 for aerial vehicles
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/versioned/VehicleOdometry.msg)
```c
# Vehicle odometry data. Fits ROS REP 147 for aerial vehicles
# Vehicle odometry data
#
# Fits ROS REP 147 for aerial vehicles
uint32 MESSAGE_VERSION = 0
uint64 timestamp # time since system start (microseconds)
uint64 timestamp_sample
uint64 timestamp # [us] Time since system start
uint64 timestamp_sample # [us] Timestamp sample
uint8 POSE_FRAME_UNKNOWN = 0
uint8 POSE_FRAME_NED = 1 # NED earth-fixed frame
uint8 POSE_FRAME_FRD = 2 # FRD world-fixed frame, arbitrary heading reference
uint8 pose_frame # Position and orientation frame of reference
uint8 pose_frame # [@enum POSE_FRAME] Position and orientation frame of reference
uint8 POSE_FRAME_UNKNOWN = 0 # Unknown frame
uint8 POSE_FRAME_NED = 1 # North-East-Down (NED) navigation frame. Aligned with True North.
uint8 POSE_FRAME_FRD = 2 # Forward-Right-Down (FRD) frame. Constant arbitrary heading offset from True North. Z is down.
float32[3] position # Position in meters. Frame of reference defined by local_frame. NaN if invalid/unknown
float32[4] q # Quaternion rotation from FRD body frame to reference frame. First value NaN if invalid/unknown
float32[3] position # [m] [@frame local frame] [@invalid NaN If invalid/unknown] Position. Origin is position of GC at startup.
float32[4] q # [-] [@invalid NaN First value if invalid/unknown] Attitude (expressed as a quaternion) relative to pose reference frame at current location. Follows the Hamiltonian convention (w, x, y, z, right-handed, passive rotations from body to world)
uint8 VELOCITY_FRAME_UNKNOWN = 0
uint8 VELOCITY_FRAME_NED = 1 # NED earth-fixed frame
uint8 VELOCITY_FRAME_FRD = 2 # FRD world-fixed frame, arbitrary heading reference
uint8 VELOCITY_FRAME_BODY_FRD = 3 # FRD body-fixed frame
uint8 velocity_frame # Reference frame of the velocity data
uint8 velocity_frame # [@enum VELOCITY_FRAME] Reference frame of the velocity data
uint8 VELOCITY_FRAME_UNKNOWN = 0 # Unknown frame
uint8 VELOCITY_FRAME_NED = 1 # NED navigation frame at current position.
uint8 VELOCITY_FRAME_FRD = 2 # FRD navigation frame at current position. Constant arbitrary heading offset from True North. Z is down.
uint8 VELOCITY_FRAME_BODY_FRD = 3 # FRD body-fixed frame
float32[3] velocity # Velocity in meters/sec. Frame of reference defined by velocity_frame variable. NaN if invalid/unknown
float32[3] velocity # [m/s] [@frame @velocity_frame] [@invalid NaN If invalid/unknown] Velocity.
float32[3] angular_velocity # [rad/s] [@frame @VELOCITY_FRAME_BODY_FRD] [@invalid NaN If invalid/unknown] Angular velocity in body-fixed frame
float32[3] angular_velocity # Angular velocity in body-fixed frame (rad/s). NaN if invalid/unknown
float32[3] position_variance # [m^2] Variance of position error
float32[3] orientation_variance # [rad^2] Variance of orientation/attitude error (expressed in body frame)
float32[3] velocity_variance # [m^2/s^2] Variance of velocity error
float32[3] position_variance
float32[3] orientation_variance
float32[3] velocity_variance
uint8 reset_counter
int8 quality
uint8 reset_counter # [-] Reset counter. Counts reset events on attitude, velocity and position.
int8 quality # [-] [@invalid 0] Quality. Unused.
# TOPICS vehicle_odometry vehicle_mocap_odometry vehicle_visual_odometry
# TOPICS estimator_odometry
+4 -3
View File
@@ -15,7 +15,7 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
- [ActuatorMotors](ActuatorMotors.md) — Motor control message
- [ActuatorServos](ActuatorServos.md) — Servo control message
- [AirspeedValidated](AirspeedValidated.md)
- [AirspeedValidated](AirspeedValidated.md) — Validated airspeed
- [ArmingCheckReply](ArmingCheckReply.md) — Arming check reply
- [ArmingCheckRequest](ArmingCheckRequest.md) — Arming check request
- [BatteryStatus](BatteryStatus.md) — Battery status
@@ -70,7 +70,7 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
- [VehicleLandDetected](VehicleLandDetected.md)
- [VehicleLocalPosition](VehicleLocalPosition.md) — Fused local position in NED.
The coordinate system origin is the vehicle position at the time when the EKF2-module was started.
- [VehicleOdometry](VehicleOdometry.md) — Vehicle odometry data. Fits ROS REP 147 for aerial vehicles
- [VehicleOdometry](VehicleOdometry.md) — Vehicle odometry data
- [VehicleRatesSetpoint](VehicleRatesSetpoint.md)
- [VehicleStatus](VehicleStatus.md) — Encodes the system state of the vehicle published by commander
- [VtolVehicleStatus](VtolVehicleStatus.md) — VEHICLE_VTOL_STATE, should match 1:1 MAVLinks's MAV_VTOL_STATE
@@ -87,7 +87,7 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
- [AdcReport](AdcReport.md)
- [Airspeed](Airspeed.md) — Airspeed data from sensors
- [AirspeedWind](AirspeedWind.md) — Wind estimate (from airspeed_selector)
- [AutotuneAttitudeControlStatus](AutotuneAttitudeControlStatus.md)
- [AutotuneAttitudeControlStatus](AutotuneAttitudeControlStatus.md) — Autotune attitude control status
- [BatteryInfo](BatteryInfo.md) — Battery information
- [ButtonEvent](ButtonEvent.md)
- [CameraCapture](CameraCapture.md)
@@ -246,6 +246,7 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
change with board revisions and sensor updates.
- [SensorCorrection](SensorCorrection.md) — Sensor corrections in SI-unit form for the voted sensor
- [SensorGnssRelative](SensorGnssRelative.md) — GNSS relative positioning information in NED frame. The NED frame is defined as the local topological system at the reference station.
- [SensorGnssStatus](SensorGnssStatus.md) — Gnss quality indicators
- [SensorGps](SensorGps.md) — GPS position in WGS84 coordinates.
the field 'timestamp' is for the position & velocity (microseconds)
- [SensorGyro](SensorGyro.md)
+24 -24
View File
@@ -248,7 +248,7 @@ private:
};
```
- `[1]`: 首先创建一个从 [`px4_ros2:::ModeBase`](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1ModeBase.html)继承的类。
- `[1]`: 首先创建一个从 [`px4_ros2::ModeBase`](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1ModeBase.html)继承的类。
- `[2]`: 在构造函数中,我们传递模式名称。 这也使我们能够配置一些其他内容,例如替换飞行控制器的内置模式。
- `[3]`:我们在此处创建后续想要使用的所有对象。
这可以是 RC 输入、设置点类型(s)或遥测数据。 `*this` 作为`Context`传递给每个对象,将对象与模式联系起来。
@@ -347,7 +347,7 @@ private:
- [MulticopterGotoSetpointType](#go-to-setpoint-multicoptergotosetpointtype): <Badge type="warning" text="MC only" /> 平滑的位置控制以及(可选的)航向控制
- [FwLateralLongitudinalSetpointType](#fixed-wing-lateral-and-longitudinal-setpoint-fwlaterallongitudinalsetpointtype): <Badge type="warning" text="FW only" /> <Badge type="tip" text="main (planned for: PX4 v1.17)" /> 对横向和纵向固定翼动态的直接控制
- [DirectActuatorsSetpointType](#direct-actuator-control-setpoint-directactuatorssetpointtype):直接控制发动机和飞行地面servo setpoints
- [Rover Setpoints](#rover-setpoints): <Badge type="tip" text="main (planned for: PX4 v1.17)" /> Direct access to rover control setpoints (Position, Speed, Attitude, Rate, Throttle and Steering).
- [Rover Setpoints](#rover-setpoints): <Badge type="tip" text="main (planned for: PX4 v1.17)" />直接访问火星车控制设定值(位置、速度、姿态、速率、油门和转向)。
:::tip
其他设置点类型目前是实验性的,可在以下网址找到:[px4_ros2/control/setpoint_types/experimental](https://github.com/Auterion/px4-ros2-interface-lib/tree/main/px4_ros2_cpp/include/px4_ros2/control/setpoint_types/experimental)。
@@ -365,10 +365,10 @@ private:
当前,此设定点类型仅支持多旋翼飞行器。
:::
可通过[`px4_ros2::MulticopterGotoSetpointType`](https://github.com/Auterion/px4-ros2-interface-lib/blob/main/px4_ros2_cpp/include/px4_ros2/control/setpoint_types/multicopter/goto.hpp)设定点类型,对位置设定点以及(可选的)航向设定点进行平滑控制。
可通过[`px4_ros2::MulticopterGotoSetpointType`](https://github.com/Auterion/px4-ros2-interface-lib/blob/main/px4_ros2_cpp/include/px4_ros2/control/setpoint_types/multicopter/goto.hpp) 设定点类型,对位置设定点以及(可选的)航向设定点进行平滑控制。
设定点类型会被传输至飞控主模块(FMU),该模块基于采用时间最优、最大加加速度轨迹构建的位置及航向平滑器。
还有一个 [\`px4_ros2::MulticopterGotoGlobalSetpootType'(https://github.com/Auterion/px4-ros2-interface-lib/blob/main/px4_ros2_cpp/include/px4_ros2/control/setpoint_types/multicopter/goto.hpp) 该类支持在全局坐标系下发送设定点。
还有一个 [`px4_ros2::MulticopterGotoGlobalSetpointType`](https://github.com/Auterion/px4-ros2-interface-lib/blob/main/px4_ros2_cpp/include/px4_ros2/control/setpoint_types/multicopter/goto.hpp), 该类支持在全局坐标系下发送设定点。
最简单的用法就是直接向update method中输入一个3D 位置
@@ -421,7 +421,7 @@ _goto_setpoint->update(
:::
使用[`px4_ros2::FwLateralLongitudinalSetpointType`](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1FwLateralLongitudinalSetpointType.html)直接控制固定翼飞行器的横向与纵向动力学特性,即分别控制其侧向运动(转弯 / 倾斜)和前向 / 垂直运动(加速及爬升 / 下降)。
这个设置点被传输到 PX4 [_FwLateralLongitudinalControl_module](../modules/modules_controller.md#fw-lat-lon-control),该模块会对横向与纵向输入进行解耦处理,同时确保不超出飞行器的各项限制范围。
这个设置点被传输到 PX4 [_FwLateralLongitudinalControl_ module](../modules/modules_controller.md#fw-lat-lon-control),该模块会对横向与纵向输入进行解耦处理,同时确保不超出飞行器的各项限制范围。
为了控制载具,必须提供至少一个横向**和**一个纵向设定值:
@@ -513,7 +513,7 @@ _fw_lateral_longitudinal_sett->upate(settpoint_
##### 高级配置(可选)
你还可以传递一个[`FwControlConfiguration`](https://auterion.github.io/px4-ros2-interface-lib/structpx4__ros2_1_1FwControlConfiguration.html) 结构体以及设定值,以覆盖默认的控制器设置和约束条件,例如俯仰角限制、油门限制以及目标下降 / 爬升速率。
你还可以传递一个[`FwControlConfiguration`](https://auterion.github.io/px4-ros2-interface-lib/structpx4__ros2_1_1FwControlConfiguration.html)结构体以及设定值,以覆盖默认的控制器设置和约束条件,例如俯仰角限制、油门限制以及目标下降 / 爬升速率。
这是针对高级用户的:
```cpp
@@ -535,44 +535,44 @@ _fw_lateral_longitudinal_setpoint->update(setpoint_s, config_s);
所有配置字段都定义为 `std::optional<float>`
未设置的值将默认采用 PX4 的配置。
更多关于配置选项的信息,请参阅 [LateralControlConfiguration](../msg_docs/LateralControlConfiguration.md) 和 [FixedWingLongitudinalConfiguration](../msg_docs/LongitudinalControlConfiguration.md)。
更多关于配置选项的信息,请参阅 [LateralControlConfiguration](../msg_docs/LateralControlConfiguration.md)和 [FixedWingLongitudinalConfiguration](../msg_docs/LongitudinalControlConfiguration.md)。
:::info
为保障安全,PX4 会自动将配置值限制在飞行器的约束范围内。
例如,油门覆盖值会被限制在[`FW_THR_MIN`](../advanced_config/parameter_reference.md#FW_THR_MIN)
[`FW_THR_MAX`](../advanced_config/parameter_reference.md#FW_THR_MAX)之间。
例如,油门覆盖值会被限制在 [`FW_THR_MIN`](../advanced_config/parameter_reference.md#FW_THR_MIN)
和[`FW_THR_MAX`](../advanced_config/parameter_reference.md#FW_THR_MAX)之间。
:::
#### 直接执行器控制设定点(DirectActuatorsSetpointType
可以使用 [px4_ros2::DirectActActorsSetpootType](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1DirectActuatorsSetpointType.html) 设置点类型直接控制执行器。
可以使用 [px4_ros2::DirectActuatorsSetpointType](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1DirectActuatorsSetpointType.html) 设置点类型直接控制执行器。
电机和舵机可独立设置。
请注意,该分配(设置 / 指派)具有载具和配置特定性。
例如,要控制一架四旋翼飞行器,你需要根据其 [输出配置] (../concept/control_allocation.md )来设置前 4 个电机。
例如,要控制一架四旋翼飞行器,你需要根据其 [输出配置] (../concept/control_allocation.md)来设置前 4 个电机。
:::info
若你想控制的执行器并非用于控制飞行器的运动(例如,而是用于控制有效载荷舵机),请参阅 [below](#controlling-an-independent-actuator-servo)。
:::
#### Rover Setpoints
#### Rover 设置点
<Badge type="tip" text="main (planned for: PX4 v1.17)" /> <Badge type="warning" text="Experimental" />
The rover modules use a hierarchical structure to propagate setpoints:
滚动模块使用层次结构来传播设置点:
![Rover Control Structure](../../assets/middleware/ros2/px4_ros2_interface_lib/rover_control_structure.svg)
:::info
The "highest" setpoint that is provided will be used within the PX4 rover modules to generate the setpoints that are below it (Overriding them!).
With this hierarchy there are clear rules for providing a valid control input:
所提供的“highest”设定值将被用于 PX4 机器人模块中,以生成低于该值的设定值(并对其进行覆盖!)。
这个层次结构有提供有效控制输入的明确规则:
- Provide a position setpoint, **or**
- One of the setpoints on the "left" (speed **or** throttle) **and** one of the setpoints on the "right" (attitude, rate **or** steering). All combinations of "left" and "right" setpoints are valid.
- 提供一个位置集点,**or**
- “左”上的设置点之一(速度 **** 节点) **** “右”上的设置点之一(态度、速率 **** 节点)。 所有“左”和“右”设置点的组合都是有效的。
For ease of use we expose these valid combinations as new SetpointTypes.
为了便于使用,我们以新的 SettpointType 的形式揭示这些有效的组合。
:::
The RoverSetpointTypes exposed through the control interface are combinations of these setpoints that lead to a valid control input:
通过控制界面暴露的 RoverSetpointTypes 是这些设置点的组合,导致有效的控制输入:
| SetpointType | 安装位置 | Speed | 油门 | Attitude | 频率 | Steering | Control Flags |
| ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------------ |
@@ -584,9 +584,9 @@ The RoverSetpointTypes exposed through the control interface are combinations of
| [RoverThrottleRate](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1RoverThrottleRateSetpointType.html) | | | &check; | | &check; | (&check;) | Rate, Control Allocation |
| [RoverThrottleSteering](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1RoverThrottleSteeringSetpointType.html) | | | &check; | | | &check; | Control Allocation |
&check; are the setpoints we publish, and (&check;) are generated internally by the PX4 rover modules according to the hierarchy above.
&check; 是我们发布的设置点,(&check;) 是根据上面的层次结构由 PX4 旋转模块内部生成的。
An example for a rover specific drive mode using the `RoverSpeedAttitudeSetpointType` is provided [here](https://github.com/Auterion/px4-ros2-interface-lib/tree/main/examples/cpp/modes/rover_velocity).
使用 `RoverSpeedAttitude SettpointType` 的特定驱动器模式示例为 [here](https://github.com/Auterion/px4-ros2-interface-lib/tree/main/examples/cpp/modes/rover_velocity)
### 控制VTOL
@@ -594,8 +594,8 @@ An example for a rover specific drive mode using the `RoverSpeedAttitudeSetpoint
要在外部飞行模式下控制VTOL,需确保根据当前飞行配置返回正确的设定值类型:
- 多旋翼模式:使用与多旋翼控制兼容的设定值类型。 例如:要么[`MulticopterGotoSetpootType`](#go-to-setpoint-multicoptergotosetpointtype) 要么[`TrattorySettpointType`](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1TrajectorySetpointType.html)。
- 固定翼形模式:使用 [`FwLateralLongitudinalSetpointType` ](#fixed-wing-lateral-and-longitudinal-setpoint-fwlaterallongitudinalsetpointtype)。
- 多旋翼模式:使用与多旋翼控制兼容的设定值类型。 例如:要么[`MulticopterGotoSetpointType`](#go-to-setpoint-multicoptergotosetpointtype)要么[`TrajectorySetpointType`](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1TrajectorySetpointType.html)。
- 固定翼形模式:使用 [`FwLateralLongitudinalSetpointType`](#fixed-wing-lateral-and-longitudinal-setpoint-fwlaterallongitudinalsetpointtype)。
只要VTOL在整个外部模式期间始终处于多旋翼模式或固定翼模式中的任意一种,就无需额外处理。
@@ -630,7 +630,7 @@ An example for a rover specific drive mode using the `RoverSpeedAttitudeSetpoint
要查询载具的当前状态,可在 px4_ros2::VTOL 对象上调用 getCurrentState() 方法。
请参阅[此外部飞行模式实现](https://github.com/Auterion/px4-ros2-interface-lib/tree/main/examples/cpp/modes/vtol)有关如何使用此 API 的实际示例。
请参阅[此外部飞行模式实现](https://github.com/Auterion/px4-ros2-interface-lib/tree/main/examples/cpp/modes/vtol) 有关如何使用此 API 的实际示例。
### 控制独立执行器/Servo
+1 -1
View File
@@ -36,7 +36,7 @@ There are some benefits and drawbacks to using ROS-based missions, which are pro
- QGroundControl currently does not display the mission or progress during execution, and cannot upload or download a mission.
Therefore you will need another mechanism to provide a mission, such as from a web server, a custom GCS, or by generating it directly inside the application.
- The current implementation only supports multicopters (it uses the [GotoSetpointType](../ros2/px4_ros2_control_interface.md#go-to-setpoint-gotosetpointtype), which only works for multicopters, and VTOL in MC mode).
- The current implementation only supports multicopters (it uses the [GotoSetpointType](../ros2/px4_ros2_control_interface.md#go-to-setpoint-multicoptergotosetpointtype), which only works for multicopters, and VTOL in MC mode).
It is designed to be extendable to any other vehicle type.
## 综述
+9 -9
View File
@@ -9,7 +9,7 @@ ROS 2-PX4 架构在ROS 2和PX4之间进行了深度整合。 允许 ROS 2 订阅
[migration guide](../middleware/uxrce_dds.md#fast-rtps-to-uxrce-dds-migration-guidelines) 解释您需要做什么来将ROS2 应用程序从 PX4 v1.13 迁移到 PX4 v1.14。
如果您仍然在 PX4 v1.13 上工作,请按照[PX4 v1.13 文档](https://docs.px4.io/v1.13/en/ros/ros2_comm.html)中的说明操作。
如果您仍然在 PX4 v1.13 上工作,请按照[PX4 v1.13 Docs](https://docs.px4.io/v1.13/en/ros/ros2_comm.html)中的说明操作。
<!-- remove this when there are PX4 v1.14 docs for some months -->
@@ -17,17 +17,17 @@ ROS 2-PX4 架构在ROS 2和PX4之间进行了深度整合。 允许 ROS 2 订阅
## 综述
得益于 uXRCE-DDS(../middleware/uxrce_dds.md) 通信中间件的使用,ROS 2 的应用流程非常简单直接。
得益于 [uXRCE-DDS](../middleware/uxrce_dds.md) 通信中间件的使用,ROS 2 的应用流程非常简单直接。
![Architecture uXRCE-DDS with ROS 2](../../assets/middleware/xrce_dds/architecture_xrce-dds_ros2.svg)
<!-- doc source: https://docs.google.com/drawings/d/1WcJOU-EcVOZRPQwNzMEKJecShii2G4U3yhA3U6C4EhE/edit?usp=sharing -->
uXRCE-DDS 中间件由两部分组成:一部分是运行在 PX4 上的客户端,另一部分是运行在伴飞计算机上的代理;二者之间通过串口、UDP、TCP或自定义链路进行双向数据交换。
uXRCE-DDS 中间件由两部分组成:一部分是运行在 PX4 上的客户端,另一部分是运行在机载计算机上的代理;二者之间通过串口、UDP、TCP或自定义链路进行双向数据交换。
代理充当客户端的代理角色,以便在全局 DDS 数据空间中发布和订阅主题。
PX4 [uxrce_dds_client](../modules/modules_system.md#uxrce-dds-client) 是在构建时生成,并且默认包含在 PX4 固件中。
它包含“通用”XRCE-DDS客户端代码和它用来发布到/来自uORB主题的 PX4 特定转换代码。
它包含“通用”XRCE-DDS客户端代码和它用来发布到来自uORB主题的 PX4 特定转换代码。
生成到客户端中的 uORB 消息子集在 [dds_topics.yaml](../middleware/dds_topics.md)中说明。
生成器使用源代码树中的 uORB 消息定义:[PX4-Autopilot/msg](https://github.com/PX4/PX4-Autopilot/tree/main/msg) 用于生成发送 ROS 2 消息的代码。
@@ -38,7 +38,7 @@ ROS 2 应用程序需要在一个工作空间中构建,该工作空间需包
这需要[ROS 2 Message Translation Node](../ros2/px4_ros2_msg_translation_node.md)运行ROS 2 消息转换节点,以确保消息能够正确转换和交互。
需要注意的是,微型XRCE-DDS _agent_ 本身并不依赖客户端代码。
它可以从 [source](https://github.com/eProsima/Micro-XRCE-DDS-Agent中单独构建,或者作为ROS构建的一部分,或者作为snap包安装。
它可以从 [source](https://github.com/eProsima/Micro-XRCE-DDS-Agent) 中单独构建,或者作为ROS构建的一部分,或者作为snap包安装。
在使用 ROS 2 时,您通常需要同时启动客户端和代理。
需要注意的是,uXRCE-DDS 客户端默认已内置到固件中,但除仿真器构建版本外,不会自动启动。
@@ -72,7 +72,7 @@ ROS 2 应用程序需要在一个工作空间中构建,该工作空间需包
若要使用该仿真器,你需要安装 PX4 开发工具链。
:::info
唯一依赖于ROS2的 PX4 是一组信息定义,它从 [px4_msgs](https://github.com/PX4/px4_msgs)获取。
唯一依赖于ROS2的 PX4 是一组信息定义,它从[px4_msgs](https://github.com/PX4/px4_msgs)获取。
您只需要安装 PX4 当您需要模拟器时(如我们在本指南中所做的那样), 或者如果您正在创建一个发布自定义uORB主题的构建。
:::
@@ -313,7 +313,7 @@ px4_msgs 代码仓库中的分支均以特定名称命名,这些名称与不
换句话说,它会让刚刚构建好的可执行文件在当前终端中可用。
:::info
[ROS2 beginner tutorials](https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html#source-the-overlay)建议您 _open a new terminal_来运行您的可执行文件。
[ROS2 初学者教程](https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html#source-the-overlay)建议您_打开一个新的终端来运行您的可执行文件。
:::
在新终端中:
@@ -493,7 +493,7 @@ uXRCE-DDS 客户端的时间同步器随后会将 ROS 2 端的操作系统时钟
#### ROS2 节点使用 Gazebo 时钟作为时间源
在这种情况下,ROS2还使用Gazebo\`/时钟主题作为时间来源。
若 Gazebo 仿真的实时因子real time factor不为 1,或 ROS 2 需直接与 Gazebo 交互,则该方法具有合理性。
若 Gazebo 仿真的实时因子不为 1,或 ROS 2 需直接与 Gazebo 交互,则该方法具有合理性。
在 ROS 2 端,可通过[ros_gz](https://github.com/gazebosim/ros_gz)代码仓库中的[ros_gz_bridge](https://github.com/gazebosim/ros_gz) 功能包,实现与 Gazebo 的直接交互。
请使用以下命令,为 PX4 所支持的 ROS 2 和 Gazebo 版本安装正确的 ROS 2/gz 接口功能包(不仅限于桥接功能包)。
@@ -512,7 +512,7 @@ sudo apt install ros-humble-ros-gzharmonic
:::tab foxy
首先,您需要 [install Gazebo Garden](../sim_gazebo_gz/index.md#installation-ubuntu-linux),因为默认情况下,Foxy预装的是 Gazebo Classic 11 <!-- note, garden is EOL Nov 2024 -->
接下来,若要在 Ubuntu 20.04 系统上安装用于搭配 ROS 2 "Foxy"与 Gazebo的接功能包,操作如下:
接下来,若要在 Ubuntu 20.04 系统上安装用于搭配 ROS 2 "Foxy"与 Gazebo的接功能包,操作如下:
```sh
sudo apt install ros-foxy-ros-gzgarden
@@ -9,6 +9,7 @@ However PX4 can also use some INS devices as either sources of raw data, or as a
INS systems that can be used as a replacement for EKF2 in PX4:
- [InertialLabs](../sensor/inertiallabs.md)
- [MicroStrain](../sensor/microstrain.md): Includes VRU, AHRS, INS, and GNSS/INS devices.
- [SBG Systems](../sensor/sbgecom.md): IMU/AHRS, GNSS/INS, Dual GNSS/INS systems that can be used as an external INS or as a source of raw sensor data.
- [VectorNav](../sensor/vectornav.md): IMU/AHRS, GNSS/INS, Dual GNSS/INS systems that can be used as an external INS or as a source of raw sensor data.
+219
View File
@@ -0,0 +1,219 @@
# MicroStrain (INS, IMU, VRU, AHRS)
MicroStrain by HBK provides high-performance inertial sensors engineered for reliability and precision in challenging environments.
Widely used across industries like aerospace, robotics, industrial automation, and research, MicroStrain sensors are optimized for real-time, accurate motion tracking and orientation data.
![CV7](../../assets/hardware/sensors/inertial/microstrain_3dm_cv7_hbk.png)
The driver currently supports the following hardware:
- [`MicroStrain CV7-AR`](https://www.hbkworld.com/en/products/transducers/inertial-sensors/vertical-reference-units--vru-/3dm-cv7-ar): Inertial Measurement Unit (IMU) and Vertical Reference Unit (VRU)
- [`MicroStrain CV7-AHRS`](https://www.hbkworld.com/en/products/transducers/inertial-sensors/attitude-and-heading-reference-systems--ahrs-/3dm-cv7-ahrs): Inertial Measurement Unit (IMU) and Attitude Heading Reference System (AHRS)
- [`MicroStrain CV7-INS`](https://www.hbkworld.com/en/products/transducers/inertial-sensors/inertial-navigation-systems--ins-/3dm-cv7-ins): Inertial Measurement Unit (IMU) and Inertial Navigation System (INS).
- [`MicroStrain CV7-GNSS/INS`](https://www.hbkworld.com/en/products/transducers/inertial-sensors/inertial-navigation-systems--ins-/3dm-cv7-gnss-ins): Inertial Measurement Unit (IMU) and Inertial Navigation System (INS) combined with dual multiband (GNSS) receivers.
PX4 can use these sensors to provide raw IMU data for EKF2 or to replace EKF2 as an external INS.
For more information, including user manuals and datasheets, please refer to the sensors product page.
## 购买渠道
MicroStrain sensors can be purchased through HBK's official [MicroStrain product page](https://www.hbkworld.com/en/products/transducers/inertial-sensors) or through authorized distributors globally.
For large orders, custom requirements, or technical inquiries, reach out directly to [sales](https://www.hbkworld.com/en/contact-us/contact-sales-microstrain)
## 硬件安装
### 布线
Connect the main UART port of the MicroStrain sensor to any unused serial port on the flight controller.
This port needs to be specified while starting the device.
### Mounting
The MicroStrain sensor can be mounted in any orientation.
The default coordinate system uses X for the front, Y for the right, and Z for down, with directions marked on the device.
## Firmware Configuration
### PX4 配置
To use the MicroStrain driver:
1. Include the module in firmware in the [kconfig board configuration](../hardware/porting_guide_config.md#px4-board-configuration-kconfig) by setting the kconfig variables: `CONFIG_DRIVERS_INS_MICROSTRAIN` or `CONFIG_COMMON_INS`.
2. Configure the driver mode by setting [MS_MODE](../advanced_config/parameter_reference.md#MS_MODE)
- To use the MicroStrain sensor to provide raw IMU data to EKF2
1. Set [MS_MODE](../advanced_config/parameter_reference.md#MS_MODE) to 0
2. Update the [EKF2_MULTI_IMU](../advanced_config/parameter_reference.md#EKF2_MULTI_IMU) parameter to account for the added MicroStrain sensor.
3. Enable EKF2 by setting [EKF2_EN](../advanced_config/parameter_reference.md#EKF2_EN) to 1
4. To prioritize MicroStrain sensor output, adjust the priority level of individual sensors from 0-100 using the following parameters:
- [CAL_ACCn_PRIO](../advanced_config/parameter_reference.md#CAL_ACC0_PRIO)
- [CAL_GYROn_PRIO](../advanced_config/parameter_reference.md#CAL_GYRO0_PRIO)
- [CAL_MAGn_PRIO](../advanced_config/parameter_reference.md#CAL_MAG0_PRIO)
- [CAL_BAROn_PRIO](../advanced_config/parameter_reference.md#CAL_BARO0_PRIO)
where `n` corresponds to the index of the corresponding sensor.
::: tip
Sensors can be identified by their device id, which can be found by checking the parameters:
- [CAL_ACCn_ID](../advanced_config/parameter_reference.md#CAL_ACC0_ID)
- [CAL_GYROn_ID](../advanced_config/parameter_reference.md#CAL_GYRO0_ID)
- [CAL_MAGn_ID](../advanced_config/parameter_reference.md#CAL_MAG0_ID)
- [CAL_BAROn_ID](../advanced_config/parameter_reference.md#CAL_BARO0_ID)
:::
- To use the MicroStrain sensor as an external INS
1. Set [MS_MODE](../advanced_config/parameter_reference.md#MS_MODE) to 1
2. Disable EKF2 by setting [EKF2_EN](../advanced_config/parameter_reference.md#EKF2_EN) to 0
3. Reboot and start the driver
- `microstrain start -d <port>`
- To start the driver automatically when the flight controller powers on, set [SENS_MS_CFG](../advanced_config/parameter_reference.md#SENS_MS_CFG) to the sensors connected port.
## MicroStrain Configuration
1. Rates:
- By default, accel and gyro data are published at 500 Hz, magnetometer at 50 Hz, and barometric pressure at 50 Hz.
This can be changed by adjusting the following parameters:
- [MS_IMU_RATE_HZ](../advanced_config/parameter_reference.md#MS_IMU_RATE_HZ)
- [MS_MAG_RATE_HZ](../advanced_config/parameter_reference.md#MS_MAG_RATE_HZ)
- [MS_BARO_RATE_HZ](../advanced_config/parameter_reference.md#MS_BARO_RATE_HZ)
- Global position, local position, attitude and odometry will be published at 250 Hz by default.
This can be configured via:
- [MS_FILT_RATE_HZ](../advanced_config/parameter_reference.md#MS_FILT_RATE_HZ)
- For the CV7-GNSS/INS, the GNSS receiver 1 and 2 will publish data at 5Hz by default.
This can be changed using:
- [MS_GNSS_RATE_HZ](../advanced_config/parameter_reference.md#MS_GNSS_RATE_HZ)
- The driver will automatically configure data outputs based on the specific sensor model and available data streams.
- The driver is scheduled to run at twice the fastest configured data rate.
2. Aiding measurements:
- If supported, GNSS position and velocity aiding are always enabled.
- Internal/external magnetometer and heading aiding, as well as optical flow aiding, are disabled by default. They can be enabled using the following parameters:
- [MS_INT_MAG_EN](../advanced_config/parameter_reference.md#MS_INT_MAG_EN)
- [MS_INT_HEAD_EN](../advanced_config/parameter_reference.md#MS_INT_HEAD_EN)
- [MS_EXT_HEAD_EN](../advanced_config/parameter_reference.md#MS_EXT_HEAD_EN)
- [MS_EXT_MAG_EN](../advanced_config/parameter_reference.md#MS_EXT_MAG_EN)
- [MS_OPT_FLOW_EN](../advanced_config/parameter_reference.md#MS_OPT_FLOW_EN)
- The aiding frames for external sources can be configured using the following parameters:
- [MS_EHEAD_YAW](../advanced_config/parameter_reference.md#MS_EHEAD_YAW)
- [MS_EMAG_ROLL](../advanced_config/parameter_reference.md#MS_EMAG_ROLL)
- [MS_EMAG_PTCH](../advanced_config/parameter_reference.md#MS_EMAG_PTCH)
- [MS_EMAG_YAW](../advanced_config/parameter_reference.md#MS_EMAG_YAW)
- [MS_OFLW_OFF_X](../advanced_config/parameter_reference.md#MS_OFLW_OFF_X)
- [MS_OFLW_OFF_Y](../advanced_config/parameter_reference.md#MS_OFLW_OFF_Y)
- [MS_OFLW_OFF_Z](../advanced_config/parameter_reference.md#MS_OFLW_OFF_Z)
- [SENS_FLOW_ROT](../advanced_config/parameter_reference.md#SENS_FLOW_ROT)
- The uncertainty for optical flow and external magnetometer aiding must be specified using the following parameters:
- [MS_EMAG_UNCERT](../advanced_config/parameter_reference.md#MS_EMAG_UNCERT)
- [MS_OFLW_UNCERT](../advanced_config/parameter_reference.md#MS_OFLW_UNCERT)
::: tip
1. When optical flow aiding is enabled, the sensor uses the `vehicle_optical_flow_vel` output from the flight controller as a body-frame velocity aiding measurement.
2. If the MicroStrain sensor does not support these aiding sources but they are enabled, sensor initialization will fail.
:::
3. Initial heading alignment:
- Initial heading alignment is set to kinematic by default. This can be changed by adjusting
- [MS_ALIGNMENT](../advanced_config/parameter_reference.md#MS_ALIGNMENT)
4. GNSS Aiding Source Control (GNSS/INS only)
- The Source of the GNSS aiding data can be configured using:
- [MS_GNSS_AID_SRC](../advanced_config/parameter_reference.md#MS_GNSS_AID_SRC)
5. Sensor to vehicle transform:
- If the sensor is mounted in an orientation different from the vehicle frame. A sensor to vehicle transform can be enabled using
- [MS_SVT_EN](../advanced_config/parameter_reference.md#MS_SVT_EN)
- The transform is defined using the following parameters
- [MS_SENSOR_ROLL](../advanced_config/parameter_reference.md#MS_SENSOR_ROLL)
- [MS_SENSOR_PTCH](../advanced_config/parameter_reference.md#MS_SENSOR_PTCH)
- [MS_SENSOR_YAW](../advanced_config/parameter_reference.md#MS_SENSOR_YAW)
6. IMU ranges:
- The accelerometer and gyroscope ranges on the device are configurable using:
- [MS_ACCEL_RANGE](../advanced_config/parameter_reference.md#MS_ACCEL_RANGE)
- [MS_GYRO_RANGE](../advanced_config/parameter_reference.md#MS_GYRO_RANGE)
::: tip
Available range settings depend on the specific [sensor](https://www.hbkworld.com/en/products/transducers/inertial-sensors) and can be found in the corresponding user manual.
By default, the ranges are not changed.
:::
7. GNSS Lever arm offsets:
- The lever arm offset for the external GNSS receiver can be configured using:
- [MS_GNSS_OFF1_X](../advanced_config/parameter_reference.md#MS_GNSS_OFF1_X)
- [MS_GNSS_OFF1_Y](../advanced_config/parameter_reference.md#MS_GNSS_OFF1_Y)
- [MS_GNSS_OFF1_Z](../advanced_config/parameter_reference.md#MS_GNSS_OFF1_Z)
- For dual-antenna configurations, the second GNSS receivers offset is configured using:
- [MS_GNSS_OFF2_X](../advanced_config/parameter_reference.md#MS_GNSS_OFF2_X)
- [MS_GNSS_OFF2_Y](../advanced_config/parameter_reference.md#MS_GNSS_OFF2_Y)
- [MS_GNSS_OFF2_Z](../advanced_config/parameter_reference.md#MS_GNSS_OFF2_Z)
## Published Data
The MicroStrain driver continuously publishes sensor data to the following uORB topics:
- [sensor_accel](../msg_docs/SensorAccel.md)
- [sensor_gyro](../msg_docs/SensorGyro.md)
- [sensor_mag](../msg_docs/SensorMag.md)
- [sensor_baro](../msg_docs/SensorBaro.md)
For GNSS/INS devices, GPS data is also published to:
- [sensor_gps](../msg_docs/SensorGps.md)
If used as an external INS replacing EKF2, it publishes:
- [vehicle_global_position](../msg_docs/VehicleGlobalPosition.md)
- [vehicle_local_position](../msg_docs/VehicleLocalPosition.md)
- [vehicle_attitude](../msg_docs/VehicleAttitude.md)
- [vehicle_odometry](../msg_docs/VehicleOdometry.md)
otherwise the same data is published to the following topics
- `external_ins_global_position`
- `external_ins_attitude`
- `external_ins_local_position`
:::tip
Published topics can be viewed using the `listener` command.
:::