From ca6d257ed8ff83985aa1794d378b9bc9cbcf8944 Mon Sep 17 00:00:00 2001 From: PX4 Build Bot Date: Fri, 19 Dec 2025 08:52:57 +1100 Subject: [PATCH] New Crowdin translations - zh-CN (#26148) Co-authored-by: Crowdin Bot --- docs/zh/SUMMARY.md | 61 +- docs/zh/advanced_config/tuning_the_ecl_ekf.md | 925 +++++++++--------- docs/zh/can/index.md | 50 +- .../complete_vehicles_mc/amov_F410_drone.md | 2 +- docs/zh/config_rover/position_tuning.md | 16 +- docs/zh/config_rover/velocity_tuning.md | 4 +- docs/zh/dev_setup/building_px4.md | 164 ++-- docs/zh/dev_setup/config_initial.md | 2 +- docs/zh/development/development.md | 2 +- docs/zh/dronecan/ark_flow.md | 1 + docs/zh/dronecan/ark_flow_mr.md | 1 + docs/zh/esc/ark_4in1_esc.md | 65 ++ docs/zh/esc/esc_protocols.md | 66 ++ .../zh/flight_controller/accton-godwit_ga1.md | 2 +- docs/zh/flight_controller/ark_v6x.md | 2 +- docs/zh/flight_controller/auav_x2.md | 2 +- docs/zh/flight_controller/cuav_pixhawk_v6x.md | 2 +- docs/zh/flight_controller/cuav_v5.md | 2 +- docs/zh/flight_controller/cuav_v5_nano.md | 2 +- docs/zh/flight_controller/cuav_v5_plus.md | 2 +- docs/zh/flight_controller/cuav_x25-evo.md | 2 +- .../cubepilot_cube_orange.md | 2 +- .../cubepilot_cube_orangeplus.md | 2 +- .../cubepilot_cube_yellow.md | 2 +- docs/zh/flight_controller/durandal.md | 2 +- docs/zh/flight_controller/holybro_pix32.md | 2 +- docs/zh/flight_controller/holybro_pix32_v6.md | 2 +- docs/zh/flight_controller/kakutef7.md | 2 +- docs/zh/flight_controller/kakuteh7-wing.md | 2 +- docs/zh/flight_controller/kakuteh7.md | 2 +- docs/zh/flight_controller/kakuteh7mini.md | 2 +- docs/zh/flight_controller/kakuteh7v2.md | 2 +- docs/zh/flight_controller/micoair743-lite.md | 2 +- docs/zh/flight_controller/mindpx.md | 2 +- docs/zh/flight_controller/modalai_fc_v1.md | 2 +- .../flight_controller/modalai_voxl_flight.md | 2 +- .../flight_controller/mro_control_zero_f7.md | 2 +- docs/zh/flight_controller/mro_pixhawk.md | 2 +- docs/zh/flight_controller/mro_x2.1.md | 2 +- .../zh/flight_controller/nxp_mr_vmu_rt1176.md | 2 +- docs/zh/flight_controller/omnibus_f4_sd.md | 2 +- docs/zh/flight_controller/pixfalcon.md | 2 +- docs/zh/flight_controller/pixhack_v3.md | 2 +- docs/zh/flight_controller/pixhawk-2.md | 2 +- docs/zh/flight_controller/pixhawk.md | 2 +- docs/zh/flight_controller/pixhawk3_pro.md | 2 +- docs/zh/flight_controller/pixhawk4.md | 2 +- docs/zh/flight_controller/pixhawk4_mini.md | 2 +- docs/zh/flight_controller/pixhawk5x.md | 2 +- docs/zh/flight_controller/pixhawk6c.md | 2 +- docs/zh/flight_controller/pixhawk6c_mini.md | 2 +- docs/zh/flight_controller/pixhawk6x-rt.md | 2 +- docs/zh/flight_controller/pixhawk6x.md | 2 +- docs/zh/flight_controller/pixhawk6x_pro.md | 2 +- docs/zh/flight_controller/pixracer.md | 2 +- docs/zh/flight_controller/raccoonlab_fmu6x.md | 2 +- docs/zh/flight_controller/radiolink_pix6.md | 2 +- docs/zh/flight_controller/svehicle_e2.md | 2 +- docs/zh/flight_controller/thepeach_k1.md | 2 +- docs/zh/flight_controller/thepeach_r1.md | 2 +- docs/zh/flight_controller/x-mav_ap-h743r1.md | 2 +- docs/zh/hardware/serial_port_mapping.md | 14 +- docs/zh/index.md | 10 +- docs/zh/middleware/uorb.md | 2 + docs/zh/peripherals/esc_motors.md | 98 +- docs/zh/uorb/uorb_documentation.md | 170 ++++ 66 files changed, 1027 insertions(+), 722 deletions(-) create mode 100644 docs/zh/esc/ark_4in1_esc.md create mode 100644 docs/zh/esc/esc_protocols.md create mode 100644 docs/zh/uorb/uorb_documentation.md diff --git a/docs/zh/SUMMARY.md b/docs/zh/SUMMARY.md index 2a0058f872..92a00d86c7 100644 --- a/docs/zh/SUMMARY.md +++ b/docs/zh/SUMMARY.md @@ -1,41 +1,41 @@ -- [Introduction](index.md) +- [概述](index.md) - [基本概念](getting_started/px4_basic_concepts.md) - [多旋翼](frames_multicopter/index.md) - - [Features](features_mc/index.md) + - [特征](features_mc/index.md) - [飞行模式](flight_modes_mc/index.md) - [位置模式(多旋翼)](flight_modes_mc/position.md) - - [Position Slow Mode (MC)](flight_modes_mc/position_slow.md) + - [低速的位置模式(多旋翼)](flight_modes_mc/position_slow.md) - [高度模式(多旋翼)](flight_modes_mc/altitude.md) - - [Altitude Cruise Mode (MC)](flight_modes_mc/altitude_cruise.md) - - [Stabilized Mode (MC)](flight_modes_mc/manual_stabilized.md) + - [定高模式(多旋翼)](flight_modes_mc/altitude_cruise.md) + - [姿态稳定模式/新手模式(多旋翼)](flight_modes_mc/manual_stabilized.md) - [特技模式(多旋翼)](flight_modes_mc/acro.md) - [环绕模式(多旋翼)](flight_modes_mc/orbit.md) - - [Takeoff Mode (MC)](flight_modes_mc/takeoff.md) - - [Land Mode (MC)](flight_modes_mc/land.md) - - [Hold Mode (MC)](flight_modes_mc/hold.md) - - [Follow Me Mode (MC)](flight_modes_mc/follow_me.md) - - [Mission Mode (MC)](flight_modes_mc/mission.md) - - [Return Mode (MC)](flight_modes_mc/return.md) - - [Offboard Mode (MC)](flight_modes_mc/offboard.md) - - [Collision Prevention](computer_vision/collision_prevention.md) + - [自动起飞模式(多旋翼)](flight_modes_mc/takeoff.md) + - [自动降落模式(多旋翼)](flight_modes_mc/land.md) + - [定点模式(多旋翼)](flight_modes_mc/hold.md) + - [跟随模式(多旋翼)](flight_modes_mc/follow_me.md) + - [自主任务模式 (多旋翼)](flight_modes_mc/mission.md) + - [返航模式(多旋翼)](flight_modes_mc/return.md) + - [外部控制模式(多旋翼)](flight_modes_mc/offboard.md) + - [碰撞预防](computer_vision/collision_prevention.md) - [地形跟随/保持](flying/terrain_following_holding.md) - - [Terrain Following/Holding](flying/terrain_following_holding.md) - - [Throw Launch](flight_modes_mc/throw_launch.md) + - [地形跟随/保持](flying/terrain_following_holding.md) + - [抛飞启动](flight_modes_mc/throw_launch.md) - [Assembly](assembly/assembly_mc.md) - - [Configuration/Tuning](config_mc/index.md) - - [Auto-tune](config/autotune_mc.md) - - [Filter/Control Latency Tuning](config_mc/filter_tuning.md) - - [PID Tuning (Manual/Basic)](config_mc/pid_tuning_guide_multicopter_basic.md) - - [PID Tuning Guide (Manual/Advanced)](config_mc/pid_tuning_guide_multicopter.md) - - [Setpoint Tuning (Trajectory Generator)](config_mc/mc_trajectory_tuning.md) - - [Jerk-limited Type Trajectory](config_mc/mc_jerk_limited_type_trajectory.md) - - [Racer Setup](config_mc/racer_setup.md) + - [配置/调参](config_mc/index.md) + - [自动调优](config/autotune_mc.md) + - [滤波/控制延迟调整](config_mc/filter_tuning.md) + - [PID配置(手动/基本)](config_mc/pid_tuning_guide_multicopter_basic.md) + - [PID配置引导(手动/基本)](config_mc/pid_tuning_guide_multicopter.md) + - [定点配置 (轨迹生成)](config_mc/mc_trajectory_tuning.md) + - [限速型轨迹](config_mc/mc_jerk_limited_type_trajectory.md) + - [竞速设置](config_mc/racer_setup.md) - [着陆探测器配置](advanced_config/land_detector.md) - [静态压力生成](advanced_config/static_pressure_buildup.md) - - [Flying (Basics)](flying/basic_flying_mc.md) + - [飞行(基本)](flying/basic_flying_mc.md) - [整机](complete_vehicles_mc/index.md) - - [ModalAI Starling](complete_vehicles_mc/modalai_starling.md) + - [多场景AI无人机——ModalAI Starling](complete_vehicles_mc/modalai_starling.md) - [PX4 视觉套件](complete_vehicles_mc/px4_vision_kit.md) - [MindRacer BNF & RTF](complete_vehicles_mc/mindracer_BNF_RTF.md) - [MindRacer 210](complete_vehicles_mc/mindracer210.md) @@ -315,15 +315,17 @@ - [ADSB/FLARM (空中防撞)](config/actuators.md) - [电调(ESC)校准](advanced_config/esc_calibration.md) - [电调 & 电机](peripherals/esc_motors.md) + - [ESC Protocols](esc/esc_protocols.md) - [PWM 电调和伺服系统](peripherals/pwm_escs_and_servo.md) - [DShot 电调](peripherals/dshot.md) - [OneShot 电调和伺服系统](peripherals/oneshot.md) - [DroneCAN ESCs](dronecan/escs.md) - - [Zubax Telega](dronecan/zubax_telega.md) - [PX4 Sapog ESC Firmware](dronecan/sapog.md) - - [Holybro Kotleta](dronecan/holybro_kotleta.md) - - [Vertiq](peripherals/vertiq.md) - - [VESC](peripherals/vesc.md) + - [ARK 4IN1 ESC](esc/ark_4in1_esc.md) + - [Holybro Kotleta](dronecan/holybro_kotleta.md) + - [Vertiq Motor/ESC Modules](peripherals/vertiq.md) + - [VESC Project ESCs](peripherals/vesc.md) + - [Zubax Telega ESCs](dronecan/zubax_telega.md) - [Radio Control (RC)](getting_started/rc_transmitter_receiver.md) - [无线电系统设置](config/radio.md) @@ -519,6 +521,7 @@ - [PPS Time Synchronization](advanced/pps_time_sync.md) - [中间件](middleware/index.md) - [uORB 通讯](middleware/uorb.md) + - [uORB Docs Standard](uorb/uorb_documentation.md) - [uORB 图](middleware/uorb_graph.md) - [uORB 消息参考](msg_docs/index.md) - [Versioned](msg_docs/versioned_messages.md) diff --git a/docs/zh/advanced_config/tuning_the_ecl_ekf.md b/docs/zh/advanced_config/tuning_the_ecl_ekf.md index 1e9a2cc162..ebf7ba94f9 100644 --- a/docs/zh/advanced_config/tuning_the_ecl_ekf.md +++ b/docs/zh/advanced_config/tuning_the_ecl_ekf.md @@ -1,254 +1,253 @@ -# Using PX4's Navigation Filter (EKF2) +# 使用 PX4 的导航滤波器(EKF2) -This tutorial answers common questions about use of the EKF algorithm used for navigation. +本教程回答了关于使用 EKF 算法进行导航的常见问题。 :::tip -The [PX4 State Estimation Overview](https://youtu.be/HkYRJJoyBwQ) video from the _PX4 Developer Summit 2019_ (Dr. Paul Riseborough) provides an overview of the estimator, and additionally describes both the major changes from 2018/2019, major changes and improvements were added since then. +来自 _PX4 开发者峰会 2019_ 的 [PX4 状态估计概述](https://youtu.be/HkYRJJoyBwQ) 视频 (Dr. Paul Riseborough) 提供了估计器的概述,并额外描述了 2018/2019 年的主要变化,自那时起又增加了许多重大变更和改进。 ::: ## 综述 -PX4's Navigation filter uses an Extended Kalman Filter (EKF) algorithm to process sensor measurements and provide an estimate of the following states: +PX4 的导航滤波器使用扩展卡尔曼滤波 (EKF) 算法来处理传感器测量数据,并提供以下状态的估计值: -- Quaternion defining the rotation from North, East, Down local navigation frame to X, Y, Z body frame -- IMU 处的速度 - 北,东,地 \(m/s) -- Position at the IMU - Latitude (rad), Longitude (rad), Altitude (m) -- IMU gyro bias estimates - X, Y, Z (rad/s) -- IMU accelerometer bias estimates - X, Y, Z (m/s2) -- 地球磁场组分 - 北,东,地 \(gauss\) -- 飞行器机体坐标系磁场偏差 - X, Y, Z \(gauss\) -- 风速-北, 东\(m/s\) -- Terrain altitude (m) +- 定义从北、东、地 (NED) 局部导航坐标系到 X、Y、Z 机体坐标系旋转的四元数 +- IMU 处的速度 - 北,东,地 (m/s) +- IMU 处的位置 - 纬度 (rad)、经度 (rad)、高度 (m) +- IMU 陀螺仪零偏估计 - X、Y、Z (rad/s) +- IMU 加速度计零偏估计 - X、Y、Z (m/s2) +- 地磁场分量 - 北、东、地 (gauss) +- 载具机体坐标系磁场零偏 - X、Y、Z (gauss) +- 风速 - 北、东 (m/s) +- 地形高度 (m) -To improve stability, an "error-state" formulation is implemented -This is especially relevant when estimating the uncertainty of a rotation which is a 3D vector (tangent space of SO(3)). +为了提高稳定性,实施了“误差状态 (error-state)”表述, +这在估计旋转(即 3D 向量,SO(3) 的切空间)的不确定性时尤为重要。 -EKF 在延迟的“融合时间范围”上运行,以允许相对于 IMU 的每次测量的不同时间延迟。 -为了保证所有传感器数据都能在正确的时间内使用,每个传感器的数据都是按照先入先出(FIFO)队列进行缓存,并由EKF从缓存区中读取。 -The delay compensation for each sensor is controlled by the [EKF2\_\*\_DELAY](../advanced_config/parameter_reference.md#ekf2) parameters. +EKF 在延迟的“融合时域 (fusion time horizon)”上运行,以允许每个测量值相对于 IMU 存在不同的时间延迟。 +每个传感器的数据都经过 FIFO 缓冲,并由 EKF 从缓冲区中检索,以便在正确的时间使用。 +每个传感器的延迟补偿由 [EKF2\_\*\_DELAY](../advanced_config/parameter_reference.md#ekf2) 参数控制。 -互补滤波器用于使用缓冲的 IMU 数据将状态从“融合时间范围”向前传播到当前时间。 -The time constant for this filter is controlled by the [EKF2_TAU_VEL](../advanced_config/parameter_reference.md#EKF2_TAU_VEL) and [EKF2_TAU_POS](../advanced_config/parameter_reference.md#EKF2_TAU_POS) parameters. +互补滤波器用于使用缓冲的 IMU 数据将状态从“融合时域”向前传播到当前时间。 +该滤波器的时间常数由 [EKF2_TAU_VEL](../advanced_config/parameter_reference.md#EKF2_TAU_VEL) 和 [EKF2_TAU_POS](../advanced_config/parameter_reference.md#EKF2_TAU_POS) 参数控制。 :::info -The 'fusion time horizon' delay and length of the buffers is determined by [EKF2_DELAY_MAX](../advanced_config/parameter_reference.md#EKF2_DELAY_MAX). -This value should be at least as large as the longest delay `EKF2\_\*\_DELAY`. -减少“融合时间范围”延迟减少了用于将状态向前传播到当前时间的互补滤波器中的误差。 +缓冲区的“融合时域”延迟和长度由 [EKF2_DELAY_MAX](../advanced_config/parameter_reference.md#EKF2_DELAY_MAX) 决定。 +该值应至少与最长的 `EKF2\_\*\_DELAY` 延迟一样大。 +减小“融合时域”延迟会减少用于将状态向前传播到当前时间的互补滤波器的误差。 ::: -EKF仅将IMU数据用于状态预测。 -在EKF推导中,IMU数据不作为观测值使用。 -The algebraic equations for the covariance prediction and measurement jacobians are derived using [SymForce](https://symforce.org/) and can be found here: [Symbolic Derivation](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/ekf2/EKF/python/ekf_derivation/derivation.py). -Covariance update is done using the [Joseph Stabilized form](https://en.wikipedia.org/wiki/Kalman_filter#Deriving_the_posteriori_estimate_covariance_matrix) to improve numerical stability and allow conditional update of independent states. +EKF 仅将 IMU 数据用于状态预测。 +IMU 数据不作为观测值用于 EKF 推导。 +协方差预测和测量雅可比矩阵的代数方程是使用 [SymForce](https://symforce.org/) 推导的,可以在这里找到:[符号推导](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/ekf2/EKF/python/ekf_derivation/derivation.py)。 +协方差更新使用 [约瑟夫稳定形式 (Joseph Stabilized form)](https://en.wikipedia.org/wiki/Kalman_filter#Deriving_the_posteriori_estimate_covariance_matrix) 完成,以提高数值稳定性并允许独立状态的条件更新。 -### Precisions about the position output +### 关于位置输出的精度 -The position is estimated as latitude, longitude and altitude and the INS integration is performed using the WGS84 ellipsoid mode. -However, the position uncertainty is defined in the local navigation frame at the current position (i.e.: NED error in meters). +位置是以纬度、经度和高度估算的,INS(惯性导航系统)积分是使用 WGS84 椭球模型执行的。然而,位置不确定性是在当前位置的局部导航坐标系中定义的(即:NED 误差,单位为米)。 -位置及速度状态变量在输出至控制回路之前会根据IMU与机体坐标系之间的偏差量进行修正。 +位置和速度状态在输出到控制回路之前,会根据 IMU 和机体坐标系之间的偏移量进行调整。 -The position of the IMU relative to the body frame is set by the `EKF2_IMU_POS_X,Y,Z` parameters. +IMU 相对于机体坐标系的位置由 `EKF2_IMU_POS_X,Y,Z` 参数设置。 -In addition to the global position estimate in latitude/longitude/altitude, the filter also provides a local position estimate (NED in meters) by projecting the global position estimate using an [azimuthal_equidistant_projection](https://en.wikipedia.org/wiki/Azimuthal_equidistant_projection) centred on an arbitrary origin. -This origin is automatically set when global position measurements are fused but can also be specified manually. -If no global position information is provided, only the local position is available and the INS integration is performed on a spherical Earth. +除了纬度/经度/高度的全局位置估计外,滤波器还通过使用以任意原点为中心的 [等距方位投影 (azimuthal_equidistant_projection)](https://en.wikipedia.org/wiki/Azimuthal_equidistant_projection) 投影全局位置估计值,提供局部位置估计(以米为单位的 NED)。 +当融合全局位置测量值时,会自动设置此原点,也可以手动指定。 +如果未提供全局位置信息,则只有局部位置可用,并且 INS 积分是在球形地球模型上执行的。 -## 运行单个EKF实例 +## 运行单个 EKF 实例 -The _default behaviour_ is to run a single instance of the EKF. -在这种情况下,在EKF收到数据之前执行传感器选择和故障切换。 -这为防止有限数量的传感器故障,如数据丢失等,提供了保护。 但不能防止传感器提供的不准确数据超过EKF和控制循环的补偿能力。 +_默认行为_ 是运行单个 EKF 实例。 +在这种情况下,传感器选择和故障转移是在数据被 EKF 接收之前执行的。 +这针对有限数量的传感器故障(例如数据丢失)提供了保护,但无法防止传感器提供超出 EKF 和控制回路补偿能力的不准确数据。 -运行单个EKF实例的参数设置为: +运行单个 EKF 实例的参数设置如下: - [EKF2_MULTI_IMU](../advanced_config/parameter_reference.md#EKF2_MULTI_IMU) = 0 - [EKF2_MULTI_MAG](../advanced_config/parameter_reference.md#EKF2_MULTI_MAG) = 0 - [SENS_IMU_MODE](../advanced_config/parameter_reference.md#SENS_IMU_MODE) = 1 - [SENS_MAG_MODE](../advanced_config/parameter_reference.md#SENS_MAG_MODE) = 1 -## 运行多个EKF实例 +## 运行多个 EKF 实例 -根据IMU和磁强计的数量以及自动驾驶仪的CPU能力,EKF可以运行多个实例。 -这提供了一系列更广泛的传感器错误的保护,每个EKF实例使用不同的传感器组合实现了这一点。 -通过比较每个EKF实例的内部一致性,EKF选择器能够确定具有最佳数据一致性的EKF和传感器组合。 -这样可以检测和隔离IMU偏差、饱和或数据卡住等故障。 +根据 IMU 和磁力计的数量以及飞控的 CPU 能力,可以运行多个 EKF 实例。 +这针对更广泛的传感器误差提供了保护,并通过每个 EKF 实例使用不同的传感器组合来实现。 +通过比较每个 EKF 实例的内部一致性,EKF 选择器能够确定具有最佳数据一致性的 EKF 和传感器组合。 +这使得可以检测并隔离诸如 IMU 零偏突变、饱和或数据卡死等故障。 -The total number of EKF instances is the product of the number of IMU's and number of magnetometers selected by [EKF2_MULTI_IMU](../advanced_config/parameter_reference.md#EKF2_MULTI_IMU) and [EKF2_MULTI_MAG](../advanced_config/parameter_reference.md#EKF2_MULTI_MAG) and is given by the following formula: +EKF 实例的总数是 [EKF2_MULTI_IMU](../advanced_config/parameter_reference.md#EKF2_MULTI_IMU) 和 [EKF2_MULTI_MAG](../advanced_config/parameter_reference.md#EKF2_MULTI_MAG) 选择的 IMU 数量和磁力计数量的乘积,由以下公式给出: > N_instances = MAX([EKF2_MULTI_IMU](../advanced_config/parameter_reference.md#EKF2_MULTI_IMU) , 1) x MAX([EKF2_MULTI_MAG](../advanced_config/parameter_reference.md#EKF2_MULTI_MAG) , 1) -例如,一个带有 2 个IMU和 2 个磁强计的自动化驾驶仪可以在 EKF2_MULTI_IMU = 2 和 EKF2_MULTI_MAG = 2 的情况下运行,总共 4 个EKF实例,其中每个实例使用以下传感器组合: +例如,具有 2 个 IMU 和 2 个磁力计的飞控可以运行 EKF2_MULTI_IMU = 2 和 EKF2_MULTI_MAG = 2,总共 4 个 EKF 实例,其中每个实例使用以下传感器组合: -- EKF instance 1 : IMU 1, magnetometer 1 -- EKF instance 2 : IMU 1, magnetometer 2 -- EKF instance 3 : IMU 2, magnetometer 1 -- EKF instance 4 : IMU 2, magnetometer 2 +- EKF 实例 1 : IMU 1, 磁力计 1 +- EKF 实例 2 : IMU 1, 磁力计 2 +- EKF 实例 3 : IMU 2, 磁力计 1 +- EKF 实例 4 : IMU 2, 磁力计 2 -可处理的IMU或磁强计传感器的最大数量为每种传感器有4个,因此理论上最大有 4 x 4 = 16 个EKF实例。 -实际上,这种做法受到现有计算资源的限制。 -在开发这一功能的过程中,使用基于STM32F7的硬件的CPU进行测试,结果显示 4 个EKF实例具有可接受的处理负载和内存利用率裕度。 +可以处理的 IMU 或磁力计传感器的最大数量各为 4 个,理论最大值为 4 x 4 = 16 个 EKF 实例。 +实际上,这受到可用计算资源的限制。 +在此功能的开发过程中,使用基于 STM32F7 CPU 的硬件进行的测试表明,4 个 EKF 实例具有可接受的处理负载和内存利用率余量。 :::warning -Ground based testing to check CPU and memory utilisation should be performed before flying. +飞行前应进行地面测试以检查 CPU 和内存利用率。 ::: -If [EKF2_MULTI_IMU](../advanced_config/parameter_reference.md#EKF2_MULTI_IMU) >= 3, then the failover time for large rate gyro errors is further reduced because the EKF selector is able to apply a median select strategy for faster isolation of the faulty IMU. +如果 [EKF2_MULTI_IMU](../advanced_config/parameter_reference.md#EKF2_MULTI_IMU) >= 3,则针对大速率陀螺仪误差的故障转移时间将进一步缩短,因为 EKF 选择器能够应用中值选择策略以更快地隔离故障 IMU。 -多EKF实例的设置由以下参数控制: +多 EKF 实例的设置由以下参数控制: - [SENS_IMU_MODE](../advanced_config/parameter_reference.md#SENS_IMU_MODE): - Set to 0 if running multiple EKF instances with IMU sensor diversity, ie [EKF2_MULTI_IMU](../advanced_config/parameter_reference.md#EKF2_MULTI_IMU) > 1. + 如果是以 IMU 传感器多样性运行多个 EKF 实例,即 [EKF2_MULTI_IMU](../advanced_config/parameter_reference.md#EKF2_MULTI_IMU) > 1,则设置为 0。 - 当设置为 1 (单个EKF 操作默认值)时,传感器模块选择EKF使用的IMU 数据。 - 这种保护可防止来自传感器的数据丢失,但并不能防止不良的传感器数据。 + 当设置为 1(单个 EKF 操作的默认值)时,传感器模块选择 EKF 使用的 IMU 数据。 + 这提供了针对传感器数据丢失的保护,但不提供针对错误传感器数据的保护。 当设置为 0 时,传感器模块不进行选择。 - [SENS_MAG_MODE](../advanced_config/parameter_reference.md#SENS_MAG_MODE): - Set to 0 if running multiple EKF instances with magnetometer sensor diversity, ie [EKF2_MULTI_MAG](../advanced_config/parameter_reference.md#EKF2_MULTI_MAG) > 1. + 如果是以磁力计传感器多样性运行多个 EKF 实例,即 [EKF2_MULTI_MAG](../ + advanced_config/parameter_reference.md#EKF2_MULTI_MAG) > 1,则设置为 0。 - 当设置为 1 (单个EKF 操作默认值)时,传感器模块选择EKF使用的磁强计数据。 - 这种保护可防止来自传感器的数据丢失,但并不能防止不良的传感器数据。 + 当设置为 1(单个 EKF 操作的默认值)时,传感器模块选择 EKF 使用的磁力计数据。 + 这提供了针对传感器数据丢失的保护,但不提供针对错误传感器数据的保护。 当设置为 0 时,传感器模块不进行选择。 - [EKF2_MULTI_IMU](../advanced_config/parameter_reference.md#EKF2_MULTI_IMU): - This parameter specifies the number of IMU sensors used by the multiple EKF's. - If `EKF2_MULTI_IMU` <= 1, then only the first IMU sensor will be used. - When [SENS_IMU_MODE](../advanced_config/parameter_reference.md#SENS_IMU_MODE) = 1, this will be the sensor selected by the sensor module. - If `EKF2_MULTI_IMU` >= 2, then a separate EKF instance will run for the specified number of IMU sensors up to the lesser of 4 or the number of IMU's present. + 此参数指定多个 EKF 使用的 IMU 传感器数量。 + 如果 `EKF2_MULTI_IMU` <= 1,则仅使用第一个 IMU 传感器。 + 当 [SENS_IMU_MODE](../advanced_config/parameter_reference.md#SENS_IMU_MODE) = 1 时,这将是传感器模块选择的传感器。 + 如果 `EKF2_MULTI_IMU` >= 2,则将针对指定数量的 IMU 传感器(最多 4 个或存在的 IMU 数量,取较小值)运行单独的 EKF 实例。 - [EKF2_MULTI_MAG](../advanced_config/parameter_reference.md#EKF2_MULTI_MAG): - This parameter specifies the number of magnetometer sensors used by the multiple EKF's - If `EKF2_MULTI_MAG` <= 1, then only the first magnetometer sensor will be used. - When [SENS_MAG_MODE](../advanced_config/parameter_reference.md#SENS_MAG_MODE) = 1, this will be the sensor selected by the sensor module. - If `EKF2_MULTI_MAG` >= 2, then a separate EKF instance will run for the specified number of magnetometer sensors up to the lesser of 4 or the number of magnetometers present. + 此参数指定多个 EKF 使用的磁力计传感器数量。 + 如果 `EKF2_MULTI_MAG` <= 1,则仅使用第一个磁力计传感器。 + 当 [SENS_MAG_MODE](../advanced_config/parameter_reference.md#SENS_MAG_MODE) = 1 时,这将是传感器模块选择的传感器。 + 如果 `EKF2_MULTI_MAG` >= 2,则将针对指定数量的磁力计传感器(最多 4 个或存在的磁力计数量,取较小值)运行单独的 EKF 实例。 :::info -The recording and [EKF2 replay](../debug/system_wide_replay.md#ekf2-replay) of flight logs with multiple EKF instances is not supported. -To enable recording for EKF replay you must set the parameters to enable a [single EKF instance](#running-a-single-ekf-instance). +不支持多 EKF 实例飞行日志的记录和 [EKF2 回放](../debug/system_wide_replay.md#ekf2-replay)。 +要启用 EKF 回放记录,必须设置参数以启用 [单个 EKF 实例](#running-a-single-ekf-instance)。 ::: -## 它使用什么传感器测量值? +## 它使用哪些传感器测量? -EKF 具有不同的操作模式,以允许不同的传感器测量组合。 -滤波器在启动时会检查传感器的最小可行组合,并且在完成初始倾斜,偏航和高度对准之后,进入提供旋转,垂直速度,垂直位置,IMU 增量角度偏差和 IMU 增量速度偏差估计的模式。 +EKF 具有不同的操作模式,允许不同的传感器测量组合。 +启动时,滤波器会检查最小的可行传感器组合,并在初始倾斜、偏航和高度对准完成后,进入提供旋转、垂直速度、垂直位置、IMU 角度增量零偏和 IMU 速度增量零偏估计的模式。 -此模式需要 IMU 数据,一个偏航源(磁力计或外部视觉)和一个高度数据源。 -所有EKF操作模式都需要这个最小数据集。 -在此基础上可以使用其它传感器数据来估计额外的状态变量。 +此模式需要 IMU 数据、偏航源(磁力计或外部视觉)和高度数据源。 +所有 EKF 操作模式都需要此最小数据集。 +然后可以使用其他传感器数据来估计额外的状态。 ### IMU -- 三轴机体固连惯性测量单元,以最小100Hz的频率获取增量角度和增量速度数据 。 - 注意:在 EKF 使用它们之前,应该使用圆锥校正算法校正 IMU 增量角度数据。 +- 三轴机体固定惯性测量单元 (IMU) 的角度增量和速度增量数据,最小速率为 100Hz。 + 注意:在 EKF 使用 IMU 角度增量数据之前,应先对其应用圆锥效应校正。 -### 磁罗盘 +### 磁力计 -Three axis body fixed magnetometer data at a minimum rate of 5Hz is required to be considered by the estimator. +估计器需要三轴机体固定磁力计数据,最小速率为 5Hz。 ::: info -- The magnetometer **biases** are only observable while the drone is rotating -- The true heading is observable when the vehicle is accelerating (linear acceleration) while absolute position or velocity measurements are fused (e.g. GPS). - This means that magnetometer heading measurements are optional after initialization if those conditions are met often enough to constrain the heading drift (caused by gyro bias). +- 磁力计 **零偏 (biases)** 仅在无人机旋转时可观测。 +- 当载具加速(线性加速度)且同时融合绝对位置或速度测量值(例如 GPS)时,真实航向是可观测的。 + 这意味着如果这些条件能够足够频繁地满足以约束航向漂移(由陀螺仪零偏引起),则初始化后的磁力计航向测量是可选的。 ::: -Magnetometer data fusion can be configured using [EKF2_MAG_TYPE](../advanced_config/parameter_reference.md#EKF2_MAG_TYPE): +磁力计数据融合可以使用 [EKF2_MAG_TYPE](../advanced_config/parameter_reference.md#EKF2_MAG_TYPE) 进行配置: -0. Automatic: - - The magnetometer readings only affect the heading estimate before arming, and the whole attitude after arming. - - Heading and tilt errors are compensated when using this method. - - Incorrect magnetic field measurements can degrade the tilt estimate. - - The magnetometer biases are estimated whenever observable. -1. Magnetic heading: - - Only the heading is corrected. - The tilt estimate is never affected by incorrect magnetic field measurements. - - Tilt errors that could arise when flying without velocity/position aiding are not corrected when using this method. - - The magnetometer biases are estimated whenever observable. -2. Deprecated -3. Deprecated -4. Deprecated -5. None: - - Magnetometer data is never used. - This is useful when the data can never be trusted (e.g.: high current close to the sensor, external anomalies). - - The estimator will use other sources of heading: [GPS heading](#yaw-measurements) or external vision. - - When using GPS measurements without another source of heading, the heading can only be initialized after sufficient horizontal acceleration. - See [Estimate yaw from vehicle movement](#yaw-from-gps-velocity) below. -6. Init only: - - Magnetometer data is only used to initialize the heading estimate. - This is useful when the data can be used before arming but not afterwards (e.g.: high current after the vehicle is armed). - - After initialization, the heading is constrained using other observations. - - Unlike mag type `None`, when combined with GPS measurements, this method allows position controlled modes to run directly during takeoff. +0. 自动 (Automatic): + - 磁力计读数仅在解锁前影响航向估计,解锁后影响整个姿态。 + - 使用此方法时会补偿航向和倾斜误差。 + - 不正确的磁场测量会降低倾斜估计的质量。 + - 只要可观测,就会估计磁力计零偏。 +1. 磁航向 (Magnetic heading): + - 仅修正航向。 + 倾斜估计永远不会受到不正确磁场测量的影响。 + - 使用此方法时,不会修正因没有速度/位置辅助飞行而产生的倾斜误差。 + - 只要可观测,就会估计磁力计零偏。 +2. 已弃用 +3. 已弃用 +4. 已弃用 +5. 无 (None): + - 永不使用磁力计数据。 + 当数据完全不可信时(例如:传感器附近有大电流、外部异常),这很有用。 + - 估计器将使用其他航向源:[GPS 航向](#yaw-measurements) 或外部视觉。 + - 当使用 GPS 测量而没有其他航向源时,航向只能在充分的水平加速后才能初始化。 + 参见下文的 [从载具运动估计偏航](#yaw-from-gps-velocity)。 +6. 仅初始化 (Init only): + - 磁力计数据仅用于初始化航向估计。 + 当数据可以在解锁前使用但解锁后不能使用(例如:载具解锁后有大电流)时,这很有用。 + - 初始化后,航向使用其他观测值进行约束。 + - 与 `None` 模式不同,当与 GPS 测量结合使用时,此方法允许位置控制模式在起飞期间直接运行。 -The following selection tree can be used to select the right option: +可以使用以下选择树来选择正确的选项: -![EKF mag type selection tree](../../assets/config/ekf/ekf_mag_type_selection_tree.png) +![EKF 磁力计类型选择树](../../assets/config/ekf/ekf_mag_type_selection_tree.png) ### 高度 -A source of height data - GPS, barometric pressure, range finder, external vision or a combination of those at a minimum rate of 5Hz is required. +需要高度数据源 - GPS、气压计、测距仪、外部视觉或这些源的组合,最小速率为 5Hz。 -If none of the selected measurements are present, the EKF will not start. -当检测到这些测量值时,EKF 将初始化状态并完成倾角和偏航对准。 -当倾角和偏航对齐完成后,EKF 可以转换到其它操作模式,从而可以使用其它传感器数据: +如果不存在任何选定的测量值,EKF 将不会启动。 +当检测到这些测量值时,EKF 将初始化状态并完成倾斜和偏航对准。 +当倾斜和偏航对准完成后,EKF 可以转换到其他操作模式,从而能够使用额外的传感器数据: -Each height source can be enabled/disabled using its dedicated control parameter: +可以使用其专用控制参数启用/禁用每个高度源: - [GNSS/GPS](#gnss-gps): [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) -- [Barometer](#barometer): [EKF2_BARO_CTRL](../advanced_config/parameter_reference.md#EKF2_BARO_CTRL) -- [Range finder](#range-finder): [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) -- [External vision](#external-vision-system): Enabled when [EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF) is set to "Vision" +- [气压计](#barometer): [EKF2_BARO_CTRL](../advanced_config/parameter_reference.md#EKF2_BARO_CTRL) +- [测距仪](#range-finder): [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) +- [外部视觉](#external-vision-system): 当 [EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF) 设置为 "Vision" 时启用 -Over the long term the height estimate follows the "reference source" of height data. -This reference is defined by the [EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF) parameter. +从长远来看,高度估计遵循高度数据的“参考源”。 +此参考由 [EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF) 参数定义。 -#### Typical configurations +#### 典型配置 -| | [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) | [EKF2_BARO_CTRL](../advanced_config/parameter_reference.md#EKF2_BARO_CTRL) | [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) | [EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF) | -| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | -| Outdoor (default) | 7 (Lon/lat/alt/vel) | 1 (enabled) | 1 ([conditional](#conditional-range-aiding)) | 1 (GNSS) | -| Indoor (non-flat terrain) | 0 (disabled) | 1 (enabled) | 1 ([conditional](#conditional-range-aiding)) | 2 (range) | -| Indoor (flat terrain) | 0 (disabled) | 1 (enabled) | 2 ([always enabled](#range-height-fusion)) | 2 (range) | -| External vision | As required | As required | As required | 3 (vision) | +| | [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) | [EKF2_BARO_CTRL](../advanced_config/parameter_reference.md#EKF2_BARO_CTRL) | [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) | [EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF) | +| ----------------------------- | ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | +| 户外 (默认) | 7 (经/纬/高/速) | 1 (启用) | 1 ([条件性](#conditional-range-aiding)) | 1 (GNSS) | +| 室内 (非平坦地形) | 0 (禁用) | 1 (启用) | 1 ([条件性](#conditional-range-aiding)) | 2 (测距仪) | +| 室内 (平坦地形) | 0 (禁用) | 1 (启用) | 2 ([始终启用](#range-height-fusion)) | 2 (测距仪) | +| 外部视觉 | 按需 | 按需 | 按需 | 3 (视觉) | ### Barometer -Enable/disable using [EKF2_BARO_CTRL](../advanced_config/parameter_reference.md#EKF2_BARO_CTRL) as a source for [Height](#height) data. +使用 [EKF2_BARO_CTRL](../advanced_config/parameter_reference.md#EKF2_BARO_CTRL) 启用/禁用作为 [高度](#height) 数据的来源。 -Note that data from only one barometer is fused, even if multiple barometers are available. -The barometer with the highest [CAL_BAROx_PRIO](../advanced_config/parameter_reference.md#CAL_BARO0_PRIO) priority value is selected first, falling back to the next highest priority barometer if a sensor fault is detected. -If barometers have equal-highest priorities, the first detected is used. -A barometer can be completely disabled as a possible source by setting its `CAL_BAROx_PRIO` value to `0` (disabled). +注意,即使有多个气压计可用,也只融合来自一个气压计的数据。 +首先选择具有最高 [CAL_BAROx_PRIO](../advanced_config/parameter_reference.md#CAL_BARO0_PRIO) 优先级值的气压计,如果检测到传感器故障,则回退到下一个最高优先级的气压计。 +如果气压计具有相同的最高优先级,则使用第一个检测到的气压计。 +可以通过将其 `CAL_BAROx_PRIO` 值设置为 `0`(禁用)来完全禁用某个气压计作为可能的来源。 -See [Height](#height) more details about the configuration of height sources. +有关高度源配置的更多详细信息,请参阅 [高度](#height)。 -#### 静态气压位置误差校正 +#### 静压位置误差校正 -气压表示的海拔高度因机体风的相对速度和方向造成的空气动力扰动而发生误差。 -This is known in aeronautics as _static pressure position error_. -使用ECL/EKF2估计器库的EKF2模块提供了补偿这些误差的方法,只要风速状态估计是激活的。 +气压高度容易受到由载具风相对速度和方向产生的气动扰动引起的误差的影响。 +这在航空学中被称为 _静压位置误差 (static pressure position error)_。 +使用 ECL/EKF2 估计器库的 EKF2 模块提供了一种补偿这些误差的方法,前提是风速状态估计处于激活状态。 -For vehicles operating in a fixed-wing mode, wind speed state estimation requires either [Airspeed](#airspeed) and/or [Synthetic Sideslip](#synthetic-sideslip) fusion to be enabled. +对于以固定翼模式运行的飞行器,风速状态估计需要启用 [空速](#airspeed) 和/或 [合成侧滑](#synthetic-sideslip) 融合。 -For multi-rotors, fusion of [Drag Specific Forces](#mc_wind_estimation_using_drag) can be enabled and tuned to provide the required wind velocity state estimates. +对于多旋翼飞行器,可以启用并调整 [阻力比力](#mc_wind_estimation_using_drag) 的融合,以提供所需的风速状态估计。 -EKF2模块将误差建模为与机体固连的椭球体,在将其转换为高度估计之前,它指定了从大气气压中加/减的动态气压的分量。 +EKF2 模块将误差建模为一个机体固定的椭球体,该椭球体指定了在转换为高度估计之前,需要从气压中增加/减去的动压比例。 -以下方法可获得良好的调参参数: +可以通过以下方式获得良好的调参: -1. Fly once in [Position mode](../flight_modes_mc/position.md) repeatedly forwards/backwards/left/right/up/down between rest and maximum speed (best results are obtained when this testing is conducted in still conditions). +1. 在 [位置模式](../flight_modes_mc/position.md) 下反复向前/向后/向左/向右/向上/向下飞行,在静止和最大速度之间切换(在静风条件下进行此测试可获得最佳结果)。 -2. Extract the `.ulg` log file using, for example, [QGroundControl: Analyze > Log Download](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/log_download.html) +2. 使用例如 [QGroundControl: Analyze > Log Download](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/log_download.html) 提取 `.ulg` 日志文件。 - ::: info - The same log file can be used to tune the [multirotor wind estimator](#mc_wind_estimation_using_drag). + 同一日志文件可用于调整 [多旋翼风速估计器](#mc_wind_estimation_using_drag)。 ::: -3. Use the log with the [baro_static_pressure_compensation_tuning.py](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/ekf2/EKF/python/tuning_tools/baro_static_pressure_compensation) Python script to obtain the optimal set of parameters. +3. 使用 [baro_static_pressure_compensation_tuning.py](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/ekf2/EKF/python/tuning_tools/baro_static_pressure_compensation) Python 脚本处理日志,以获得最佳参数集。 -调整参数: +调参参数: - [EKF2_PCOEF_XP](../advanced_config/parameter_reference.md#EKF2_PCOEF_XP) - [EKF2_PCOEF_XN](../advanced_config/parameter_reference.md#EKF2_PCOEF_XN) @@ -256,383 +255,383 @@ EKF2模块将误差建模为与机体固连的椭球体,在将其转换为高 - [EKF2_PCOEF_YN](../advanced_config/parameter_reference.md#EKF2_PCOEF_YN) - [EKF2_PCOEF_Z](../advanced_config/parameter_reference.md#EKF2_PCOEF_Z) -#### Barometer bias compensation +#### 气压计零偏补偿 -A barometer at a constant altitude is subject to drift in its measurements due to changes in the ambient pressure environment or variations of the sensor temperature. -To compensate for this measurement error, EKF2 estimates the bias using GNSS height (if available) a "non drifting" reference. -No tuning is required. +恒定高度下的气压计容易因环境压力变化或传感器温度变化而产生测量漂移。 +为了补偿这种测量误差,EKF2 使用 GNSS 高度(如果可用)作为“无漂移”参考来估计零偏。 +不需要调参。 ### GNSS/GPS #### 位置和速度测量 -如果满足以下条件,GPS 测量将用于位置和速度: +如果满足以下条件,将使用 GPS 测量进行位置和速度估计: -- GPS use is enabled via setting of the [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) parameter. -- GPS 信号质量检查已通过。 - These checks are controlled by the [EKF2_GPS_CHECK](../advanced_config/parameter_reference.md#EKF2_GPS_CHECK) and `EKF2_REQ_*` parameters. +- 通过设置 [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) 参数启用 GPS 使用。 +- GPS 质量检查已通过。 + 这些检查由 [EKF2_GPS_CHECK](../advanced_config/parameter_reference.md#EKF2_GPS_CHECK) 和 `EKF2_REQ_*` 参数控制。 -For more details about the configuration of height sources, [click here](#height). +有关高度源配置的更多详细信息,请 [点击这里](#height)。 #### 偏航角测量 -Some GPS receivers such as the [Trimble MB-Two RTK GPS receiver](https://oemgnss.trimble.com/en/products/receiver-modules/mb-two) can be used to provide a heading measurement that replaces the use of magnetometer data. -在存在大型磁场异常的环境中工作时,或在高纬度地区,地球磁场具有很大的磁倾角时,这可能是一个重要的优势。 -Use of GPS yaw measurements is enabled by setting bit position 3 to 1 (adding 8) in the [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) parameter. +某些 GPS 接收机,例如 [Trimble MB-Two RTK GPS 接收机](https://oemgnss.trimble.com/en/products/receiver-modules/mb-two),可用于提供航向测量,以替代磁力计数据的使用。 +当在存在大磁异常的环境中或在地球磁场倾角较大的纬度地区运行时,这可能是一个显著的优势。 +通过将 [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) 参数中的第 3 位设置为 1(加 8)来启用 GPS 偏航测量。 #### 从 GPS 速度数据获取偏航角 -EKF在内部运行一个附加的多假设滤波器,它使用多个3-状态---北/东向(N/E)的速度和偏航角---的扩展卡尔曼滤波器(EKF)。 -然后使用高斯加和滤波器(GSF)合并这些偏航角的估计值。 -单个3-状态的EKF使用了IMU和GPS水平速度数据(加上可选的空速数据),而不依赖于事先对偏航角或磁强计测量有任何知识。 -这里提供了一个对于主滤波器的偏航角备份,当起飞后导航丢失,表明磁力计的偏航估计值不好时,它被用于重置主 EKF 滤波器的24-状态的中的偏航数据。 -This will result in an `Emergency yaw reset - magnetometer use stopped` message information message at the GCS. +EKF 在内部运行一个额外的多假设滤波器,该滤波器使用多个 3 状态扩展卡尔曼滤波器 (EKF),其状态为北东 (NE) 速度和偏航角。 +然后使用高斯求和滤波器 (GSF) 组合这些单独的偏航角估计值。 +单独的 3 状态 EKF 使用 IMU 和 GPS 水平速度数据(加上可选的空速数据),不依赖于偏航角或磁力计测量的任何先验知识。 +这为自主滤波器的偏航提供了备份,并用于在起飞后导航丢失表明来自磁力计的偏航估计错误时重置主 24 状态 EKF 的偏航。 +这将导致 GCS 显示 `Emergency yaw reset - magnetometer use stopped`(紧急航向重置 - 磁力计停止使用)信息消息。 -Data from this estimator is logged when ekf2 replay logging is enabled and can be viewed in the `yaw_estimator_status` message. -The individual yaw estimates from the individual 3-state EKF yaw estimators are in the `yaw` fields. -The GSF combined yaw estimate is in the `yaw_composite` field. -The variance for the GSF yaw estimate is in the `yaw_variance` field. -所有角度的单位均为弧度。 -Weightings applied by the GSF to the individual 3-state EKF outputs are in the`weight` fields. +启用 ekf2 回放日志记录后,将记录来自此估计器的数据,并可在 `yaw_estimator_status` 消息中查看。 +来自各个 3 状态 EKF 偏航估计器的单独偏航估计值位于 `yaw` 字段中。 +GSF 组合偏航估计值位于 `yaw_composite` 字段中。 +GSF 偏航估计值的方差位于 `yaw_variance` 字段中。 +所有角度均以弧度为单位。 +GSF 应用于各个 3 状态 EKF 输出的权重位于 `weight` 字段中。 -这也使得 ECL 能够在没有任何磁力计、或没有双天线 GPS 接收器的情况下运行,并提供偏航数据,只要起飞后能够进行某种水平的移动,偏航数据就变得可观测。 -To use this feature, set [EKF2_MAG_TYPE](../advanced_config/parameter_reference.md#EKF2_MAG_TYPE) to `none` (5) to disable magnetometer use. -一旦机体完成了足够的水平移动,使偏航角可观测, 24-状态的主EKF将使其偏航角与GSF的估计值对齐,并开始使用 GPS。 +这也可以实现在没有任何磁力计数据或双天线 GPS 接收机的情况下进行偏航操作,前提是起飞后可以进行一些水平运动以使偏航变得可观测。 +要使用此功能,请将 [EKF2_MAG_TYPE](../advanced_config/parameter_reference.md#EKF2_MAG_TYPE) 设置为 `none` (5) 以禁用磁力计使用。 +一旦载具进行了足够的水平运动使偏航可观测,主 24 状态 EKF 将把它的偏航对准 GSF 估计值并开始使用 GPS。 #### 双 GPS 接收器 -GPS接收器提供的数据可以用基于所报告数据的精确度的加权算法混合(如果两者都以相同的速度输出数据并使用相同的精确度,这样做效果最好)。 -如果来自接收器的数据丢失,该机制还提供了自动故障转移,(例如,它允许使用标准 GPS 作为更精确的 RTK 接收器的备份)。 -This is controlled by the [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) parameter. +可以使用一种算法混合来自 GPS 接收机的数据,该算法根据报告的精度对数据进行加权(如果两个接收机以相同的速率输出数据并使用相同的精度,效果最佳)。 +如果来自接收机的数据丢失,该机制还提供自动故障转移(例如,它允许使用标准 GPS 作为更精确的 RTK 接收机的备份)。 +这由 [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) 参数控制。 -The [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) parameter is set by default to disable blending and always use the first receiver, so it will have to be set to select which receiver accuracy metrics are used to decide how much each receiver output contributes to the blended solution. -Where different receiver models are used, it is important that the [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) parameter is set to a value that uses accuracy metrics that are supported by both receivers. -For example do not set bit position 0 to `true` unless the drivers for both receivers publish values in the `s_variance_m_s` field of the `vehicle_gps_position` message that are comparable. -由于精确度定义方法不同,例如 CEP 对比 1-sigma 等等,不同制造商的接收器可能很难做到这一点。 +[SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) 参数默认设置为禁用混合并始终使用第一个接收机,因此必须设置它以选择使用哪些接收机精度指标来决定每个接收机输出对混合解算的贡献程度。 +当使用不同的接收机型号时,重要的是将 [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) 参数设置为两个接收机都支持的精度指标值。 +例如,除非两个接收机的驱动程序都在 `vehicle_gps_position` 消息的 `s_variance_m_s` 字段中发布可比较的值,否则不要将第 0 位设置为 `true`。 +由于不同制造商定义精度的方式不同(例如 CEP 与 1-sigma 等),这对于来自不同制造商的接收机可能很困难。 -在设置过程中应检查以下条目: +设置期间应检查以下项目: -- 验证第二接收器的数据是否存在。 - This will be logged as `vehicle_gps_position_1` and can also be checked when connected via the _nsh console_ using the command `listener vehicle_gps_position -i 1`. - The [GPS_2_CONFIG](../advanced_config/parameter_reference.md#GPS_2_CONFIG) parameter will need to be set correctly. -- Check the `s_variance_m_s`, `eph` and `epv` data from each receiver and decide which accuracy metrics can be used. - If both receivers output sensible `s_variance_m_s` and `eph` data, and GPS vertical position is not being used directly for navigation, then setting [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) to 3 is recommended. - Where only `eph` data is available and both receivers do not output `s_variance_m_s` data, set [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) to 2. - Bit position 2 would only be set if the GPS had been selected as the reference height source with the [EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF) parameter and both receivers output sensible `epv` data. -- The output from the blended receiver data is logged as `ekf_gps_position`, and can be checked whilst connect via the nsh terminal using the command `listener ekf_gps_position`. -- 如果接收器以不同的频率输出, 混合输出的频率将是较低的接收器的频率。 - 在可能的情况下,接收器应配置为同样的输出频率。 +- 验证第二个接收机的数据是否存在。 + 这将记录为 `vehicle_gps_position_1`,也可以在连接 _nsh console_ 时使用命令 `listener vehicle_gps_position -i 1` 进行检查。 + [GPS_2_CONFIG](../advanced_config/parameter_reference.md#GPS_2_CONFIG) 参数需要正确设置。 +- 检查来自每个接收机的 `s_variance_m_s`、`eph` 和 `epv` 数据,并决定可以使用哪些精度指标。 + 如果两个接收机都输出合理的 `s_variance_m_s` 和 `eph` 数据,并且 GPS 垂直位置未直接用于导航,则建议将 [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) 设置为 3。 + 如果只有 `eph` 数据可用,且两个接收机都不输出 `s_variance_m_s` 数据,则将 [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) 设置为 2。 + 只有当 GPS 已通过 [EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF) 参数被选为参考高度源,且两个接收机都输出合理的 `epv` 数据时,才会设置第 2 位。 +- 混合接收机数据的输出记录为 `ekf_gps_position`,可以在连接 nsh 终端时使用命令 `listener ekf_gps_position` 进行检查。 +- 如果接收机以不同的速率输出,则混合输出将采用较慢接收机的速率。 + 在可能的情况下,接收机应配置为以相同的速率输出。 -#### 全球导航卫星系统性能要求 +#### GNSS 性能要求 -For the ECL to accept GNSS data for navigation, certain minimum requirements need to be satisfied over a period of time, defined by [EKF2_REQ_GPS_H](../advanced_config/parameter_reference.md#EKF2_REQ_GPS_H) (10 seconds by default). +为了让 ECL 接受 GNSS 数据进行导航,需要在一段时间内满足某些最低要求,该时间由 [EKF2_REQ_GPS_H](../advanced_config/parameter_reference.md#EKF2_REQ_GPS_H) 定义(默认为 10 秒)。 -Minima are defined in the [EKF2_REQ_\*](../advanced_config/parameter_reference.md#EKF2_REQ_EPH) parameters and each check can be enabled/disabled using the [EKF2_GPS_CHECK](../advanced_config/parameter_reference.md#EKF2_GPS_CHECK) parameter. +最小值在 [EKF2_REQ_\*](../advanced_config/parameter_reference.md#EKF2_REQ_EPH) 参数中定义,并且可以使用 [EKF2_GPS_CHECK](../advanced_config/parameter_reference.md#EKF2_GPS_CHECK) 参数启用/禁用每个检查。 -下表显示了从全球导航卫星系统数据中直接报告或计算的各种衡量标准,以及ECL使用的数据的最低要求值。 -In addition, the _Average Value_ column shows typical values that might reasonably be obtained from a standard GNSS module (e.g. u-blox M8 series) - i.e. values that are considered good/acceptable. +下表显示了直接报告或从 GNSS 数据计算出的不同指标,以及 ECL 使用数据所需的最小值。 +此外,_平均值 (Average Value)_ 列显示了可能从标准 GNSS 模块(例如 u-blox M8 系列)合理获得的典型值 - 即被认为良好/可接受的值。 -| 指标 | 最小需求 | 平均值 | 单位 | 备注 | -| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| eph | < 3 ([EKF2_REQ_EPH](../advanced_config/parameter_reference.md#EKF2_REQ_EPH)) | 0.8 | m | 水平位置误差的标准偏差 | -| epv | < 5 ([EKF2_REQ_EPV](../advanced_config/parameter_reference.md#EKF2_REQ_EPV)) | 1.5 | m | 垂直位置误差的标准偏差 | -| Number of satellites | ≥6 ([EKF2_REQ_NSATS](../advanced_config/parameter_reference.md#EKF2_REQ_NSATS)) | 14 | - | | -| sacc | < 0.5 ([EKF2_REQ_SACC](../advanced_config/parameter_reference.md#EKF2_REQ_SACC)) | 0.2 | m/s | 水平速度误差的标准偏差 | -| fix type | ≥ 3 | 4 | - | 0-1: 不修正, 2: 2D 修正, 3: 3D 修正, 4: RTCM 编码差分, 5: 实时动态定位, 浮动, 6: 实时动态定位, 固定, 8: 外推 | -| PDOP | < 2.5 ([EKF2_REQ_PDOP](../advanced_config/parameter_reference.md#EKF2_REQ_PDOP)) | 1.0 | - | 精度降低位置 | -| hpos drift rate | < 0.1 ([EKF2_REQ_HDRIFT](../advanced_config/parameter_reference.md#EKF2_REQ_HDRIFT)) | 0.01 | m/s | 根据所报告的全球导航卫星系统位置计算出的漂移率(在固定状态时)。 | -| vpos drift rate | < 0.2 ([EKF2_REQ_VDRIFT](../advanced_config/parameter_reference.md#EKF2_REQ_VDRIFT)) | 0.02 | m/s | 根据所报告的全球导航卫星系统高度计算出的漂移率(在固定时)。 | -| hspd | < 0.1 ([EKF2_REQ_HDRIFT](../advanced_config/parameter_reference.md#EKF2_REQ_HDRIFT)) | 0.01 | m/s | 所报告的全球导航卫星系统横向速度的筛选星等。 | -| vspd | < 0.2 ([EKF2_REQ_VDRIFT](../advanced_config/parameter_reference.md#EKF2_REQ_VDRIFT)) | 0.02 | m/s | 所报告的全球导航卫星系统垂直速度的滤波量级。 | +| 指标 (Metric) | 最低要求 | 平均值 (Average Value) | 单位 (Units) | 备注 | +| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| eph | < 3 ([EKF2_REQ_EPH](../advanced_config/parameter_reference.md#EKF2_REQ_EPH)) | 0.8 | 米 | 水平位置误差的标准偏差 | +| epv | < 5 ([EKF2_REQ_EPH](../advanced_config/parameter_reference.md#EKF2_REQ_EPV)) | 1.5 | 米 | 垂直位置误差的标准偏差 | +| 卫星数量 | ≥ 6 ([EKF2_REQ_EPH](../advanced_config/parameter_reference.md#EKF2_REQ_NSATS)) | 14 | - | | +| sacc | < 0.5 ([EKF2_REQ_EPH](../advanced_config/parameter_reference.md#EKF2_REQ_SACC)) | 0.2 | 米/秒 | 水平速度误差的标准偏差 | +| 定位类型 (fix type) | ≥ 3 | 4 | - | 0-1: 无定位, 2: 2D 定位, 3: 3D 定位, 4: RTCM 码差分, 5: 实时动态 (RTK) 浮点解, 6: 实时动态 (RTK) 固定解, 8: 外推值 | +| 位置精度衰減因子(PDOP) | < 2.5 ([EKF2_REQ_EPH](../advanced_config/parameter_reference.md#EKF2_REQ_PDOP)) | 1.0 | - | 位置精度衰减 | +| hpos 漂移率 | < 0.1 ([EKF2_REQ_EPH](../advanced_config/parameter_reference.md#EKF2_REQ_HDRIFT)) | 0.01 | 米/秒 | 静止时基于 GNSS 位置计算的漂移率 | +| vpos 漂移率 | < 0.2 ([EKF2_REQ_EPH](../advanced_config/parameter_reference.md#EKF2_REQ_VDRIFT)) | 0.02 | 米/秒 | 静止时基于 GNSS 高度计算的漂移率。 | +| hspd | < 0.1 ([EKF2_REQ_EPH](../advanced_config/parameter_reference.md#EKF2_REQ_HDRIFT)) | 0.01 | 米/秒 | 报告的 GNSS 水平速度的滤波幅值。 | +| 报告的 GNSS 垂直速度的滤波幅值。 | < 0.2 ([EKF2_REQ_EPH](../advanced_config/parameter_reference.md#EKF2_REQ_VDRIFT)) | 0.02 | 米/秒 | 所报告的全球导航卫星系统垂直速度的滤波量级。 | :::info -The `hpos_drift_rate`, `vpos_drift_rate` and `hspd` are calculated over a period of 10 seconds and published in the `ekf2_gps_drift` topic. -Note that `ekf2_gps_drift` is not logged! +`hpos_drift_rate`、`vpos_drift_rate` 和 `hspd` 是在 10 秒的时间段内计算的,并在 `ekf2_gps_drift` 主题中发布。 +注意 `ekf2_gps_drift` 不会被记录! ::: -#### GNSS Fault Detection +#### GNSS 故障检测 -PX4's GNSS fault detection protects against malicious or erroneous GNSS signals using selective fusion control based on measurement validation. +PX4 的 GNSS 故障检测使用基于测量验证的选择性融合控制来防止恶意或错误的 GNSS 信号。 -The fault detection logic depends on the GPS mode, and also operates differently for horizontal position and altitude measurements. -The mode is set using the [EKF2_GPS_MODE](../advanced_config/parameter_reference.md#EKF2_GPS_MODE) parameter: +故障检测逻辑取决于 GPS 模式,并且对于水平位置和高度测量的操作也有所不同。 +该模式使用 [EKF2_GPS_MODE](../advanced_config/parameter_reference.md#EKF2_GPS_MODE) 参数设置: -- **Automatic (`0`)** (Default): Assumes that GNSS is generally reliable and is likely to be recovered. - EKF2 resets on fusion timeouts if no other source of position is available. -- **Dead-reckoning (`1`)**: Assumes that GNSS might be lost indefinitely, so resets should be avoided while we have other estimates of position data. - EKF2 may reset if no other sources of position or velocity are available. - If GNSS altitude OR horizontal position data drifts, the system disables fusion of both measurements simultaneously (even if one would still pass validation) and avoids performing resets. +- **自动 (`0`)** (默认): 假设 GNSS 通常是可靠的,并且很可能会恢复。 + 如果此时没有其他位置源可用,EKF2 会在融合超时时重置。 +- **航位推算 (`1`)**: 假设 GNSS 可能会无限期丢失,因此当我们有其他位置数据估计时应避免重置。 + 如果没有其他位置或速度源可用,EKF2 可能会重置。 + 如果 GNSS 高度或水平位置数据漂移,系统将同时禁用这两个测量值的融合(即使其中一个仍能通过验证),并避免执行重置。 -##### Detection Logic +##### 检测逻辑 -Horizontal Position: +水平位置: -- **Automatic mode**: Horizontal position resets to GNSS data if no other horizontal position source is currently being fused (e.g., Auxiliary Global Position - AGP). -- **Dead-reckoning mode**: Horizontal position resets to GNSS data only if no other horizontal position OR velocity source is currently being fused (e.g., AGP, airspeed, optical flow). +- **自动模式**: 如果当前没有融合其他水平位置源(例如:辅助全局位置 - AGP),水平位置将重置为 GNSS 数据。 +- **航位推算模式**: 仅当当前没有融合其他水平位置或速度源(例如:AGP、空速、光流)时,水平位置才会重置为 GNSS 数据。 -Altitude: +高度: -- The altitude logic is more complex due to the height reference sensor ([EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF)) parameter, which is typically set to GNSS or baro in GNSS-denied scenarios. -- If height reference is set to baro, GNSS-based height resets are prevented (except when baro fusion fails completely and height reference automatically switches to GNSS). -- When height reference is set to GNSS: -- **Automatic mode**: Resets occur on drifting GNSS altitude measurements. -- **Dead-reckoning mode**: When validation starts failing, the system prevents GNSS altitude resets and labels the GNSS data as faulty. +- 由于高度参考传感器 ([EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF)) 参数(在无 GNSS 场景中通常设置为 GNSS 或气压计),高度逻辑更加复杂。 +- 如果高度参考设置为气压计,则防止基于 GNSS 的高度重置(除非气压计融合完全失败且高度参考自动切换到 GNSS)。 +- 当高度参考设置为 GNSS 时: +- **自动模式**: 在 GNSS 高度测量值漂移时发生重置。 +- **航位推算模式**: 当验证开始失败时,系统会阻止 GNSS 高度重置并将 GNSS 数据标记为故障。 -##### Faulty GNSS Data During Boot +##### 启动期间的错误 GNSS 数据 -The system cannot automatically detect faulty GNSS data during vehicle boot as no baseline comparison exists. +系统无法在载具启动期间自动检测错误的 GNSS 数据,因为不存在基线比较。 -If GNSS fusion is enabled ([EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL)), operators will observe incorrect positions on maps and should disable GNSS fusion, then manually set the correct position via ground control station. -The global position gets corrected, and if [SENS_BAR_AUTOCAL](../advanced_config/parameter_reference.md#SENS_BAR_AUTOCAL) was enabled, baro offsets are automatically adjusted (through bias correction, not parameter changes). +如果启用了 GNSS 融合 ([EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL)),操作员将在地图上观察到不正确的位置,并应禁用 GNSS 融合,然后通过地面站手动设置正确的位置。 +全局位置得到修正,如果启用了 [SENS_BAR_AUTOCAL](../advanced_config/parameter_reference.md#SENS_BAR_AUTOCAL),气压计偏移量会自动调整(通过零偏校正,而不是参数更改)。 -##### Enabling GNSS Fusion Mid-Flight +##### 飞行中启用 GNSS 融合 -With Faulty GNSS Data: +存在错误 GNSS 数据时: -- **Automatic mode**: Vehicle will reset to faulty position - potentially dangerous. -- **Dead-reckoning mode**: Large measurement differences cause GNSS rejection and fault detection activation. +- **自动模式**: 载具将重置到错误位置 - 具有潜在危险。 +- **航位推算模式**: 大的测量差异会导致 GNSS 被拒绝并激活故障检测。 -With Valid GNSS Data: +存在有效 GNSS 数据时: -- **Automatic mode**: Vehicle will reset to GNSS measurements. -- **Dead-reckoning mode**: If estimated position/altitude is close enough to measurements, fusion resumes; if too far apart, data gets labeled as faulty. +- **自动模式**: 载具将重置到 GNSS 测量值。 +- **航位推算模式**: 如果估计位置/高度与测量值足够接近,则恢复融合;如果相距太远,数据将被标记为故障。 ##### 备注 -- **Dual Detection**: Horizontal and altitude checks run completely separately but both lead to the same result when triggered - all GNSS fusion gets disabled. -- **Recovery**: Only the specific check that labeled data as invalid can re-enable fusion. -- **Alternative Sources**: Dead-reckoning mode provides enhanced protection by requiring absence of alternative navigation sources before allowing resets. -- **Boot Vulnerability**: Initial faulty GNSS data cannot be detected automatically; requires operator intervention and manual position correction. +- **双重检测**: 水平和高度检查完全分开运行,但在触发时都会导致相同的结果 - 所有 GNSS 融合被禁用。 +- **恢复**: 只有将数据标记为无效的特定检查才能重新启用融合。 +- **替代来源**: 航位推算模式通过在允许重置之前要求没有替代导航源,提供了增强的保护。 +- **启动漏洞**: 初始错误 GNSS 数据无法自动检测;需要操作员干预和手动位置校正。 ### 测距仪 -[Range finder](../sensor/rangefinders.md) distance to ground is used by a single state filter to estimate the vertical position of the terrain relative to the height datum. +[测距仪](../sensor/rangefinders.md) 对地距离由单状态滤波器使用,用于估计地形相对于高度基准的垂直位置。 -The fusion modes of operation are controlled by [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL): +融合操作模式由 [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) 控制: -1. [Conditional range aiding](#conditional-range-aiding) -2. [Range height fusion](#range-height-fusion) +1. [条件测距辅助](#conditional-range-aiding) +2. [测距高度融合](#range-height-fusion) -For more details about the configuration of height sources, [click here](#height). +有关高度源配置的更多详细信息,请 [点击这里](#height)。 -#### Conditional range aiding +#### 条件测距辅助 -Conditional range finder fusion (a.k.a. _Conditional range aid_) activates the range finder fusion for height estimation during low speed/low altitude operation (in addition to the other active height sources). -If the range finder is set as the reference height source (using [EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF)), the other active height sources such as baro and GNSS altitude will adjust their measurement to match the readings of the range finder over time. -When the conditions are not met to start range aiding, a secondary reference is automatically selected. +条件测距仪融合(又名 _条件测距辅助_)在低速/低空操作期间激活测距仪融合以进行高度估计(除了其他活动的高度源之外)。 +如果测距仪被设置为参考高度源(使用 [EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF)),其他活动的高度源(如气压计和 GNSS 高度)将随着时间的推移调整其测量值以匹配测距仪的读数。 +当不满足启动测距辅助的条件时,会自动选择次要参考。 :::info -Switching between height references causes the absolute altitude estimate to drift over time. -This isn't an issue when flying in position mode but can be problematic if the drone is supposed to fly a mission at a specific GNSS altitude. -If the absolute altitude drift is unwanted, it is recommended to set the GNSS altitude as the height reference, even when using conditional range aid. +在高度参考之间切换会导致绝对高度估计随时间漂移。 +当在位置模式下飞行时,这不是问题,但如果无人机应该在特定的 GNSS 高度执行任务,则可能会有问题。 +如果不希望出现绝对高度漂移,建议将 GNSS 高度设置为高度参考,即使在使用条件测距辅助时也是如此。 ::: -It is primarily intended for _takeoff and landing_, in cases where the barometer setup is such that interference from rotor wash is excessive and can corrupt EKF state estimates. +它主要用于 _起飞和降落_,在这些情况下,气压计的设置可能会受到旋翼气流的过度干扰,从而破坏 EKF 状态估计。 -Range aid may also be used to improve altitude hold when the vehicle is stationary. +测距辅助也可用于改善载具静止时的高度保持。 :::tip -[Terrain Hold](../flying/terrain_following_holding.md#terrain_hold) is recommended over _Range Aid_ for terrain holding. -This is because terrain hold uses the normal ECL/EKF estimator for determining height, and this is generally more reliable than a distance sensor in most conditions. +对于地形保持,推荐使用 [地形保持](../flying/terrain_following_holding.md#terrain_hold) 而不是 _测距辅助_。 +这是因为地形保持使用正常的 ECL/EKF 估计器来确定高度,这在大多数情况下比距离传感器更可靠。 ::: -_Conditional range aid_ is enabled by setting [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) = "Enabled (conditional mode)" (1). +_条件测距辅助_ 通过设置 [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) = "Enabled (conditional mode)" (1) 来启用。 -It is further configured using the `EKF2_RNG_A_` parameters: +它使用 `EKF2_RNG_A_` 参数进一步配置: -- [EKF2_RNG_A_VMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_VMAX): Maximum horizontal speed, above which range aid is disabled. -- [EKF2_RNG_A_HMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_HMAX): Maximum height, above which range aid is disabled. +- [EKF2_RNG_A_VMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_VMAX): 最大水平速度,高于此速度将禁用测距辅助。 +- [EKF2_RNG_A_HMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_HMAX): 最大高度,高于此高度将禁用测距辅助。 -#### Range height fusion +#### 测距高度融合 -PX4 allows you to continuously fuse the range finder as a source of height (in any flight mode/vehicle type). -This may be useful for applications when the vehicle is _guaranteed_ to only fly over a near-flat surface (e.g. indoors). +PX4 允许您持续融合测距仪作为高度源(在任何飞行模式/载具类型中)。 +当载具 _保证_ 仅在接近平坦的表面上飞行(例如室内)时,这可能对应用程序有用。 -When using a distance sensor as a height source, fliers should be aware: +当使用距离传感器作为高度源时,飞行者应注意: -- Flying over obstacles can lead to the estimator rejecting rangefinder data (due to internal data consistency checks), which can result in poor altitude holding while the estimator is relying purely on accelerometer estimates. +- 飞越障碍物可能导致估计器拒绝测距仪数据(由于内部数据一致性检查),这可能导致高度保持效果不佳,而估计器仅依赖加速度计估计。 - ::: info - This scenario might occur when a vehicle ascends a slope at a near-constant height above ground, because the rangefinder altitude does not change while that estimated from the accelerometer does. - The EKF performs innovation consistency checks that take into account the error between measurement and current state as well as the estimated variance of the state and the variance of the measurement itself. - If the checks fail the rangefinder data will be rejected, and the altitude will be estimated from the accelerometer and the other selected height sources (GNSS, baro, vision), if enabled and available - After 5 seconds of inconsistent data if the distance sensor is the active source oh height data, the estimator resets the height state to match the current distance sensor data. - If one or more other sources of height are active, the range finder is declared faulty and the estimator continues to estimate its height using the other sensors. - The measurements might also become consistent again, for example, if the vehicle descends, or if the estimated height drifts to match the measured rangefinder height. + 这种情况可能会发生在载具以相对于地面几乎恒定的高度爬坡时,因为测距仪高度没有变化,而加速度计估计的高度却在变化。 + EKF 执行新息一致性检查,该检查考虑了测量值与当前状态之间的误差以及状态的估计方差和测量本身的方差。 + 如果检查失败,测距仪数据将被拒绝,高度将根据加速度计和其他选定的高度源(GNSS、气压计、视觉,如果启用且可用)进行估计。 + 如果距离传感器是活动的高度数据源,在数据不一致持续 5 秒后,估计器会重置高度状态以匹配当前的距离传感器数据。 + 如果一个或多个其他高度源处于活动状态,则测距仪被声明为故障,估计器继续使用其他传感器估计其高度。 + 测量值也可能再次变得一致,例如,如果载具下降,或者如果估计的高度漂移以匹配测量的测距仪高度。 ::: -- The local NED origin will move up and down with ground level. +- 局部 NED 原点将随地平面上下移动。 -- Rangefinder performance over uneven surfaces (e.g. trees) can be very poor, resulting in noisy and inconsistent data. - This again leads to poor altitude hold. +- 测距仪在不平坦表面(例如树木)上的性能可能非常差,导致数据嘈杂且不一致。 + 这同样会导致高度保持不佳。 -The feature is enabled by setting [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) to "Enabled" (2). -To make the range finder the height reference when active, set: [EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF) to "Range sensor". +该功能通过将 [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) 设置为 "Enabled" (2) 来启用。 +要在活动时使测距仪成为高度参考,请设置:[EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF) 为 "Range sensor"。 :::tip -To enable the range finder fusion only when the drone is stationary (in order to benefit from a better altitude estimate during takeoff and landing) but not fuse the range finder the rest of the time, use the [conditional mode](#conditional-range-aiding) (1) of [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL). +要仅在无人机静止时启用测距仪融合(以便在起飞和降落期间获得更好的高度估计),但在其余时间不融合测距仪,请使用 [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) 的 [条件模式](#conditional-range-aiding) (1)。 ::: -#### Range Finder Obstruction Detection +#### 测距仪遮挡检测 -The EKF can detect whether the rangefinder path-to-ground is obstructed (perhaps by a payload) using a kinematic consistency check between the vertical velocity estimate and the numerical derivative of the range finder data. -If the range finder is statistically inconsistent with EKF2, the sensor is rejected for the rest of the flight unless the statistical test passes again for at least 1 second at a vertical speed of 0.5m/s or more. +EKF 可以使用垂直速度估计值与测距仪数据数值导数之间的运动学一致性检查,来检测测距仪对地路径是否被遮挡(可能被负载遮挡)。 +如果测距仪在统计上与 EKF2 不一致,则在本次飞行的剩余时间内传感器将被拒绝,除非统计测试在 0.5m/s 或更高的垂直速度下再次通过至少 1 秒。 -The check is only enabled when the rangefinder is not used as the primary height source, and is only active while the vehicle is not moving horizontally (as it assumes a static ground height). +该检查仅在测距仪未用作主要高度源时启用,并且仅在载具未水平移动时处于活动状态(因为它假设地面高度是静态的)。 -For effective obstruction detection, the range finder noise parameter needs to be tightly tuned using flight data. -The kinematic consistency gate parameter can then be adjusted to obtain the desired fault detection sensitivity. +为了进行有效的遮挡检测,需要使用飞行数据对测距仪噪声参数进行严格调整。 +然后可以调整运动学一致性门限参数以获得所需的故障检测灵敏度。 -调整参数: +调参参数: - [EKF2_RNG_NOISE](../advanced_config/parameter_reference.md#EKF2_RNG_NOISE) - [EKF2_RNG_K_GATE](../advanced_config/parameter_reference.md#EKF2_RNG_K_GATE) ### 空速: -Equivalent Airspeed (EAS) data can be used to estimate wind velocity and reduce drift when GPS is lost by setting [EKF2_ARSP_THR](../advanced_config/parameter_reference.md#EKF2_ARSP_THR) to a positive value. -Airspeed data will be used when it exceeds the threshold set by a positive value for [EKF2_ARSP_THR](../advanced_config/parameter_reference.md#EKF2_ARSP_THR) and the vehicle type is not rotary wing. +通过将 [EKF2_ARSP_THR](../advanced_config/parameter_reference.md#EKF2_ARSP_THR) 设置为正值,可以使用等效空速 (EAS) 数据来估计风速并在 GPS 丢失时减少漂移。 +当空速超过 [EKF2_ARSP_THR](../advanced_config/parameter_reference.md#EKF2_ARSP_THR) 正值设置的阈值且载具类型不是旋翼机时,将使用空速数据。 ### 合成侧滑 -Fixed-wing platforms can take advantage of an assumed sideslip observation of zero to improve wind speed estimation and also enable wind speed estimation without an airspeed sensor. -This is enabled by setting the [EKF2_FUSE_BETA](../advanced_config/parameter_reference.md#EKF2_FUSE_BETA) parameter to 1. +固定翼平台可以利用假设的零侧滑观测来改善风速估计,并且还可以在没有空速传感器的情况下启用风速估计。 +这是通过将 [EKF2_FUSE_BETA](../advanced_config/parameter_reference.md#EKF2_FUSE_BETA) 参数设置为 1 来启用的。 -### Multicopter Wind Estimation using Drag Specific Forces {#mc_wind_estimation_using_drag} +### 使用阻力比力的多旋翼风速估计 {#mc_wind_estimation_using_drag} -多旋翼平台可以利用沿 X 和 Y 机体轴的空速和阻力之间的关系来估计风速的北/东分量。 -This can be enabled using [EKF2_DRAG_CTRL](../advanced_config/parameter_reference.md#EKF2_DRAG_CTRL). +多旋翼平台可以利用空速与沿 X 和 Y 机体轴的阻力之间的关系来估计风速的北/东分量。 +可以使用 [EKF2_DRAG_CTRL](../advanced_config/parameter_reference.md#EKF2_DRAG_CTRL) 启用此功能。 -The relationship between airspeed and specific force (IMU accelerometer measurements) along the X and Y body axes is controlled by the [EKF2_BCOEF_X](../advanced_config/parameter_reference.md#EKF2_BCOEF_X), [EKF2_BCOEF_Y](../advanced_config/parameter_reference.md#EKF2_BCOEF_Y) and [EKF2_MCOEF](../advanced_config/parameter_reference.md#EKF2_MCOEF) parameters which set the ballistic coefficients for flight in the X and Y directions, and the momentum drag produced by the propellers, respectively. -The amount of specific force observation noise is set by the [EKF2_DRAG_NOISE](../advanced_config/parameter_reference.md#EKF2_DRAG_NOISE) parameter. +空速与沿 X 和 Y 机体轴的比力(IMU 加速度计测量值)之间的关系由 [EKF2_BCOEF_X](../advanced_config/parameter_reference.md#EKF2_BCOEF_X)、[EKF2_BCOEF_Y](../advanced_config/parameter_reference.md#EKF2_BCOEF_Y) 和 [EKF2_MCOEF](../advanced_config/parameter_reference.md#EKF2_MCOEF) 参数控制,这些参数分别设置 X 和 Y 方向飞行的弹道系数以及螺旋桨产生的动量阻力。 +比力观测噪声的大小由 [EKF2_DRAG_NOISE](../advanced_config/parameter_reference.md#EKF2_DRAG_NOISE) 参数设置。 -以下方法可获得良好的调参参数: +可以通过以下方式获得良好的调参: -1. Fly once in [Position mode](../flight_modes_mc/position.md) repeatedly forwards/backwards/left/right/up/down between rest and maximum speed (best results are obtained when this testing is conducted in still conditions). -2. Extract the **.ulg** log file using, for example, [QGroundControl: Analyze > Log Download](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/log_download.html) +1. 在 [位置模式](../flight_modes_mc/position.md) 下反复向前/向后/向左/向右/向上/向下飞行,在静止和最大速度之间切换(在静风条件下进行此测试可获得最佳结果)。 +2. 使用例如 [QGroundControl: Analyze > Log Download](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/log_download.html) 提取 **.ulg** 日志文件。 ::: info - The same **.ulg** log file can also be used to tune the [static pressure position error coefficients](#correction-for-static-pressure-position-error). + 同一 **.ulg** 日志文件也可用于调整 [静压位置误差系数](#correction-for-static-pressure-position-error)。 ::: -3. Use the log with the [mc_wind_estimator_tuning.py](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/ekf2/EKF/python/tuning_tools/mc_wind_estimator) Python script to obtain the optimal set of parameters. +3. 使用 [mc_wind_estimator_tuning.py](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/ekf2/EKF/python/tuning_tools/mc_wind_estimator) Python 脚本处理日志,以获得最佳参数集。 ### 光流 -[Optical flow](../sensor/optical_flow.md) data will be used if the following conditions are met: +如果满足以下条件,将使用 [光流](../sensor/optical_flow.md) 数据: - 有效的测距仪数据可用。 -- [EKF2_OF_CTRL](../advanced_config/parameter_reference.md#EKF2_OF_CTRL) is set. -- The quality metric returned by the flow sensor is greater than the minimum requirement set by the [EKF2_OF_QMIN](../advanced_config/parameter_reference.md#EKF2_OF_QMIN) parameter. +- [EKF2_OF_CTRL](../advanced_config/parameter_reference.md#EKF2_OF_CTRL) 已设置。 +- 流量传感器返回的质量指标大于 [EKF2_OF_QMIN](../advanced_config/parameter_reference.md#EKF2_OF_QMIN) 参数设置的最低要求。 -For better performance, set the location of the optical flow sensor as described [here](../sensor/optical_flow.md#ekf2). +为了获得更好的性能,请按照 [此处](../sensor/optical_flow.md#ekf2) 所述设置光流传感器的位置。 -If a stable hover can be achieved at low altitude above ground (< 10m) but slow oscillations occur at higher altitude, consider adjusting the [optical flow scale factor](../sensor/optical_flow.md#scale-factor). +如果在低空(< 10m)可以实现稳定的悬停,但在较高高度出现缓慢振荡,请考虑调整 [光流比例因子](../sensor/optical_flow.md#scale-factor)。 ### 外部视觉系统 -Position, velocity or orientation measurements from an external vision system, e.g. Vicon, can be used. +可以使用来自外部视觉系统(例如 Vicon)的位置、速度或方向测量值。 -The measurements that are fused are configured by setting the appropriate bits of [EKF2_EV_CTRL](../advanced_config/parameter_reference.md#EKF2_EV_CTRL) to `true`: +通过将 [EKF2_EV_CTRL](../advanced_config/parameter_reference.md#EKF2_EV_CTRL) 的相应位设置为 `true` 来配置融合的测量值: - `0`: 水平位置数据 -- `1`: Vertical position data. - Height sources may additionally be configured using [EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF) (see section [Height](#height)). +- `1`: 垂直位置数据。 + 垂直位置数据。 + 高度源还可以使用 [EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF) 进行配置(参见 [高度](#height) 部分)。 - `2`:速度数据 - `3`:偏航角数据 -Note that if yaw data is used (bit 3) the heading is with respect to the external vision frame; otherwise the heading is relative to North. +注意,如果使用偏航数据(第 3 位),则航向是相对于外部视觉坐标系的;否则航向是相对于北方的。 -EKF 要考虑视觉姿态估计的不确定性。 -This uncertainty information can be sent via the covariance fields in the MAVLink [ODOMETRY](https://mavlink.io/en/messages/common.html#ODOMETRY) message or it can be set through the parameters [EKF2_EVP_NOISE](../advanced_config/parameter_reference.md#EKF2_EVP_NOISE), [EKF2_EVV_NOISE](../advanced_config/parameter_reference.md#EKF2_EVV_NOISE) and [EKF2_EVA_NOISE](../advanced_config/parameter_reference.md#EKF2_EVA_NOISE). -You can choose the source of the uncertainty with [EKF2_EV_NOISE_MD](../advanced_config/parameter_reference.md#EKF2_EV_NOISE_MD). +EKF 会考虑视觉位姿估计中的不确定性。 +此不确定性信息可以通过 MAVLink [ODOMETRY](https://mavlink.io/en/messages/common.html#ODOMETRY) 消息中的协方差字段发送,也可以通过参数 [EKF2_EVP_NOISE](../advanced_config/parameter_reference.md#EKF2_EVP_NOISE)、[EKF2_EVV_NOISE](../advanced_config/parameter_reference.md#EKF2_EVV_NOISE) 和 [EKF2_EVA_NOISE](../advanced_config/parameter_reference.md#EKF2_EVA_NOISE) 进行设置。 +您可以使用 [EKF2_EV_NOISE_MD](../advanced_config/parameter_reference.md#EKF2_EV_NOISE_MD) 选择不确定性的来源。 -## 我如何启用 'ecl' 库中的 EKF ? +## 如何使用 'ecl' 库 EKF? -EKF2 is enabled by default (for more information see [Switching State Estimators](../advanced/switching_state_estimators.md) and [EKF2_EN](../advanced_config/parameter_reference.md#EKF2_EN)). +EKF2 默认启用(有关更多信息,请参阅 [切换状态估计器](../advanced/switching_state_estimators.md) 和 [EKF2_EN](../advanced_config/parameter_reference.md#EKF2_EN))。 -## ecl EKF 和其它估计器相比的优点和缺点是什么? +## 如何使用 'ecl' 库 EKF? -与所有估计器一样,大部分性能来自调参以匹配传感器特性。 -调参是准确性和鲁棒性之间的折衷,虽然我们试图提供满足大多数用户需求的调优,但是应用程序需要调整更改。 +像所有估计器一样,大部分性能来自于与传感器特性相匹配的调参。 +调参是精度和鲁棒性之间的折衷,虽然我们试图提供满足大多数用户需求的参数,但仍会有需要更改参数的应用。 -For this reason, no claims for accuracy relative to the legacy combination of `attitude_estimator_q` + `local_position_estimator` have been made and the best choice of estimator will depend on the application and tuning. +因此,相对于 `attitude_estimator_q` + `local_position_estimator` 的传统组合,我们不对精度做出声明,最佳的估计器选择将取决于应用和调参。 ### 缺点 -- ecl EKF 是一种复杂的算法,需要很好地理解扩展卡尔曼滤波器理论及其应用于导航中的问题才能成功调参。 - 因此,不知道怎么修改,用户就很难得到好结果。 -- ecl EKF 使用更多 RAM 和闪存空间。 +- ecl EKF 是一个复杂的算法,需要充分理解扩展卡尔曼滤波理论及其在导航问题中的应用才能成功调参。 + 因此,对于没有获得良好结果的用户来说,知道要更改什么比较困难。 +- ecl EKF 使用更多的 RAM 和闪存空间。 - ecl EKF 使用更多的日志空间。 -### 优势 +### 优点 -- ecl EKF 能够以数学上一致的方式融合来自具有不同时间延迟和数据速率的传感器的数据,一旦正确设置时间延迟参数,就可以提高动态操作期间的准确性。 -- ecl EKF 能够融合各种不同的传感器类型。 -- 当 ecl EKF 检测并报告传感器数据中统计上显着的不一致性,将帮助诊断传感器错误。 -- For fixed-wing operation, the ecl EKF estimates wind speed with or without an airspeed sensor and is able to use the estimated wind in combination with airspeed measurements and sideslip assumptions to extend the dead-reckoning time available if GPS is lost in flight. -- ecl EKF估计3轴加速度计偏差,这提高了尾座式无人机和其它机体在飞行阶段之间经历大的姿态变化时的精度。 +- ecl EKF 能够以数学上一致的方式融合来自具有不同时间延迟和数据速率的传感器的数据,一旦正确设置时间延迟参数,即可提高动态机动期间的精度。 +- ecl EKF 能够融合各种不同类型的传感器。 +- ecl EKF 检测并报告传感器数据中统计上的显著不一致,协助诊断传感器错误。 +- 对于固定翼操作,ecl EKF 在有或没有空速传感器的情况下均可估计风速,并且能够在飞行中 GPS 丢失时结合空速测量和侧滑假设来使用估计的风速,以延长可用的航位推算时间。 +- ecl EKF 估计三轴加速度计零偏,这提高了尾座式飞机和其他在飞行阶段之间经历大姿态变化的载具的精度。 - 联邦结构(组合姿态和位置/速度估计)意味着姿态估计受益于所有传感器测量。 如果调参正确,这应该提供改善态度估计的潜力。 ## 如何检查 EKF 性能? -EKF 输出,状态和状态数据发布到许多 uORB 主题,这些主题在飞行期间记录到 SD 卡上。 -The following guide assumes that data has been logged using the _.ulog file format_. -The **.ulog** format data can be parsed in python by using the [PX4 pyulog library](https://github.com/PX4/pyulog). +EKF 输出、状态和状态数据发布到许多 uORB 主题,这些主题在飞行期间记录到 SD 卡。 +以下指南假设已使用 _.ulog 文件格式_ 记录数据。 +可以使用 [PX4 pyulog 库](https://github.com/PX4/pyulog) 在 python 中解析 **.ulog** 格式数据。 -Most of the EKF data is found in the [EstimatorInnovations](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorInnovations.msg) and [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg) uORB messages that are logged to the .ulog file. +大多数 EKF 数据可以在记录到 .ulog 文件的 [EstimatorInnovations](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorInnovations.msg) 和 [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg) uORB 消息中找到。 -A python script that automatically generates analysis plots and metadata can be found [here](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/ecl_ekf/process_logdata_ekf.py). -To use this script file, cd to the `Tools/ecl_ekf` directory and enter `python process_logdata_ekf.py `. -This saves performance metadata in a csv file named **.mdat.csv** and plots in a pdf file named `.pdf`. +可以在 [这里](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/ecl_ekf/process_logdata_ekf.py) 找到自动生成分析图和元数据的 python 脚本。 +要使用此脚本文件,请 cd 到 `Tools/ecl_ekf` 目录并输入 `python process_logdata_ekf.py `。 +这将性能元数据保存在名为 **.mdat.csv** 的 csv 文件中,并将图表保存在名为 `.pdf` 的 pdf 文件中。 -Multiple log files in a directory can be analysed using the [batch_process_logdata_ekf.py](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/ecl_ekf/batch_process_logdata_ekf.py) script. -When this has been done, the performance metadata files can be processed to provide a statistical assessment of the estimator performance across the population of logs using the [batch_process_metadata_ekf.py](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/ecl_ekf/batch_process_metadata_ekf.py) script. +可以使用 [batch_process_logdata_ekf.py](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/ecl_ekf/batch_process_logdata_ekf.py) 脚本分析目录中的多个日志文件。 +完成后,可以使用 [batch_process_metadata_ekf.py](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/ecl_ekf/batch_process_metadata_ekf.py) 脚本处理性能元数据文件,以对日志总体的估计器性能进行统计评估。 ### 输出数据 -- Attitude output data is found in the [VehicleAttitude](https://github.com/PX4/PX4-Autopilot/blob/main/msg/versioned/VehicleAttitude.msg) message. -- Local position output data is found in the [VehicleLocalPosition](https://github.com/PX4/PX4-Autopilot/blob/main/msg/versioned/VehicleLocalPosition.msg) message. -- Global \(WGS-84\) output data is found in the [VehicleGlobalPosition](https://github.com/PX4/PX4-Autopilot/blob/main/msg/versioned/VehicleGlobalPosition.msg) message. -- Wind velocity output data is found in the [Wind.msg](https://github.com/PX4/PX4-Autopilot/blob/main/msg/Wind.msg) message. +- 姿态输出数据位于 [VehicleAttitude](https://github.com/PX4/PX4-Autopilot/blob/main/msg/versioned/VehicleAttitude.msg) 消息中。 +- 局部位置输出数据位于 [VehicleLocalPosition](https://github.com/PX4/PX4-Autopilot/blob/main/msg/versioned/VehicleLocalPosition.msg) 消息中。 +- 全局 (WGS-84) 输出数据位于 [VehicleGlobalPosition](https://github.com/PX4/PX4-Autopilot/blob/main/msg/versioned/VehicleGlobalPosition.msg) 消息中。 +- 风速输出数据位于 [Wind.msg](https://github.com/PX4/PX4-Autopilot/blob/main/msg/Wind.msg) 消息中。 ### 状态 -Refer to states\[24\] in [EstimatorStates](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStates.msg). -The index map for states\[24\] is as follows: +参考 [EstimatorStates](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStates.msg) 中的 states\[24\]。 +states\[24\] 的索引映射如下: -- \[0 ... 3\] Quaternions -- \[4 ... 6\] Velocity NED \(m/s\) -- \[7 ... 9\] Position NED \(m\) -- \[10 ... 12\] IMU delta angle bias XYZ \(rad\) -- \[13 ... 15\] IMU delta velocity bias XYZ \(m/s\) -- \[16 ... 18\] Earth magnetic field NED \(gauss\) -- \[19 ... 21\] Body magnetic field XYZ \(gauss\) -- \[22 ... 23\] Wind velocity NE \(m/s\) +- \[0 ... 3\] 四元数 +- \[4 ... 6\] 速度 NED \(m/s\) +- \[7 ... 9\] 位置 NED \(m\) +- \[10 ... 12\] IMU 角度增量零偏 XYZ \(rad\) +- \[13 ... 15\] IMU 速度增量零偏 XYZ \(m/s\) +- \[16 ... 18\] 地球磁场 NED \(gauss\) +- \[19 ... 21\] 机体磁场 XYZ \(gauss\) +- \[22 ... 23\] 风速 NE \(m/s\) ### 状态方差 -Refer to covariances\[24\] in [EstimatorStates](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStates.msg). -The index map for covariances\[24\] is as follows: +参考 [EstimatorStates](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStates.msg) 中的 covariances\[24\]。 +covariances\[24\] 的索引映射如下: -- \[0 ... 3\] Quaternions -- \[4 ... 6\] Velocity NED \(m/s\)^2 -- \[7 ... 9\] Position NED \(m^2\) -- \[10 ... 12\] IMU delta angle bias XYZ \(rad^2\) -- \[13 ... 15\] IMU delta velocity bias XYZ \(m/s\)^2 -- \[16 ... 18\] Earth magnetic field NED \(gauss^2\) -- \[19 ... 21\] Body magnetic field XYZ \(gauss^2\) -- \[22 ... 23\] Wind velocity NE \(m/s\)^2 +- \[0 ... 3\] 四元数 +- \[4 ... 6\] 速度 NED \(m/s\)^2 +- \[7 ... 9\] 位置 NED \(m^2\) +- \[10 ... 12\] IMU 角度增量零偏 XYZ \(rad^2\) +- \[13 ... 15\] IMU 速度增量零偏 XYZ \(m/s\)^2 +- \[16 ... 18\] 地球磁场 NED \(gauss^2\) +- \[19 ... 21\] 机体磁场 XYZ \(gauss^2\) +- \[22 ... 23\] 风速 NE \(m/s\)^2 -### Observation Innovations & Innovation Variances +### 观测创新量与创新方差 -The observation `estimator_innovations`, `estimator_innovation_variances`, and `estimator_innovation_test_ratios` message fields are defined in [EstimatorInnovations.msg](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorInnovations.msg). -消息都有相同的字段名称/类型(但是单位不同)。 +观测 `estimator_innovations`、`estimator_innovation_variances` 与 `estimator_innovation_test_ratios` 消息字段定义在 [EstimatorInnovations.msg](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorInnovations.msg) 中。 +这些消息字段名称/类型相同(但单位不同)。 :::info -The messages have the same fields because they are generated from the same field definition. -The `# TOPICS` line (at the end of [the file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorInnovations.msg)) lists the names of the set of messages to be created): +这些消息具有相同字段,是因为它们来自同一字段定义。 +`# TOPICS` 行(见 [文件末尾](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorInnovations.msg))列出了要生成的消息名: ``` # TOPICS estimator_innovations estimator_innovation_variances estimator_innovation_test_ratios @@ -640,71 +639,70 @@ The `# TOPICS` line (at the end of [the file](https://github.com/PX4/PX4-Autopil ::: -一些观测值为: +部分观测包括: -- Magnetometer XYZ (gauss, gauss^2) : `mag_field[3]` -- Yaw angle (rad, rad^2) : `heading` -- True Airspeed (m/s, (m/s)^2) : `airspeed` -- Synthetic sideslip (rad, rad^2) : `beta` -- Optical flow XY (rad/sec, (rad/s)^2) : `flow` -- Height above ground (m, m^2) : `hagl` -- Drag specific force ((m/s)^2): `drag` +- 磁力计 XYZ(gauss, gauss^2):`mag_field[3]` +- 航向角(rad, rad^2):`heading` +- 真空速(m/s, (m/s)^2):`airspeed` +- 合成侧滑(rad, rad^2):`beta` +- 光流 XY(rad/sec, (rad/s)^2):`flow` +- 离地高度(m, m^2):`hagl` +- 阻力特定力((m/s)^2):`drag` - 速度和位置新息:每个传感器 此外,每个传感器都有其自己的字段,即横向和纵向位置和/或速度值(视情况而定)。 -这些基本上是自我描述的,现摘录如下: +这些字段基本自说明,下面给出原始定义: ``` -# GPS -float32[2] gps_hvel # horizontal GPS velocity innovation (m/sec) and innovation variance ((m/sec)**2) -float32 gps_vvel # vertical GPS velocity innovation (m/sec) and innovation variance ((m/sec)**2) -float32[2] gps_hpos # horizontal GPS position innovation (m) and innovation variance (m**2) -float32 gps_vpos # vertical GPS position innovation (m) and innovation variance (m**2) +float32[2] gps_hvel # 水平 GPS 速度创新量 (m/sec) 与创新方差 ((m/sec)**2) +float32 gps_vvel # 垂直 GPS 速度创新量 (m/sec) 与创新方差 ((m/sec)**2) +float32[2] gps_hpos # 水平 GPS 位置创新量 (m) 与创新方差 (m**2) +float32 gps_vpos # 垂直 GPS 位置创新量 (m) 与创新方差 (m**2) # External Vision -float32[2] ev_hvel # horizontal external vision velocity innovation (m/sec) and innovation variance ((m/sec)**2) -float32 ev_vvel # vertical external vision velocity innovation (m/sec) and innovation variance ((m/sec)**2) -float32[2] ev_hpos # horizontal external vision position innovation (m) and innovation variance (m**2) -float32 ev_vpos # vertical external vision position innovation (m) and innovation variance (m**2) +float32[2] ev_hvel # 水平外部视觉速度创新量 (m/sec) 与创新方差 ((m/sec)**2) +float32 ev_vvel # 垂直外部视觉速度创新量 (m/sec) 与创新方差 ((m/sec)**2) +float32[2] ev_hpos # 水平外部视觉位置创新量 (m) 与创新方差 (m**2) +float32 ev_vpos # 垂直外部视觉位置创新量 (m) 与创新方差 (m**2) # Fake Position and Velocity -float32[2] fake_hvel # fake horizontal velocity innovation (m/s) and innovation variance ((m/s)**2) -float32 fake_vvel # fake vertical velocity innovation (m/s) and innovation variance ((m/s)**2) -float32[2] fake_hpos # fake horizontal position innovation (m) and innovation variance (m**2) -float32 fake_vpos # fake vertical position innovation (m) and innovation variance (m**2) +float32[2] fake_hvel # 虚拟水平速度创新量 (m/s) 与创新方差 ((m/s)**2) +float32 fake_vvel # 虚拟垂直速度创新量 (m/s) 与创新方差 ((m/s)**2) +float32[2] fake_hpos # 虚拟水平位置创新量 (m) 与创新方差 (m**2) +float32 fake_vpos # 虚拟垂直位置创新量 (m) 与创新方差 (m**2) # Height sensors -float32 rng_vpos # range sensor height innovation (m) and innovation variance (m**2) -float32 baro_vpos # barometer height innovation (m) and innovation variance (m**2) +float32 rng_vpos # 测距高度创新量 (m) 与创新方差 (m**2) +float32 baro_vpos # 气压计高度创新量 (m) 与创新方差 (m**2) # Auxiliary velocity -float32[2] aux_hvel # horizontal auxiliary velocity innovation from landing target measurement (m/sec) and innovation variance ((m/sec)**2) -float32 aux_vvel # vertical auxiliary velocity innovation from landing target measurement (m/sec) and innovation variance ((m/sec)**2) +float32[2] aux_hvel # 来自着陆目标测量的水平辅助速度创新量 (m/sec) 与创新方差 ((m/sec)**2) +float32 aux_vvel # 来自着陆目标测量的垂直辅助速度创新量 (m/sec) 与创新方差 ((m/sec)**2) ``` ### 输出互补滤波器 -输出互补滤波器用于将状态从融合时间范围向前传播到当前时间。 -To check the magnitude of the angular, velocity and position tracking errors measured at the fusion time horizon, refer to `output_tracking_error[3]` in the `ekf2_innovations` message. +输出互补滤波器用于将状态从融合时间地平线推进到当前时间。 +要检查融合时间地平线处测得的角度、速度与位置跟踪误差大小,可参考 `ekf2_innovations` 消息中的 `output_tracking_error[3]`。 索引映射如下: - \[0\] 角度跟踪误差量级 (rad) - \[1\] 速度跟踪误差量级(m/s)。 - The velocity tracking time constant can be adjusted using the [EKF2_TAU_VEL](../advanced_config/parameter_reference.md#EKF2_TAU_VEL) parameter. + 速度跟踪时间常数可通过 [EKF2_TAU_VEL](../advanced_config/parameter_reference.md#EKF2_TAU_VEL) 调整。 减小此参数可减少稳态误差,但会增加 NED 速度输出上的观测噪声量。 - \[2\] 位置跟踪误差量级 \(m\)。 - The position tracking time constant can be adjusted using the [EKF2_TAU_POS](../advanced_config/parameter_reference.md#EKF2_TAU_POS) parameter. + 位置跟踪时间常数可通过 [EKF2_TAU_POS](../advanced_config/parameter_reference.md#EKF2_TAU_POS) 调整。 减小此参数可减少稳态误差,但会增加 NED 位置输出上的观测噪声量。 ### EKF 错误 EKF 包含针对严重条件状态和协方差更新的内部错误检查。 -Refer to the `filter_fault_flags` in [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg). +请参考 [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg) 中的 `filter_fault_flags`。 ### 观测错误 -有两种类型观测错误: +观测故障分为两类: - 数据丢失。 一个例子是测距仪无法提供返回数据。 @@ -712,27 +710,27 @@ Refer to the `filter_fault_flags` in [EstimatorStatus](https://github.com/PX4/PX 这种情况的一个例子是过度振动导致大的垂直位置误差,导致气压计高度测量被拒绝。 这两者都可能导致观测数据被拒绝,如果时间足够长,使得 EKF 尝试重置状态以使用传感器观测数据。 -所有观测结果均对新息进行了统计置信度检查。 -The number of standard deviations for the check are controlled by the `EKF2_*_GATE` parameter for each observation type. +所有观测都会对创新量进行统计置信度检查。 +各观测类型的检查标准差数由对应的 `EKF2_*_GATE` 参数控制。 -Test levels are available in [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg) as follows: +测试指标可在 [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg) 中查看: -- `mag_test_ratio`: ratio of the largest magnetometer innovation component to the innovation test limit -- `vel_test_ratio`: ratio of the largest velocity innovation component to the innovation test limit -- `pos_test_ratio`: ratio of the largest horizontal position innovation component to the innovation test limit -- `hgt_test_ratio`: ratio of the vertical position innovation to the innovation test limit -- `tas_test_ratio`: ratio of the true airspeed innovation to the innovation test limit -- `hagl_test_ratio`: ratio of the height above ground innovation to the innovation test limit +- `mag_test_ratio`:磁力计创新量最大分量与测试限值的比值 +- `vel_test_ratio`:速度创新量最大分量与测试限值的比值 +- `pos_test_ratio`:水平位置创新量最大分量与测试限值的比值 +- `hgt_test_ratio`:垂直位置创新量与测试限值的比值 +- `tas_test_ratio`:真空速创新量与测试限值的比值 +- `hagl_test_ratio`:离地高度创新量与测试限值的比值 -For a binary pass/fail summary for each sensor, refer to innovation_check_flags in [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg). +若需查看每个传感器的二值通过/失败汇总,请参考 [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg) 中的 `innovation_check_flags`。 ### GPS 数据质量检查 -在开始 GPS 辅助之前,EKF 应用了许多 GPS 数据质量检查。 -These checks are controlled by the [EKF2_GPS_CHECK](../advanced_config/parameter_reference.md#EKF2_GPS_CHECK) and `EKF2_REQ_*` parameters. -The pass/fail status for these checks is logged in the [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).gps_check_fail_flags message. +EKF 在开始 GPS 辅助前会执行一系列 GPS 质量检查。 +这些检查由 [EKF2_GPS_CHECK](../advanced_config/parameter_reference.md#EKF2_GPS_CHECK) 和 `EKF2_REQ_*` 参数控制。 +这些检查的通过/失败状态记录在 [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg) 的 `gps_check_fail_flags` 字段中。 当所有所需的 GPS 检查通过后,此整数将为零。 -If the EKF is not commencing GPS alignment, check the value of the integer against the bitmask definition `gps_check_fail_flags` in [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg). +如果 EKF 未开始 GPS 对齐,请将该整数与 [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg) 中 `gps_check_fail_flags` 的位掩码定义进行对比。 ### EKF 数值误差 @@ -743,34 +741,34 @@ EKF 对其所有计算使用单精度浮点运算,并使用一阶近似来推 - 如果新息方差小于观测方差(这需要一个不可能的负值状态方差)或协方差更新将为任何一个状态产生负值方差,那么: - 跳过状态和协方差更新 - - 协方差矩阵中的相应行和列被重置 - - The failure is recorded in the [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg) `filter_fault_flags` message + - 重置协方差矩阵对应行与列 + - 在 [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg) 的 `filter_fault_flags` 中记录该故障 - 状态方差(协方差矩阵中的对角线)被限制为非负。 - 状态方差应用数值上限。 - 协方差矩阵强制对称。 -After re-tuning the filter, particularly re-tuning that involve reducing the noise variables, the value of `estimator_status.gps_check_fail_flags` should be checked to ensure that it remains zero. +重新调参后,尤其是降低噪声变量的调参,应检查 `estimator_status.gps_check_fail_flags` 是否保持为零。 ## 如果高度估计值发散了怎么办? 在飞行期间 EKF 高度偏离 GPS 和高度计测量的最常见原因是由振动引起的 IMU 测量的削波和/或混叠。 -如果发生这种情况,则数据中应显示以下迹象 +出现该问题时,通常会在数据中看到以下迹象: -- [EstimatorInnovations](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorInnovations.msg).vel_pos_innov\[2\] and [EstimatorInnovations](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorInnovations.msg).vel_pos_innov\[5\] will both have the same sign. -- [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).hgt_test_ratio will be greater than 1.0 +- [EstimatorInnovations](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorInnovations.msg).vel_pos_innov\[2\] 与 [EstimatorInnovations](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorInnovations.msg).vel_pos_innov\[5\] 同号。 +- [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).hgt_test_ratio 大于 1.0 -建议第一步是确保使用有效的隔离安装系统将无人机与机身隔离。 +建议的第一步是使用有效的隔振安装方式将飞控与机架隔离。 隔离安装座具有 6 个自由度,因此具有 6 个谐振频率。 作为一般规则,隔离支架上的自动驾驶仪的 6 个共振频率应高于 25Hz,以避免与无人机动力学相互作用并低于电动机的频率。 如果谐振频率与电动机或螺旋桨叶片通过频率一致,则隔离安装件会使振动更严重。 -通过进行以下参数更改,可以使 EKF 能更加抵御振动引起的高度发散: +可通过以下参数调整提高 EKF 对振动引起的高度发散的鲁棒性: -- 将主要的高度传感器的新息门槛的值加倍。 - If using barometric height this is [EKF2_BARO_GATE](../advanced_config/parameter_reference.md#EKF2_BARO_GATE). -- Increase the value of [EKF2_ACC_NOISE](../advanced_config/parameter_reference.md#EKF2_ACC_NOISE) to 0.5 initially. - 如果仍然出现发散,则进一步增加 0.1,但不要超过 1.0。 +- 将主高度传感器的创新门限加倍。 + 若使用气压高度,可调 [EKF2_BARO_GATE](../advanced_config/parameter_reference.md#EKF2_BARO_GATE)。 +- 将 [EKF2_ACC_NOISE](../advanced_config/parameter_reference.md#EKF2_ACC_NOISE) 增大到 0.5 作为初值。 + 若仍发散,则每次增加 0.1,但不应超过 1.0。 注意 这些变化的影响将使 EKF 对 GPS 垂直速度和气压的误差更敏感。 @@ -780,7 +778,7 @@ After re-tuning the filter, particularly re-tuning that involve reducing the noi - 高振动级别。 - 通过改进无人机的机械隔离来解决。 - - Increasing the value of [EKF2_ACC_NOISE](../advanced_config/parameter_reference.md#EKF2_ACC_NOISE) and [EKF2_GYR_NOISE](../advanced_config/parameter_reference.md#EKF2_GYR_NOISE) can help, but does make the EKF more vulnerable to GPS glitches. + - 增大 [EKF2_ACC_NOISE](../advanced_config/parameter_reference.md#EKF2_ACC_NOISE) 和 [EKF2_GYR_NOISE](../advanced_config/parameter_reference.md#EKF2_GYR_NOISE) 也有帮助,但会让 EKF 更容易受 GPS 突变影响。 - 过大的陀螺仪偏差偏移。 - 通过重新校准陀螺仪来修复。 检查过度温度灵敏度(> 3 deg/sec 偏差在从冷机开始热启动时发生变化,如果受隔热影响以减缓温度变化的速度,则替换传感器。 @@ -795,45 +793,45 @@ After re-tuning the filter, particularly re-tuning that involve reducing the noi 确定其中哪一个是主要原因需要对 EKF 日志数据进行系统分析: -- Plot the velocity innovation test ratio - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).vel_test_ratio -- Plot the horizontal position innovation test ratio - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).pos_test_ratio -- Plot the height innovation test ratio - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).hgt_test_ratio -- Plot the magnetometer innovation test ratio - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).mag_test_ratio -- Plot the GPS receiver reported speed accuracy - [SensorGps.msg](https://github.com/PX4/PX4-Autopilot/blob/main/msg/SensorGps.msg).s_variance_m_s -- Plot the IMU delta angle state estimates - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).states\[10\], states\[11\] and states\[12\] +- 绘制速度创新测试比值 - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).vel_test_ratio +- 绘制水平位置创新测试比值 - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).pos_test_ratio +- 绘制高度创新测试比值 - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).hgt_test_ratio +- 绘制磁力计创新测试比值 - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).mag_test_ratio +- 绘制 GPS 接收机报告的速度精度 - [SensorGps.msg](https://github.com/PX4/PX4-Autopilot/blob/main/msg/SensorGps.msg).s_variance_m_s +- 绘制 IMU 增量角状态估计 - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).states\[10\]、states\[11\] 和 states\[12\] - 绘制 EKF 内部高频振动指标: - - Delta angle coning vibration - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).vibe\[0\] - - High frequency delta angle vibration - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).vibe\[1\] - - High frequency delta velocity vibration - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).vibe\[2\] + - 增量角锥形振动 - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).vibe\[0\] + - 高频增量角振动 - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).vibe\[1\] + - 高频增量速度振动 - [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).vibe\[2\] -在正常操作期间,所有测试比率应保持在 0.5 以下,并且只有偶然的峰值高于此值,如下面成功飞行中的示例所示: +正常情况下,所有测试比值应保持在 0.5 以下,仅偶尔出现短暂尖峰,如下成功飞行示例所示: ![Position, Velocity, Height and Magnetometer Test Ratios](../../assets/ecl/test_ratios_-_successful.png) 下图显示了具有良好隔离的多旋翼飞行器的 EKF 振动指标。 可以看到着陆冲击和起飞和着陆期间增加的振动。 -如果收集的数据不足,使用这些指标无法提供有关最大阈值的具体建议。 +目前尚无足够数据给出最大阈值的具体建议。 ![Vibration metrics - successful](../../assets/ecl/vibration_metrics_-_successful.png) 上述振动指标的数值有限值,因为在接近 IMU 采样频率的频率下存在的振动(大多数电路板为 1kHz)将导致在高频振动指标中未显示的数据中出现偏移。 检测混叠误差的唯一方法是它们对惯性导航精度和新息水平的提高。 -除了生成 > 1.0 的大的位置和速度测试比率外,不同的误差机制还以不同的方式影响其它测试比率: +除了产生较大的位置与速度测试比值( > 1.0)外,不同误差机制对其他测试比值的影响也不同: ### 确定过度振动 -高振动级别通常会影响垂直位置和速度新息以及水平分量。 +高振动通常会影响垂直位置与速度创新量以及水平分量。 磁力计测试级别仅受到很小程度的影响。 \(在此插入示例绘图显示不好振动\) ### 确定过度的陀螺偏差 -大的陀螺偏差偏移通常的特征是在飞行期间增量角度偏差值的变化大于 5E-4(相当于 ~3 度/秒),并且如果偏航轴受到影响,也会导致磁强计测试比大幅增加。 +陀螺零偏过大通常表现为飞行中增量角偏置变化超过 5E-4(约 3 deg/sec),若影响航向轴,还会导致磁力计测试比值显著上升。 除极端情况外,高度通常不受影响。 如果滤波器在飞行前给定时间稳定,则可以容忍接通最高 5 度/秒的偏差值。 -如果位置发散,飞手进行的飞行前检查应防止解锁。 +若位置发散,指挥器(commander)的预飞检查应阻止解锁。 \(在此插入示例图表显示不好的陀螺偏差\) @@ -849,14 +847,14 @@ After re-tuning the filter, particularly re-tuning that involve reducing the noi GPS 数据精度差通常伴随着接收器报告的速度误差的增加以及新息的增加。 由多路径,遮蔽和干扰引起的瞬态误差是更常见的原因。 -下面是一个暂时失去 GPS 数据精度的例子,其中多旋翼飞行器开始从其游荡位置漂移并且必须使用摇杆进行校正。 -The rise in [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).vel_test_ratio to greater than 1 indicates the GPs velocity was inconsistent with other measurements and has been rejected. +以下为 GPS 精度暂时下降的示例:多旋翼开始偏离悬停点,需要使用摇杆修正。 +[EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EstimatorStatus.msg).vel_test_ratio 上升到 1 以上,说明 GPS 速度与其他测量不一致并已被拒绝。 ![GPS glitch - test ratios](../../assets/ecl/gps_glitch_-_test_ratios.png) -这伴随着 GPS 接收器报告的速度精度的上升,这表明它可能是 GPS 误差。 +同时 GPS 接收机报告的速度精度也上升,表明可能是 GPS 错误。 -![GPS Glitch - reported receiver accuracy](../../assets/ecl/gps_glitch_-_reported_receiver_accuracy.png) +![GPS Glitch - velocity innovations](../../assets/ecl/gps_glitch_-_velocity_innovations.png) 如果我们还看一下 GPS 水平速度新息和新息差异,我们可以看到北向速度新息伴随着这次 GPS “故障”事件的大幅增长。 @@ -864,36 +862,37 @@ The rise in [EstimatorStatus](https://github.com/PX4/PX4-Autopilot/blob/main/msg ### 确定 GPS 数据的丢失 -GPS 数据的丢失将通过速度和位置新息测试比率 'flat-lining' 来显示。 -If this occurs, check the other GPS status data in `vehicle_gps_position` for further information. +GPS 数据丢失会表现为速度与位置创新测试比值“贴平(flat-lining)”。 +出现该情况时,请检查 `vehicle_gps_position` 中的其他 GPS 状态数据。 -The following plot shows the NED GPS velocity innovations `ekf2_innovations_0.vel_pos_innov[0 ... 2]`, the GPS NE position innovations `ekf2_innovations_0.vel_pos_innov[3 ... 4]` and the Baro vertical position innovation `ekf2_innovations_0.vel_pos_innov[5]` generated from a simulated VTOL flight using SITL Gazebo. +下图显示了使用 SITL Gazebo 模拟 VTOL 飞行生成的 NED GPS 速度创新量 `ekf2_innovations_0.vel_pos_innov[0 ... 2]`、GPS NE 位置创新量 `ekf2_innovations_0.vel_pos_innov[3 ... 4]` 以及气压垂直位置创新量 `ekf2_innovations_0.vel_pos_innov[5]`。 模拟的 GPS 在 73 秒时失锁。 -注意 GPS 丢失后,NED 速度新息和 NE 位置新息 'flat-line' 。 -注意在没有 GPS 数据的 10 秒后,EKF 使用最后的已知位置恢复到静态位置模式,并且 NE 位置新息开始再次改变。 +注意 GPS 丢失后 NED 速度创新量与 NE 位置创新量“贴平(flat-line)”。 +注意 GPS 丢失 10 秒后,EKF 会回退到使用最后已知位置的静态位置模式,NE 位置创新量开始再次变化。 ![GPS Data Loss - in SITL](../../assets/ecl/gps_data_loss_-_velocity_innovations.png) ### 气压计地面效应补偿 -如果机体在降落期间在靠近地面时往往爬升回到空中, 最可能的原因是气压计地面效应。 +如果飞行器在降落接近地面时倾向于再次上升,最可能的原因是气压计地面效应。 这种情况是在推进器向地面推进并在无人机下空形成高压区时造成的。 其结果是降低了对压力高度的解读,从而导致了不必要的爬升。 下图显示了存在地面效应的典型情况。 -注意气压计信号如何在飞行开始和结束时消失。 +注意气压信号在飞行开始与结束时的下探。 ![Barometer ground effect](../../assets/ecl/gnd_effect.png) -You can enable _ground effect compensation_ to fix this problem: +可启用 _地面效应补偿_ 修复该问题: -- 从绘图中估算出气压计在起飞或着陆期间的跌落程度。 在上面的绘图中,人们可以看到降落过程中大约6米的气压计下沉。 -- Then set the parameter [EKF2_GND_EFF_DZ](../advanced_config/parameter_reference.md#EKF2_GND_EFF_DZ) to that value and add a 10 percent margin. 因此,在这种情况下,6.6米的数值将是一个良好的起点。 +- 从绘图中估算出气压计在起飞或着陆期间的跌落程度。 上图中可读出降落时约 6 米的气压下探。 +- 将 [EKF2_GND_EFF_DZ](../advanced_config/parameter_reference.md#EKF2_GND_EFF_DZ) 设为该值并加 10% 裕量。 因此,在这种情况下,6.6 米是合适的起始值。 -If a terrain estimate is available (e.g. the vehicle is equipped with a range finder) then you can additionally specify [EKF2_GND_MAX_HGT](../advanced_config/parameter_reference.md#EKF2_GND_MAX_HGT), the above ground-level altitude below which ground effect compensation should be activated. -如果没有可用的地形估计,这个参数将不会产生任何效果,系统将使用继承法来确定是否应激活地面效果补偿。 +如果有地形估计(例如配备测距仪),还可设置 [EKF2_GND_MAX_HGT](../advanced_config/parameter_reference.md#EKF2_GND_MAX_HGT) 来指定启用地面效应补偿的离地高度上限。 +若没有地形估计,该参数无效,系统会使用启发式方法判断是否启用地面效应补偿。 +若没有地形估计,该参数无效,系统会使用启发式方法判断是否启用地面效应补偿。 ## 更多信息 -- [PX4 State Estimation Overview](https://youtu.be/HkYRJJoyBwQ), _PX4 Developer Summit 2019_, Dr. Paul Riseborough): Overview of the estimator, and major changes from 2018/19, and the expected improvements through 2019/20. +- [PX4 State Estimation Overview](https://youtu.be/HkYRJJoyBwQ),_PX4 Developer Summit 2019_,Dr. Paul Riseborough:估计器概览、2018/19 的主要变化,以及 2019/20 期间的预期改进。 diff --git a/docs/zh/can/index.md b/docs/zh/can/index.md index 1e3264327d..50757f6643 100644 --- a/docs/zh/can/index.md +++ b/docs/zh/can/index.md @@ -1,7 +1,13 @@ -# CAN +# CAN (DroneCAN & Cyphal) -[控制器局域网(CAN)](https://en.wikipedia.org/wiki/CAN_bus)是一种可靠的有线网络,它能让诸如飞行控制器、电调、传感器及其他外设等无人机组件相互通信。 -它被设计为分布式架构,使用差分信号,即使在较长的电缆 (大型车辆上) 上也非常强大,避免单点故障。 +[Controller Area Network (CAN)](https://en.wikipedia.org/wiki/CAN_bus) is a robust wired network that allows drone components such as flight controller, ESCs, sensors, and other peripherals, to communicate with each other. + +It is particularly recommended on larger vehicles. + +## 综述 + +CAN it is designed to be democratic and uses differential signaling. +For this reason it is very robust even over longer cable lengths (on large vehicles), and avoids a single point of failure. CAN 还允许来自外设的状态反馈,并通过总线方便的进行固件升级。 PX4 支持与 CAN 设备通信的两个软件协议: @@ -18,29 +24,36 @@ DroneCAN 和 Cyphal 都是早先一个叫做UAVCAN的项目。 这两项协议之间的差异在[Cyphal vs. DroneCAN](https://forum.opencyphal.org/t/cyphal-vs-dronecan/1814)中作了概述。 ::: -:::warning PX4不支持KDECAN等无人驾驶飞机的其他CAN软件协议(撰写时)。 -::: ## 布线 CAN 网络的接线对于 DroneCAN 和 Cyphal/CAN 是一样 (实际上对所有的 CAN 网络都一样)。 -设备以任意顺序连接成链。 +Devices within a network are connected in a _daisy-chain_ in any order (this differs from UARTs peripherals, where you attach just one component per port). + +:::warning +Don't connect each CAN peripheral to a separate CAN port! +Unlike UARTs, CAN peripherals are designed to be daisy chained, with additional ports such as `CAN2` used for [redundancy](redundancy). +::: + 在链的任一端,应该在两个数据线之间连接一个 120Ω 的终端电阻。 飞控和一些 GNSS 模块为了方便使用内置了终端电阻, 因此应该放在链的终端。 否则,你可以使用终端电阻,比如 [Zubax Robotics 的这款](https://shop.zubax.com/products/uavcan-micro-termination-plug?variant=6007985111069)。如果你有JST - GH压接工具,也可以自己焊接一个。 下图显示了一个 CAN 总线连接飞控到 4 个 CAN 电调和一个 GNSS 的示例。 +It includes a redundant bus connected to `CAN 2`. ![CAN 布线](../../assets/can/uavcan_wiring.svg) 图中未显示任何电源接线。 参考制造商的说明,确认组件是否需要单独供电,还是可以通过 CAN 总线供电。 +:::info For more information, see [Cyphal/CAN device interconnection](https://wiki.zubax.com/public/cyphal/CyphalCAN-device-interconnection?pageId=2195476) (kb.zubax.com). 虽然本文是以 Cyphal 协议为基础编写的,但同样适用于 DroneCAN 硬件和任何其他 CAN 设置。 如需了解更复杂的场景,请参考 [论CAN总线拓扑结构与终端匹配](https://forum.opencyphal.org/t/on-can-bus-topology-and-termination/1685)。 +::: ### 连接器 @@ -54,7 +67,30 @@ Pixhawk标准兼容的 CAN 设备使用 4 引脚的 JST-GH 连接器为 CAN。 DroneCAN 和 Cyphal/CAN支持使用第二个(冗余) CAN 接口。 这是完全可选的,但会增加连接的强度。 -所有Pixhawk飞行控制器都带有两个CAN接口; 如果您的外围设备也支持 2 CAN 接口,建议您同时进行电线连接以提高安全。 + +Pixhawk flight controllers come with 2 CAN interfaces; if your peripherals support 2 CAN interfaces as well, it is recommended to wire both up for increased safety. + +### Flight Controllers with Multiple CAN Ports + +[Flight Controllers](../flight_controller/index.md) may have up to three independent CAN ports, such as `CAN1`, `CAN2`, `CAN3` (neither DroneCAN or Cyphal support more than three). +Note that you can't have both DroneCAN and Cyphal running on PX4 at the same time. + +:::tip +You only _need_ one CAN port to support an arbitrary number of CAN devices using a particular CAN protocol. +Don't connect each CAN peripheral to a separate CAN port! +::: + +Generally you'll daisy all CAN peripherals off a single port, and if there is more than one CAN port, use the second one for [redundancy](redundancy). +If three are three ports, you might use the remaining network for devices that support another CAN protocol. + +The documentation for your flight controller should indicate which ports are supported/enabled. +At runtime you can check what DroneCAN ports are enabled and their status using the following command on the [MAVLink Shell](../debug/mavlink_shell.md) (or some other console): + +```sh +uavcan status +``` + +Note that you can also check the number of supported CAN interfaces for a board by searching for `CONFIG_BOARD_UAVCAN_INTERFACES` in its [default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v6xrt/default.px4board#) configuration file. ## 固件 diff --git a/docs/zh/complete_vehicles_mc/amov_F410_drone.md b/docs/zh/complete_vehicles_mc/amov_F410_drone.md index 8c90fbf1bd..2f25e16aa9 100644 --- a/docs/zh/complete_vehicles_mc/amov_F410_drone.md +++ b/docs/zh/complete_vehicles_mc/amov_F410_drone.md @@ -53,7 +53,7 @@ It is pre-installed with PX4 v1.15.4 at time of writing (a more recent version m | 处理器 | FMU: STM32H743; IO Processor: STM32F103 | | Accelerometer | BMI055/ICM-42688-P | | Gyroscope | BMI055/ICM-42688-P | -| 磁罗盘 | IST8310 | +| 磁力计 | IST8310 | | Barometer | MS5611 | | 重量 | 59.3g | | 尺寸 | Length 84.8mm × Width 44mm × Height 12.4mm | diff --git a/docs/zh/config_rover/position_tuning.md b/docs/zh/config_rover/position_tuning.md index 3d742f6183..6d02346cd5 100644 --- a/docs/zh/config_rover/position_tuning.md +++ b/docs/zh/config_rover/position_tuning.md @@ -133,11 +133,11 @@ $$ | Symbol | 描述 | Unit | | ----------------------------------- | ---------------------------------- | ---- | -| $\vec{a}$ | Vector from current to previous WP | m | -| $\vec{b}$ | Vector from current to next WP | m | -| $r_{min}$ | Minimum turn radius | m | -| $\delta_{max}$ | Maximum steer angle | m | -| $r_{acc}$ | Acceptance radius | m | +| $\vec{a}$ | Vector from current to previous WP | 米 | +| $\vec{b}$ | Vector from current to next WP | 米 | +| $r_{min}$ | Minimum turn radius | 米 | +| $\delta_{max}$ | Maximum steer angle | 米 | +| $r_{acc}$ | Acceptance radius | 米 | ## Differential Rover Only @@ -187,14 +187,14 @@ The position controller uses the following structure: | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ---- | | [RO_SPEED_RED](../advanced_config/parameter_reference.md#RO_SPEED_RED) | (Optional) Tuning parameter for the speed reduction based on the course error | - | | [PP_LOOKAHD_GAIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_GAIN) | Pure pursuit: Main tuning parameter | - | -| [PP_LOOKAHD_MAX](../advanced_config/parameter_reference.md#PP_LOOKAHD_MAX) | Pure pursuit: Maximum value for the look ahead radius | m | -| [PP_LOOKAHD_MIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_MIN) | Pure pursuit: Minimum value for the look ahead radius | m | +| [PP_LOOKAHD_MAX](../advanced_config/parameter_reference.md#PP_LOOKAHD_MAX) | Pure pursuit: Maximum value for the look ahead radius | 米 | +| [PP_LOOKAHD_MIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_MIN) | Pure pursuit: Minimum value for the look ahead radius | 米 | ## Ackermann Specific | 参数 | 描述 | Unit | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---- | -| [RA_ACC_RAD_MAX](../advanced_config/parameter_reference.md#RA_ACC_RAD_MAX) | (Optional) Maximum radius the acceptance radius can be scaled to | m | +| [RA_ACC_RAD_MAX](../advanced_config/parameter_reference.md#RA_ACC_RAD_MAX) | (Optional) Maximum radius the acceptance radius can be scaled to | 米 | | [RA_ACC_RAD_GAIN](../advanced_config/parameter_reference.md#RA_ACC_RAD_GAIN) | (Optional) Tuning parameter for the acceptance radius scaling | - | ## Differential Specific diff --git a/docs/zh/config_rover/velocity_tuning.md b/docs/zh/config_rover/velocity_tuning.md index 6f8e8fefe5..5796839ca3 100644 --- a/docs/zh/config_rover/velocity_tuning.md +++ b/docs/zh/config_rover/velocity_tuning.md @@ -129,5 +129,5 @@ Both these setpoint are then sent to their own closed loop speed controllers. | 参数 | 描述 | Unit | | -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ---- | | [PP_LOOKAHD_GAIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_GAIN) | Pure pursuit: Main tuning parameter | - | -| [PP_LOOKAHD_MAX](../advanced_config/parameter_reference.md#PP_LOOKAHD_MAX) | Pure pursuit: Maximum value for the look ahead radius | m | -| [PP_LOOKAHD_MIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_MIN) | Pure pursuit: Minimum value for the look ahead radius | m | +| [PP_LOOKAHD_MAX](../advanced_config/parameter_reference.md#PP_LOOKAHD_MAX) | Pure pursuit: Maximum value for the look ahead radius | 米 | +| [PP_LOOKAHD_MIN](../advanced_config/parameter_reference.md#PP_LOOKAHD_MIN) | Pure pursuit: Minimum value for the look ahead radius | 米 | diff --git a/docs/zh/dev_setup/building_px4.md b/docs/zh/dev_setup/building_px4.md index 4f56b68641..8f53e3c356 100644 --- a/docs/zh/dev_setup/building_px4.md +++ b/docs/zh/dev_setup/building_px4.md @@ -2,12 +2,12 @@ 无论对于模拟器还是硬件目标设备,PX4固件可以在控制台或者IDE中从源码构建 -You need to build PX4 in order to use [simulators](../simulation/index.md), or if you want to modify PX4 and create a custom build. +若要使用[模拟器](../simulation/index.md),或需要修改PX4并创建自定义构建,则必须自行构建PX4。 如果您只想在实际硬件上试试 PX4,那么可以使用 QGroundControl[烧录预构建的二进制文件](../config/firmware.md)(无需跟着下面的指导)。 :::info 在跟着这些指导之前,你必须先为主机操作系统和目标硬件安装 [开发者工具链](../dev_setup/dev_env.md)。 -如果您在跟着这些步骤操作后有任何问题,请参阅下面的 [Troubleshooting](#troubleshooting)。 +如果您在跟着这些步骤操作后有任何问题,请参阅下面的 [故障排除](#troubleshooting)。 ::: ## 下载 PX4 源代码 @@ -20,12 +20,12 @@ PX4 源代码存储在 Github 上的 [PX4/PX4-Autopilot](https://github.com/PX4/ git clone https://github.com/PX4/PX4-Autopilot.git --recursive ``` -Note that you may already have done this when installing the [Developer Toolchain](../dev_setup/dev_env.md) +注意,您可能在[安装开发工具链](../dev_setup/dev_env.md)时已经完成了这项操作 :::info -This is all you need to do in order to get the latest code. -If needed you can also [get the source code specific to a particular release](../contribute/git_examples.md#get-a-specific-release). -[GIT Examples](../contribute/git_examples.md) provides a lot more information working with releases and contributing to PX4. +你只需要执行它就能够得到最新的代码。 +如果需要,您也可以[获取特定版本的源代码](../contribute/git_examples.md#get-a-specific-release)。 +[[GIT 示例](../contribute/git_examples.md) 提供了更多的信息,用于发布版本并对 PX4 作出贡献。 ::: ## 初次构建(使用模拟器) @@ -33,15 +33,15 @@ If needed you can also [get the source code specific to a particular release](.. 首先我们要用控制台环境来构建一个模拟器目标 这使我们能够在转移到真正的硬件和 IDE 之前验证系统设置。 -Navigate into the **PX4-Autopilot** directory and start [Gazebo SITL](../sim_gazebo_gz/index.md) using the following command: +导航到 **PX4-Autopilot** 目录并使用以下命令启动 [Gazebo SITL](../sim_gazebo_gz/index.md): ```sh make px4_sitl gz_x500 ``` :::details -If you installed Gazebo Classic -Start [Gazebo Classic SITL](../sim_gazebo_classic/index.md) using the following command: +如果您安装的是 Gazebo Classic +使用以下命令启动 [Gazebo SITL](../sim_gazebo_classic/index.md): ```sh make px4_sitl gazebo-classic @@ -51,11 +51,11 @@ make px4_sitl gazebo-classic 这将显示 PX4 控制台: -![PX4 Console](../../assets/toolchain/console_gazebo.png) +![PX4 控制台](../../assets/toolchain/console_gazebo.png) :::info -You may need to start _QGroundControl_ before proceeding, as the default PX4 configuration requires a ground control connection before takeoff. -This can be [downloaded from here](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/getting_started/download_and_install.html). +您可能需要在继续之前启动 _QGroundControl_ ,因为默认的 PX4 配置需要在起飞前进行地面控制连接。 +可以[从这里下载](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/getting_started/download_and_install.html)。 ::: 可以通过键入以下命令(如上方控制台中所示)来控制飞行器。 @@ -64,11 +64,11 @@ This can be [downloaded from here](https://docs.qgroundcontrol.com/master/en/qgc pxh> commander takeoff ``` -The vehicle will take off and you'll see this in the Gazebo simulator UI: +该载具将起飞,您将在 Gazebo simulator UI 中看到: -![Gazebo UI with vehicle taking off](../../assets/toolchain/gazebo_takeoff.png) +![Gazebo UI 载具起飞](../../assets/toolchain/gazebo_takeoff.png) -The drone can be landed by typing `commander land` and the whole simulation can be stopped by doing **CTRL+C** (or by entering `shutdown`). +无人机可以通过输入 `Commander land` 来着陆,整个模拟可以通过 **CTRL+C** (或输入 `shutdown` )来停止。 与地面站一起飞模拟器更接近飞机的实际运行。 在飞机飞行时(Takeoff飞行模式),单击地图上的某个位置并启用滑块。 @@ -80,9 +80,9 @@ The drone can be landed by typing `commander land` and the whole simulation can ### 为NuttX构建 -To build for NuttX- or Pixhawk- based boards, navigate into the **PX4-Autopilot** directory and then call `make` with the build target for your board. +若要构建基于NuttX-或 Pixhawk的飞控板,请导航到 **PX4-Autopilot** 目录,然后调用 `make` ,并为您的板调用构建目标。 -For example, to build for [Pixhawk 4](../flight_controller/pixhawk4.md) hardware you could use the following command: +例如,要为 [Pixhawk 4](../flight_controller/pixhawk4.md) 硬件构建,可使用以下命令: ```sh cd PX4-Autopilot @@ -96,15 +96,15 @@ make px4_fmu-v5_default [954/954] Creating /home/youruser/src/PX4-Autopilot/build/px4_fmu-v4_default/px4_fmu-v4_default.px4 ``` -The first part of the build target `px4_fmu-v4` indicates the target flight controller hardware for the firmware. -The suffix, in this case `_default`, indicates a firmware _configuration_, such as supporting or omitting particular features. +构建目标 `px4_fmu-v4` 的第一部分表示目标飞行控制器固件的硬件。 +后缀(此处为`_default`)表示固件的_配置_,例如支持或省略特定功能。 :::info -The `_default` suffix is optional. -For example, `make px4_fmu-v5` and `px4_fmu-v5_default` result in the same firmware. +`_default` 后缀是可选的。 +例如,`make px4_fmu-v5` 和 `px4_fmu-v5_default` 都会生成相同的固件。 ::: -The following list shows the build commands for the [Pixhawk standard](../flight_controller/autopilot_pixhawk_standard.md) boards: +以下列表显示了[Pixhawk标准](../flight_controller/autopilot_pixhawk_standard.md)飞行控制板的构建命令: - [Holybro Pixhawk 6X-RT (FMUv6X)](../flight_controller/pixhawk6x-rt.md): `make px4_fmu-v6xrt_default` @@ -134,7 +134,7 @@ The following list shows the build commands for the [Pixhawk standard](../flight - [Pixhawk 2 (Cube Black) (FMUv3)](../flight_controller/pixhawk-2.md): `make px4_fmu-v3_default` -- [mRo Pixhawk (FMUv3)](../flight_controller/mro_pixhawk.md): `make px4_fmu-v3_default` (supports 2MB Flash) +- [mRo Pixhawk (FMUv3)](../flight_controller/mro_pixhawk.md): `make px4_fmu-v3_default` (支持 2MB Flash) - [Holybro pix32 (FMUv2)](../flight_controller/holybro_pix32.md): `make px4_fmu-v2_default` @@ -145,17 +145,17 @@ The following list shows the build commands for the [Pixhawk standard](../flight - [Pixhawk 1 (FMUv2)](../flight_controller/pixhawk.md): `make px4_fmu-v2_default` :::warning - You **must** use a supported version of GCC to build this board (e.g. the same as used by [CI/docker](../test_and_ci/docker.md)) or remove modules from the build. Building with an unsupported GCC may fail, as PX4 is close to the board's 1MB flash limit. + 您**必须**使用受支持的GCC版本来构建此开发板(例如与[CI/docker](../test_and_ci/docker.md)中使用的相同版本),否则需从构建中移除相关模块。 Building with an unsupported GCC may fail, as PX4 is close to the board's 1MB flash limit. ::: -- Pixhawk 1 with 2 MB flash: `make px4_fmu-v3_default` +- 具有 2 MB flash 的 Pixhawk 1: `make px4_fmu-v3_default` -Build commands for non-Pixhawk NuttX fight controllers (and for all other-boards) are provided in the documentation for the individual [flight controller boards](../flight_controller/index.md). +非 Pixhawk NuttX 飞控的构建命令(以及所有其他主板的命令)均在各款[飞控主板](../flight_controller/index.md)的文档中提供。 ### 将固件烧录到飞控板 -Append `upload` to the make commands to upload the compiled binary to the autopilot hardware via USB. +在 make 命令后添加 `upload`,通过USB将编译后的二进制文件上传至 autopilot 硬件。 例如 ```sh @@ -174,13 +174,13 @@ Rebooting. ``` :::tip -This is not supported when developing on WSL2. -See [ Windows Development Environment (WSL2-Based) > Flash a Control Board](../dev_setup/dev_env_windows_wsl.md#flash-a-flight-control-board). +在 WSL 2 上开发时不支持此操作。(其实也有办法,见 [WSL 2 连接 USB 设备](https://learn.microsoft.com/zh-cn/windows/wsl/connect-usb))。 +参见[ Windows 开发环境 (WSL2-基于) > Flash控制板](../dev_setup/dev_env_windows_wsl.md#flash-a-flight-control-board)。 ::: ## 其他飞控板 -Build commands for other boards are given the [board-specific flight controller pages](../flight_controller/index.md) (usually under a heading _Building Firmware_). +其他主板的构建命令详见[各主板专属飞行控制器页面](../flight_controller/index.md)(通常位于_构建固件_标题下)。 您还可以使用以下命令列出所有配置目标: @@ -190,15 +190,15 @@ make list_config_targets ## 用图形界面 IDE 编译 -[VSCode](../dev_setup/vscode.md) is the officially supported (and recommended) IDE for PX4 development. -It is easy to set up and can be used to compile PX4 for both simulation and hardware environments. +[VSCode](../dev_setup/vscode.md是官方支持 (且推荐) 的 用于 PX4 开发的 IDE。 +它很容易设置,可以用于编译模拟和硬件环境的 PX4。 ## 故障处理 ### 常规构建错误 许多构建问题是由不匹配的子模块或未完全清理的构建环境引起的。 -Updating the submodules and doing a `distclean` can fix these kinds of errors: +更新子模块并进行 `distclean` 可以修复这些类型的错误: ```sh git submodule update --recursive @@ -207,11 +207,11 @@ make distclean ### 闪存溢出了 XXX 字节 -The `region 'flash' overflowed by XXXX bytes` error indicates that the firmware is too large for the target hardware platform. -This is common for `make px4_fmu-v2_default` builds, where the flash size is limited to 1MB. +`region 'flash' overflowed by XXXX bytes` 错误表明固件对目标硬件平台太大了。 +这对于`make px4_fmu-v2_default` 构建是常见的,它的 flash 大小被限制在 1MB。 -If you're building the _vanilla_ master branch, the most likely cause is using an unsupported version of GCC. -In this case, install the version specified in the [Developer Toolchain](../dev_setup/dev_env.md) instructions. +如果您正在构建_vanilla_master 分支,最可能的原因是使用不支持的 GCC版本。 +在这种情况下,安装[开发者工具链](../dev_setup/dev_env.md)说明中指定的版本。 如果在构建自己的分支,您可能已将固件大小增加到超过1MB的限制。 在这种情况下,您需要从构建中删除您不需要的任何驱动程序/模块。 @@ -221,16 +221,16 @@ In this case, install the version specified in the [Developer Toolchain](../dev_ MacOS 默认允许在所有正在运行的进程中最多打开256个文件。 PX4构建系统打开大量文件,因此您可能会超出此数量。 -The build toolchain will then report `Too many open files` for many files, as shown below: +构建工具链为很多文件报 `Too many open files`,如下所示: ```sh /usr/local/Cellar/gcc-arm-none-eabi/20171218/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: cannot find NuttX/nuttx/fs/libfs.a: Too many open files ``` 解决方案是增加允许打开文件的最大数量(例如增加到300)。 -You can do this in the macOS _Terminal_ for each session: +您可以在每个会话的 macOS _终端_ 中这样做: -- Run this script [Tools/mac_set_ulimit.sh](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/mac_set_ulimit.sh), or +- 运行此脚本 [Tools/mac_set_ulimit.sh](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/mac_set_ulimit.sh),或 - 运行这个命令: ```sh @@ -239,7 +239,7 @@ You can do this in the macOS _Terminal_ for each session: ### macOS Catalina:运行cmake时出现问题 -As of macOS Catalina 10.15.1 there may be problems when trying to build the simulator with _cmake_. +对于 macOS Catalina 10.15.1 ,在尝试使用 _cmake _ 构建模拟器时可能会遇到问题。 如果您在这个平台上遇到构建问题,请尝试在终端中运行以下命令: ```sh @@ -249,7 +249,7 @@ sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /us ### Ubuntu 18.04:涉及arm_none_eabi_gcc的编译错误 -Build issues related to `arm_none_eabi_gcc`may be due to a broken g++ toolchain installation. +与 arm_none_eabi_gcc 相关的构建问题可能是由于损坏的g++工具链安装引起的。 您可以通过检查缺少的依赖项来验证这一点: ```sh @@ -266,15 +266,15 @@ arm-none-eabi-gdb --version arm-none-eabi-gdb: command not found ``` -This can be resolved by removing and [reinstalling the compiler](https://askubuntu.com/questions/1243252/how-to-install-arm-none-eabi-gdb-on-ubuntu-20-04-lts-focal-fossa). +这个问题可以通过删除和[重新安装编译器](https://askubuntu.com/questions/1243252/how-to-install-arm-none-eabi-gdb-on-ubuntu-20-04-lts-focal-fossa)来解决。 ### Ubuntu 18.04:Visual Studio Code 无法监视此大型工作区中的文件更改 -See [Visual Studio Code IDE (VSCode) > Troubleshooting](../dev_setup/vscode.md#troubleshooting). +请参阅[Visual Studio 代码 IDE (VSCode) > 疑难解答](../dev_setup/vscode.md#troubleshooting)。 ### 导入Python软件包失败 -"Failed to import" errors when running the `make px4_sitl jmavsim` command indicates that some Python packages are not installed (where expected). +在运行 `make px4_sitl jmavsim` 命令时,“导入失败”错误表示某些Python 软件包未安装(如预期般安装)。 ```sh Failed to import jinja2: No module named 'jinja2' @@ -292,25 +292,25 @@ pip3 install --user pyserial empty toml numpy pandas jinja2 pyyaml pyros-genmsg ## PX4 创建生成目标 -The previous sections showed how you can call _make_ to build a number of different targets, start simulators, use IDEs etc. +前面的章节显示了您如何调用 _make_ 来构建一些不同的目标,启动模拟器,使用 IDE 等。 This section shows how _make_ options are constructed and how to find the available choices. -The full syntax to call _make_ with a particular configuration and initialization file is: +使用特定配置和初始化文件调用 _make_ 的完整语法是: ```sh make [VENDOR_][MODEL][_VARIANT] [VIEWER_MODEL_DEBUGGER_WORLD] ``` -**VENDOR_MODEL_VARIANT**: (also known as `CONFIGURATION_TARGET`) +**VENDOR_MODEL_VARIANT**: (也称为`CONFIGURATION_TARGET`) -- **VENDOR:** The manufacturer of the board: `px4`, `aerotenna`, `airmind`, `atlflight`, `auav`, `beaglebone`, `intel`, `nxp`, etc. - The vendor name for Pixhawk series boards is `px4`. -- **MODEL:** The _board model_ "model": `sitl`, `fmu-v2`, `fmu-v3`, `fmu-v4`, `fmu-v5`, `navio2`, etc. -- **VARIANT:** Indicates particular configurations: e.g. `bootloader`, `cyphal`, which contain components that are not present in the `default` configuration. - Most commonly this is `default`, and may be omitted. +- \*\*VENDOR:\*\*主板制造商:`px4`、`aerotenna`、`airmind`、`atlflight`、`auav`、`beaglebone`、`intel`、`nxp` 等。 + Pixhawk 系列主板的供应商名称为 `px4`。 +- \*\*MODEL:\*\*飞控板型号 “model”:`sitl`、`fmu-v2`、`fmu-v3`、`fmu-v4`、`fmu-v5`、`navio2` 等。 +- **VARIANT:** 指示特定的配置:例如`bootloader`, `cyphal`, 其中包含不存在于“默认”配置中的组件。 + 最常见的情况是 `default`, 并且可能被省略。 :::tip -You can get a list of _all_ available `CONFIGURATION_TARGET` options using the command below: +您可以使用下面的命令获取一个可用的`CONFIGURATION_TARGET`选项列表: ```sh make list_config_targets @@ -318,29 +318,29 @@ make list_config_targets ::: -**VIEWER_MODEL_DEBUGGER_WORLD:** +**VIEWER_MODEL_DEBUGER_WORLD:** -- **VIEWER:** This is the simulator ("viewer") to launch and connect: `gz`, `gazebo`, `jmavsim`, `none` +- **VIEWER:** 这是启动和连接的模拟器 ("查看器") : `gz`, `gzebo`, `jmavsim`, `none` :::tip - `none` can be used if you want to launch PX4 and wait for a simulator (jmavsim, Gazebo, Gazebo Classic, or some other simulator). - For example, `make px4_sitl none_iris` launches PX4 without a simulator (but with the iris airframe). + `none` 可以用于启动PX4并等待模拟器(jmavsim, Gazebo, Gazebo Classic, 或其他模拟器)。 + 例如,`make px4_sitl none_iris` 在没有模拟器的情况下启动 PX4 (但使用 iris 机架)。 ::: -- **MODEL:** The _vehicle_ model to use (e.g. `iris` (_default_), `rover`, `tailsitter`, etc), which will be loaded by the simulator. - The environment variable `PX4_SIM_MODEL` will be set to the selected model, which is then used in the [startup script](../simulation/index.md#startup-scripts) to select appropriate parameters. +- MODEL:要使用的 载具 模型(例如 iris (default)、rover、tailsitter 等),该模型将由模拟器加载。 + 环境变量 `PX4_SIM_MODEL` 将被设置为选中的模型,然后在[启动脚本](../simulation/index.md#startup-scripts)中使用以选择适当的参数。 -- **DEBUGGER:** Debugger to use: `none` (_default_), `ide`, `gdb`, `lldb`, `ddd`, `valgrind`, `callgrind`. - For more information see [Simulation Debugging](../debug/simulation_debugging.md). +- **DEBUGER:** 调试器使用: `none` (_default_), `ide`, `gdb`, `lldb`, `ddd`, `valgrind`, `callgrind`. + 更多信息请参阅[模拟调试](../debug/simulation_debugging.md)。 -- **WORLD:** (Gazebo Classic only). - Set the world ([PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_gazebo-classic/worlds](https://github.com/PX4/PX4-SITL_gazebo-classic/tree/main/worlds)) that is loaded. - Default is [empty.world](https://github.com/PX4/PX4-SITL_gazebo-classic/blob/main/worlds/empty.world). - For more information see [Gazebo Classic > Loading a Specific World](../sim_gazebo_classic/index.md#loading-a-specific-world). +- **WORLD**: (仅限Gazebo Classic). + 设置加载的世界([PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_gazebo-classic/worlds](https://github.com/PX4/PX4-SITL_gazebo-classic/tree/main/worlds))。 + 默认为 [empty.world](https://github.com/PX4/PX4-SITL_gazebo-classic/blob/main/worlds/empty.world)。 + 欲了解更多信息,请参阅[Gazebo Classic > 加载特定世界](../sim_gazebo_classic/index.md#loading-a-specific-world)。 :::tip -You can get a list of _all_ available `VIEWER_MODEL_DEBUGGER_WORLD` options using the command below: +您可以使用下面的命令获取_所有_可用的选项: `VIEWER_MODEBUGER_WORLD` ```sh make px4_sitl list_vmd_make_targets @@ -350,33 +350,33 @@ make px4_sitl list_vmd_make_targets ::: info -- Most of the values in the `CONFIGURATION_TARGET` and `VIEWER_MODEL_DEBUGGER` have defaults, and are hence optional. - For example, `gazebo-classic` is equivalent to `gazebo-classic_iris` or `gazebo-classic_iris_none`. +- `CONFIGURATION_TARGET`和`VIEWER_MODEBUGER`中的大多数值都有默认值,因此是可选的。 + 例如,`gazebo-classic`等于`gazebo-classic_iris`或`gazebo-classic_iris_none`。 - 如果要在其他两个设置之间指定默认值,可以使用三个下划线。 - For example, `gazebo-classic___gdb` is equivalent to `gazebo-classic_iris_gdb`. -- You can use a `none` value for `VIEWER_MODEL_DEBUGGER` to start PX4 and wait for a simulator. - For example start PX4 using `make px4_sitl_default none` and jMAVSim using `./Tools/simulation/jmavsim/jmavsim_run.sh -l`. + 例如,`gazebo-classic___gdb`相当于`gazebo-classic_iris_gdb`。 +- 你可以使用 "none" 值为 "VIEWER_MODEBUGER" 来启动 PX4 并等待模拟器。 + 例如,使用 `make px4_sitl_default none` 和 jMAVSim 使用 `./Tools/simulation/jmavsim/jmavsim_run.sh -l` 启动 PX4。 ::: -The `VENDOR_MODEL_VARIANT` options map to particular _px4board_ configuration files in the PX4 source tree under the [/boards](https://github.com/PX4/PX4-Autopilot/tree/main/boards) directory. -Specifically `VENDOR_MODEL_VARIANT` maps to a configuration file **boards/VENDOR/MODEL/VARIANT.px4board** -(e.g. `px4_fmu-v5_default` corresponds to [boards/px4/fmu-v5/default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/default.px4board)). +`VENDOR_MODEL_VARIANT`选项映射为 [/boards](https://github.com/PX4/PX4-Autopilot/tree/main/boards) 目录下的 PX4 源树中的特殊_px4board_ 配置文件。 +具体而言,`VENDOR_MODEL_VARIANT` 映射到配置文件 **boards/VENDOR/MODEL/VARIANT.px4board** +(例如 `px4_fmu-v5_default` 对应 [boards/px4/fmu-v5/default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/default.px4board))。 其他 make 目标在相关章节中讨论: -- `bloaty_compare_master`: [Binary Size Profiling](../debug/binary_size_profiling.md) +- `bloaty_compare_master`:[二进制大小分析](../debug/binary_size_profiling.md) - ... -## Firmware Version & Git Tags +## 固件版本和 Git 标签 -The _PX4 Firmware Version_ and _Custom Firmware Version_ are published using the MAVLink [AUTOPILOT_VERSION](https://mavlink.io/en/messages/common.html#AUTOPILOT_VERSION) message, and displayed in the _QGroundControl_ **Setup > Summary** airframe panel: +_PX4固件版本_和_自定义固件版本_通过 MAVLink [AUTOPILOT_VERSION](https://mavlink.io/en/messages/common.html#AUTOPILOT_VERSION)消息发布,并在_QGroundControl_的**设置 > 摘要**机身面板中显示: -![Firmware info](../../assets/gcs/qgc_setup_summary_airframe_firmware.jpg) +![固件信息](../../assets/gcs/qgc_setup_summary_airframe_firmware.jpg) -These are extracted at build time from the active _git tag_ for your repo tree. -The git tag should be formatted as `-` (e.g. the tag in the image above was set to `v1.8.1-2.22.1`). +这些是在构建时从您仓库树的活动_gi tag_中提取的。 +git 标签应该格式化为 `-` (例如上面图像中的标签被设置为 `v1.8.1-2.22.1`)。 :::warning -If you use a different git tag format, versions information may not be displayed properly. +如果您使用不同的 git 标签格式,可能无法正确显示版本信息。 ::: diff --git a/docs/zh/dev_setup/config_initial.md b/docs/zh/dev_setup/config_initial.md index 32a4b51e77..dd6cdf1e6a 100644 --- a/docs/zh/dev_setup/config_initial.md +++ b/docs/zh/dev_setup/config_initial.md @@ -1,4 +1,4 @@ -# Initial Setup & Configuration +# 初始配置 我们建议开发者们获取下文描述的基本配置的硬件设备(或者相似的设备)并使用"默认" 机架 构型。 diff --git a/docs/zh/development/development.md b/docs/zh/development/development.md index bbc8c949f3..e524cef519 100644 --- a/docs/zh/development/development.md +++ b/docs/zh/development/development.md @@ -24,5 +24,5 @@ - [支持](../contribute/support.md):使用 [讨论板](https://discuss.px4.io//) 和其他支持渠道获得帮助。 - [每周开发者电话会议](../contribute/dev_call.md):这是一个很好的机会来会见 PX4 开发团队,讨论平台技术细节(包括pull requests, 主要问题,一般性问答)。 -- [Licences](../contribute/licenses.md): What you can do with the code (free to use and modify under terms of the permissive [BSD 3-clause license](https://opensource.org/license/BSD-3-Clause)!) +- [Licences](../contribute/licenses.md): 您对代码的操作权限(可在宽松的 [BSD 3-clause license](https://opensource.org/license/BSD-3-Clause)条款下自由使用和修改!) - [贡献](../contribute/index.md): 如何使用我们的 [源代码](../contribute/code.md)。 diff --git a/docs/zh/dronecan/ark_flow.md b/docs/zh/dronecan/ark_flow.md index 9507785cc7..fa64ec94ae 100644 --- a/docs/zh/dronecan/ark_flow.md +++ b/docs/zh/dronecan/ark_flow.md @@ -94,6 +94,7 @@ Set the following parameters in _QGroundControl_: - To optionally disable GPS aiding, set [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to `0`. - Enable [UAVCAN_SUB_FLOW](../advanced_config/parameter_reference.md#UAVCAN_SUB_FLOW). - Enable [UAVCAN_SUB_RNG](../advanced_config/parameter_reference.md#UAVCAN_SUB_RNG). +- Set [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) to `1`. - Set [EKF2_RNG_A_HMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_HMAX) to `10`. - Set [EKF2_RNG_QLTY_T](../advanced_config/parameter_reference.md#EKF2_RNG_QLTY_T) to `0.2`. - Set [UAVCAN_RNG_MIN](../advanced_config/parameter_reference.md#UAVCAN_RNG_MIN) to `0.08`. diff --git a/docs/zh/dronecan/ark_flow_mr.md b/docs/zh/dronecan/ark_flow_mr.md index eebbbc142c..f3fb47940d 100644 --- a/docs/zh/dronecan/ark_flow_mr.md +++ b/docs/zh/dronecan/ark_flow_mr.md @@ -91,6 +91,7 @@ Set the following parameters in _QGroundControl_: - To optionally disable GPS aiding, set [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to `0`. - Enable [UAVCAN_SUB_FLOW](../advanced_config/parameter_reference.md#UAVCAN_SUB_FLOW). - Enable [UAVCAN_SUB_RNG](../advanced_config/parameter_reference.md#UAVCAN_SUB_RNG). +- Set [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) to `1`. - Set [EKF2_RNG_A_HMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_HMAX) to `10`. - Set [EKF2_RNG_QLTY_T](../advanced_config/parameter_reference.md#EKF2_RNG_QLTY_T) to `0.2`. - Set [UAVCAN_RNG_MIN](../advanced_config/parameter_reference.md#UAVCAN_RNG_MIN) to `0.08`. diff --git a/docs/zh/esc/ark_4in1_esc.md b/docs/zh/esc/ark_4in1_esc.md new file mode 100644 index 0000000000..561e71e969 --- /dev/null +++ b/docs/zh/esc/ark_4in1_esc.md @@ -0,0 +1,65 @@ +# ARK 4IN1 ESC (with/without Connectors) + +4 in 1 Electronic Speed Controller (ESC) that is made in the USA, NDAA compliant, and DIU Blue Framework listed. + +The ESC comes in variants without connectors that you can solder in place, and a variant that has built-in motor and battery connectors (no soldering required). + +![ARK 4IN1 ESC without connectors ](../../assets/hardware/esc/ark/ark_4_in_1_esc.jpg)![ARK 4IN1 ESC with connectors](../../assets/hardware/esc/ark/ark_4_in_1_esc_with_connectors.jpg) + +## 购买渠道 + +Order this module from: + +- [4IN1 ESC (with connectors)](https://arkelectron.com/product/ark-4in1-esc/) (ARK Electronics - US) +- [ARK Electronics (without connectors)](https://arkelectron.com/product/ark-4in1-esc-cons/) (ARK Electronics US) + +## Hardware Specifications + +- Battery Voltage: 3-8s + - 6V Minimum + - 65V Absolute Maximum + +- Current Rating: 50A Continuous, 75A Burst Per Motor + +- [STM32F0](https://www.st.com/en/microcontrollers-microprocessors/stm32f0-series.html) + +- [AM32 Firmware](https://github.com/am32-firmware/AM32/pull/27) + +- Onboard Current Sensor, Serial Telemetry + - 100V/A + +- Input Protocols + - DShot (300, 600) + - Bi-directional DShot + - KISS Serial Telemetry + - PWM + +- 8 Pin JST-SH Input/Output + +- 10 Pin JST-SH Debug + +- Motor & Battery Connectors (with-connector version) + + - MR30 Connector Limit Per Motor: 30A Continuous, 40A Burst + - Four MR30 Motor Connectors + +- Dimensions (with connectors) + + - Size: 77.00mm x 42.00mm x 9.43mm + - Mounting Pattern: 30.5mm + - Weight: 24g + +- Dimensions (without connectors) + - Size: 43.00mm x 40.50mm x 7.60mm + - Mounting Pattern: 30.5mm + - Weight: 14.5g + +Other + +- Made in the USA +- Open source AM32 firmware +- [DIU Blue Framework Listed](https://www.diu.mil/blue-uas/framework) + +## 另见 + +- [ARK 4IN1 ESC CONS](https://docs.arkelectron.com/electronic-speed-controller/ark-4in1-esc) (ARK Docs) diff --git a/docs/zh/esc/esc_protocols.md b/docs/zh/esc/esc_protocols.md new file mode 100644 index 0000000000..930d436de6 --- /dev/null +++ b/docs/zh/esc/esc_protocols.md @@ -0,0 +1,66 @@ +# ESC Protocols + +This topic lists the main [Electronic Speed Controller (ESC)](../peripherals/esc_motors.md) protocols supported by PX4. + +## DShot + +[DShot](../peripherals/dshot.md) is a digital ESC protocol that is highly recommended for vehicles that can benefit from reduced latency, in particular racing multicopters, VTOL vehicles, and so on. + +It has reduced latency and is more robust than both [PWM](#pwm) and [OneShot](#oneshot-125). +In addition it does not require ESC calibration, telemetry is available from some ESCs, and you can reverse motor spin directions. + +PX4 configuration is done in the [Actuator Configuration](../config/actuators.md). +Selecting a higher rate DShot ESC in the UI results in lower latency, but lower rates are more robust (and hence more suitable for large aircraft with longer leads); some ESCs only support lower rates (see datasheets for information). + +Setup: + +- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs) +- [DShot](../peripherals/dshot.md) also contains information about how to send commands etc. + +## DroneCAN + +[DroneCAN ESCs](../dronecan/escs.md) are recommended when DroneCAN is the primary bus used for your vehicle. +The PX4 implementation is currently limited to update rates of 200 Hz. + +DroneCAN shares many similar benefits to [DShot](#dshot) including high data rates, robust connection over long leads, telemetry feedback, no need for calibration of the ESC itself. + +[DroneCAN ESCs](../dronecan/escs.md) are connected via the DroneCAN bus (setup and configuration are covered at that link). + +## PWM + +[PWM ESCs](../peripherals/pwm_escs_and_servo.md) are commonly used for fixed-wing vehicles and ground vehicles (vehicles that require a lower latency like multicopters typically use oneshot or dshot ESCs). + +PWM ESCs communicate using a periodic pulse, where the _width_ of the pulse indicates the desired speed. +The pulse width typically ranges between 1000 μs for zero power and 2000 μs for full power. +The periodic frame rate of the signal depends on the capability of the ESC, and commonly ranges between 50 Hz and 490 Hz (the theoretical maximum being 500 Hz for a very small "off" cycle). +A higher rate is better for ESCs, in particular where a rapid response to setpoint changes is needed. +For PWM servos 50 Hz is usually sufficient, and many don't support higher rates. + +![duty cycle for PWM](../../assets/peripherals/esc_pwm_duty_cycle.png) + +In addition to being a relatively slow protocol PWM ESCs require [calibration](../advanced_config/esc_calibration.md) because the pulse widths representing low and high values can vary significantly. +Unlike [DShot](#dshot) and [DroneCAN ESC](#dronecan) they do not have the ability to provide telemetry and feedback on ESC (or servo) state. + +Setup: + +- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) +- [PX4 Configuration](../peripherals/pwm_escs_and_servo.md#px4-configuration) +- [ESC Calibration](../advanced_config/esc_calibration.md) + +## OneShot 125 + +[OneShot 125 ESCs](../peripherals/oneshot.md) are usually much faster than PWM ESCs, and hence more responsive and easier to tune. +They are preferred over PWM for multicopters (but not as much as [DShot ESCs](#dshot), which do not require calibration, and may provide telemetry feedback). +There are a number of variants of the OneShot protocol, which support different rates. +PX4 only supports OneShot 125. + +OneShot 125 is the same as PWM but uses pulse widths that are 8 times shorter (from 125 μs to 250 μs for zero to full power). +This allows OneShot 125 ESCs to have a much shorter duty cycle/higher rate. +For PWM the theoretical maximum is close to 500 Hz while for OneShot it approaches 4 kHz. +The actual supported rate depends on the ESC used. + +Setup: + +- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs) +- [PX4 Configuration](../peripherals/oneshot.md#px4-configuration) +- [ESC Calibration](../advanced_config/esc_calibration.md) diff --git a/docs/zh/flight_controller/accton-godwit_ga1.md b/docs/zh/flight_controller/accton-godwit_ga1.md index 1c3f0a39ff..20e78c102b 100644 --- a/docs/zh/flight_controller/accton-godwit_ga1.md +++ b/docs/zh/flight_controller/accton-godwit_ga1.md @@ -80,7 +80,7 @@ This flight controller is [manufacturer supported](../flight_controller/autopilo | ------- | --------- | ------ | ---------- | | SERIAL1 | Telem1 | UART7 | /dev/ttyS6 | | SERIAL2 | Telem2 | UART5 | /dev/ttyS4 | -| SERIAL3 | GPS1 | USART1 | UART | +| SERIAL3 | GPS1 | USART1 | /dev/ttyS0 | | SERIAL4 | GPS2 | UART8 | /dev/ttyS7 | | SERIAL5 | Telem3 | USART2 | /dev/ttyS1 | | SERIAL6 | UART4 | UART4 | /dev/ttyS3 | diff --git a/docs/zh/flight_controller/ark_v6x.md b/docs/zh/flight_controller/ark_v6x.md index 75c7cb6d8a..ffa3f4e172 100644 --- a/docs/zh/flight_controller/ark_v6x.md +++ b/docs/zh/flight_controller/ark_v6x.md @@ -63,7 +63,7 @@ For pinout of the ARKV6X see the [DS-10 Pixhawk Autopilot Bus Standard](https:// | UART | 设备 | Port | | ------ | ---------- | ------------------------------- | -| USART1 | UART | GPS | +| USART1 | /dev/ttyS0 | GPS | | USART2 | /dev/ttyS1 | TELEM3 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART4 | /dev/ttyS3 | UART4 & I2C | diff --git a/docs/zh/flight_controller/auav_x2.md b/docs/zh/flight_controller/auav_x2.md index 803d492ce6..505a8ad73d 100644 --- a/docs/zh/flight_controller/auav_x2.md +++ b/docs/zh/flight_controller/auav_x2.md @@ -84,7 +84,7 @@ As a CC-BY-SA 3.0 licensed Open Hardware design, all schematics and design files | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| UART | UART | IO debug | +| UART | /dev/ttyS0 | IO debug | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | | | diff --git a/docs/zh/flight_controller/cuav_pixhawk_v6x.md b/docs/zh/flight_controller/cuav_pixhawk_v6x.md index 814c52b10a..ab6bf390fa 100644 --- a/docs/zh/flight_controller/cuav_pixhawk_v6x.md +++ b/docs/zh/flight_controller/cuav_pixhawk_v6x.md @@ -124,7 +124,7 @@ The [Pixhawk V6X Wiring Quick Start](../assembly/quick_start_cuav_pixhawk_v6x.md | UART | 设备 | Port | | ------ | ---------- | -------- | -| USART1 | UART | GPS | +| USART1 | /dev/ttyS0 | GPS | | USART2 | /dev/ttyS1 | TELEM3 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART4 | /dev/ttyS3 | UART4 | diff --git a/docs/zh/flight_controller/cuav_v5.md b/docs/zh/flight_controller/cuav_v5.md index b73968cf07..b7f5dd97b7 100644 --- a/docs/zh/flight_controller/cuav_v5.md +++ b/docs/zh/flight_controller/cuav_v5.md @@ -122,7 +122,7 @@ The pinout is as shown. | UART | 设备 | Port | | ------ | ---------- | ---------------------------------------------------------- | -| UART | UART | GPS | +| UART | /dev/ttyS0 | GPS | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | /dev/ttyS3 | TELEM4 | diff --git a/docs/zh/flight_controller/cuav_v5_nano.md b/docs/zh/flight_controller/cuav_v5_nano.md index c8f1c37c32..14b3a4c225 100644 --- a/docs/zh/flight_controller/cuav_v5_nano.md +++ b/docs/zh/flight_controller/cuav_v5_nano.md @@ -134,7 +134,7 @@ For more information see [Using JTAG for hardware debugging](#using-jtag-for-har | UART | 设备 | Port | | ------ | ---------- | ---------------------------------------------------------- | -| UART | UART | GPS | +| UART | /dev/ttyS0 | GPS | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | /dev/ttyS3 | TELEM4 | diff --git a/docs/zh/flight_controller/cuav_v5_plus.md b/docs/zh/flight_controller/cuav_v5_plus.md index 49b6aa6d2d..14ab8782bb 100644 --- a/docs/zh/flight_controller/cuav_v5_plus.md +++ b/docs/zh/flight_controller/cuav_v5_plus.md @@ -160,7 +160,7 @@ For more information see [Using JTAG for hardware debugging](#using-jtag-for-har | UART | 设备 | Port | | ------ | ---------- | ---------------------------------------------------------- | -| UART | UART | GPS | +| UART | /dev/ttyS0 | GPS | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | /dev/ttyS3 | TELEM4 | diff --git a/docs/zh/flight_controller/cuav_x25-evo.md b/docs/zh/flight_controller/cuav_x25-evo.md index ec68641440..4741da8858 100644 --- a/docs/zh/flight_controller/cuav_x25-evo.md +++ b/docs/zh/flight_controller/cuav_x25-evo.md @@ -101,7 +101,7 @@ Order from [CUAV](https://store.cuav.net/). | UART | 设备 | Port | | ------ | ---------- | ------ | -| USART1 | UART | GPS1 | +| USART1 | /dev/ttyS0 | GPS1 | | USART2 | /dev/ttyS1 | GPS2 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART4 | /dev/ttyS3 | UART4 | diff --git a/docs/zh/flight_controller/cubepilot_cube_orange.md b/docs/zh/flight_controller/cubepilot_cube_orange.md index 1ab22c5bdb..7e57746a70 100644 --- a/docs/zh/flight_controller/cubepilot_cube_orange.md +++ b/docs/zh/flight_controller/cubepilot_cube_orange.md @@ -206,7 +206,7 @@ The manufacturer [Cube User Guide](https://docs.cubepilot.org/user-guides/autopi | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| USART2 | UART | TELEM1 (流控) | +| USART2 | /dev/ttyS0 | TELEM1 (流控) | | USART3 | /dev/ttyS1 | TELEM2 (流控) | | UART4 | /dev/ttyS2 | GPS1 | | USART6 | /dev/ttyS3 | PX4IO | diff --git a/docs/zh/flight_controller/cubepilot_cube_orangeplus.md b/docs/zh/flight_controller/cubepilot_cube_orangeplus.md index b45014c233..41af5783d1 100644 --- a/docs/zh/flight_controller/cubepilot_cube_orangeplus.md +++ b/docs/zh/flight_controller/cubepilot_cube_orangeplus.md @@ -207,7 +207,7 @@ The manufacturer [Cube User Guide](https://docs.cubepilot.org/user-guides/autopi | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| USART2 | UART | TELEM1 (流控) | +| USART2 | /dev/ttyS0 | TELEM1 (流控) | | USART3 | /dev/ttyS1 | TELEM2 (流控) | | UART4 | /dev/ttyS2 | GPS1 | | USART6 | /dev/ttyS3 | PX4IO | diff --git a/docs/zh/flight_controller/cubepilot_cube_yellow.md b/docs/zh/flight_controller/cubepilot_cube_yellow.md index fab8867d0c..d7bcc3f4e5 100644 --- a/docs/zh/flight_controller/cubepilot_cube_yellow.md +++ b/docs/zh/flight_controller/cubepilot_cube_yellow.md @@ -100,7 +100,7 @@ Board schematics and other documentation can be found here: [The Cube Project](h | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| USART2 | UART | TELEM1 (流控) | +| USART2 | /dev/ttyS0 | TELEM1 (流控) | | USART3 | /dev/ttyS1 | TELEM2 (流控) | | UART4 | /dev/ttyS2 | GPS1 | | USART6 | /dev/ttyS3 | PX4IO | diff --git a/docs/zh/flight_controller/durandal.md b/docs/zh/flight_controller/durandal.md index b4acc8bb09..0024c79fa5 100644 --- a/docs/zh/flight_controller/durandal.md +++ b/docs/zh/flight_controller/durandal.md @@ -170,7 +170,7 @@ make holybro_durandal-v1_default | UART | 设备 | Port | | ------ | ---------- | ----------- | -| USART1 | UART | GPS1 | +| USART1 | /dev/ttyS0 | GPS1 | | USART2 | /dev/ttyS1 | TELEM1 | | USART3 | /dev/ttyS2 | TELEM2 | | UART4 | /dev/ttyS3 | TELEM4/GPS2 | diff --git a/docs/zh/flight_controller/holybro_pix32.md b/docs/zh/flight_controller/holybro_pix32.md index 14c9b08e42..056396eb17 100644 --- a/docs/zh/flight_controller/holybro_pix32.md +++ b/docs/zh/flight_controller/holybro_pix32.md @@ -96,7 +96,7 @@ As a CC-BY-SA 3.0 licensed Open Hardware design, all schematics and design files | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| UART | UART | IO debug | +| UART | /dev/ttyS0 | IO debug | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | | | diff --git a/docs/zh/flight_controller/holybro_pix32_v6.md b/docs/zh/flight_controller/holybro_pix32_v6.md index a91aa132ca..81cae7c034 100644 --- a/docs/zh/flight_controller/holybro_pix32_v6.md +++ b/docs/zh/flight_controller/holybro_pix32_v6.md @@ -106,7 +106,7 @@ Order from [Holybro](https://holybro.com/products/pix32-v6). | UART | 设备 | Port | | ------ | ---------- | ------ | -| USART1 | UART | GPS1 | +| USART1 | /dev/ttyS0 | GPS1 | | USART2 | /dev/ttyS1 | TELEM3 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART5 | /dev/ttyS3 | TELEM2 | diff --git a/docs/zh/flight_controller/kakutef7.md b/docs/zh/flight_controller/kakutef7.md index 3508db0e5c..85877b99b1 100644 --- a/docs/zh/flight_controller/kakutef7.md +++ b/docs/zh/flight_controller/kakutef7.md @@ -113,7 +113,7 @@ In addition to the [basic configuration](../config/index.md), the following para | UART | 设备 | Port | | ------ | ---------- | ---------------------------------------- | -| USART1 | UART | TELEM1 | +| USART1 | /dev/ttyS0 | TELEM1 | | USART2 | /dev/ttyS1 | TELEM2 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART4 | /dev/ttyS3 | GPS1 | diff --git a/docs/zh/flight_controller/kakuteh7-wing.md b/docs/zh/flight_controller/kakuteh7-wing.md index 59031d431b..e426a8aabe 100644 --- a/docs/zh/flight_controller/kakuteh7-wing.md +++ b/docs/zh/flight_controller/kakuteh7-wing.md @@ -69,7 +69,7 @@ Firmware can be manually installed in any of the normal ways: | UART | 设备 | Port | Default function | | ------ | ---------- | --------------------------- | ---------------- | -| USART1 | UART | GPS 1 | GPS1 | +| USART1 | /dev/ttyS0 | GPS 1 | GPS1 | | USART2 | /dev/ttyS1 | R2, T2 | GPS2 | | USART3 | /dev/ttyS2 | R3, T3 | TELEM1 | | UART5 | /dev/ttyS3 | R5, T5 | TELEM2 | diff --git a/docs/zh/flight_controller/kakuteh7.md b/docs/zh/flight_controller/kakuteh7.md index 27c60acfde..333fe8d674 100644 --- a/docs/zh/flight_controller/kakuteh7.md +++ b/docs/zh/flight_controller/kakuteh7.md @@ -117,7 +117,7 @@ In addition to the [basic configuration](../config/index.md), the following para | UART | 设备 | Port | | ------ | ---------- | ---------------------------------------- | -| USART1 | UART | TELEM1 | +| USART1 | /dev/ttyS0 | TELEM1 | | USART2 | /dev/ttyS1 | TELEM2 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART4 | /dev/ttyS3 | GPS1 | diff --git a/docs/zh/flight_controller/kakuteh7mini.md b/docs/zh/flight_controller/kakuteh7mini.md index 23198d0064..dbb3c96192 100644 --- a/docs/zh/flight_controller/kakuteh7mini.md +++ b/docs/zh/flight_controller/kakuteh7mini.md @@ -124,7 +124,7 @@ In addition to the [basic configuration](../config/index.md), the following para | UART | 设备 | Port | | ------ | ---------- | ---------------------------------------- | -| USART1 | UART | TELEM1 | +| USART1 | /dev/ttyS0 | TELEM1 | | UART2 | /dev/ttyS1 | TELEM2 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART4 | /dev/ttyS3 | GPS1 | diff --git a/docs/zh/flight_controller/kakuteh7v2.md b/docs/zh/flight_controller/kakuteh7v2.md index d5b1f8faec..60a591e8db 100644 --- a/docs/zh/flight_controller/kakuteh7v2.md +++ b/docs/zh/flight_controller/kakuteh7v2.md @@ -121,7 +121,7 @@ In addition to the [basic configuration](../config/index.md), the following para | UART | 设备 | Port | | ------ | ---------- | ---------------------------------------- | -| USART1 | UART | TELEM1 | +| USART1 | /dev/ttyS0 | TELEM1 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART4 | /dev/ttyS3 | GPS1 | | USART6 | /dev/ttyS4 | RC SBUS | diff --git a/docs/zh/flight_controller/micoair743-lite.md b/docs/zh/flight_controller/micoair743-lite.md index bf8c114b90..b3a76a0065 100644 --- a/docs/zh/flight_controller/micoair743-lite.md +++ b/docs/zh/flight_controller/micoair743-lite.md @@ -79,7 +79,7 @@ Pinouts definition can be found in the [MicoAir743-Lite_pinout.xlsx](https://raw | UART | 设备 | Port | | ------ | ---------- | ------ | -| USART1 | UART | TELEM1 | +| USART1 | /dev/ttyS0 | TELEM1 | | USART2 | /dev/ttyS1 | GPS2 | | USART3 | /dev/ttyS2 | GPS1 | | UART4 | /dev/ttyS3 | TELEM2 | diff --git a/docs/zh/flight_controller/mindpx.md b/docs/zh/flight_controller/mindpx.md index 7b3145c1bd..51ad77c014 100644 --- a/docs/zh/flight_controller/mindpx.md +++ b/docs/zh/flight_controller/mindpx.md @@ -113,7 +113,7 @@ You can also find MindRacer at Amazon® or eBay®. | UART | 设备 | Port | | ------ | ---------- | ------ | -| USART1 | UART | RC | +| USART1 | /dev/ttyS0 | RC | | USART2 | /dev/ttyS1 | TELEM1 | | USART3 | /dev/ttyS2 | TELEM2 | | UART4 | /dev/ttyS3 | GPS1 | diff --git a/docs/zh/flight_controller/modalai_fc_v1.md b/docs/zh/flight_controller/modalai_fc_v1.md index 53ce071462..1e9562b83d 100644 --- a/docs/zh/flight_controller/modalai_fc_v1.md +++ b/docs/zh/flight_controller/modalai_fc_v1.md @@ -130,7 +130,7 @@ make modalai_fc-v1 | UART | 设备 | Port | | ------ | ---------- | ----------------------------------------------------------- | -| USART1 | UART | GPS1 (J10) | +| USART1 | /dev/ttyS0 | GPS1 (J10) | | USART2 | /dev/ttyS1 | TELEM3 (J4) | | USART3 | /dev/ttyS2 | Debug Console (J2) | | UART4 | /dev/ttyS3 | Expansion UART (J6) | diff --git a/docs/zh/flight_controller/modalai_voxl_flight.md b/docs/zh/flight_controller/modalai_voxl_flight.md index 806ea037ad..352fd22892 100644 --- a/docs/zh/flight_controller/modalai_voxl_flight.md +++ b/docs/zh/flight_controller/modalai_voxl_flight.md @@ -186,7 +186,7 @@ _Note: mappings shown are for the PX4 controlled interfaces only_ | UART | 设备 | Port | | ------ | ---------- | ---------------------------------------- | -| USART1 | UART | GPS1 (J1012) | +| USART1 | /dev/ttyS0 | GPS1 (J1012) | | USART2 | /dev/ttyS1 | TELEM3 (J1002) | | USART3 | /dev/ttyS2 | Debug Console (J1001) | | UART4 | /dev/ttyS3 | Expansion UART (J6) | diff --git a/docs/zh/flight_controller/mro_control_zero_f7.md b/docs/zh/flight_controller/mro_control_zero_f7.md index 564cc9d13c..0e2c41e68c 100644 --- a/docs/zh/flight_controller/mro_control_zero_f7.md +++ b/docs/zh/flight_controller/mro_control_zero_f7.md @@ -106,7 +106,7 @@ There is also an [ARM20-CTX 20-Pin to TC2030-IDC adapter](https://www.tag-connec | UART | 设备 | Port | | ------ | ---------- | -------------------------------------------------------------------------------------------------- | -| USART2 | UART | TELEM1 (流控) | +| USART2 | /dev/ttyS0 | TELEM1 (流控) | | USART3 | /dev/ttyS1 | TELEM2 (流控) | | UART4 | /dev/ttyS2 | GPS1 | | USART6 | /dev/ttyS3 | Flex port (can be configured as SPI or UART with Flow Control). | diff --git a/docs/zh/flight_controller/mro_pixhawk.md b/docs/zh/flight_controller/mro_pixhawk.md index afd00c790e..295d4d2b2b 100644 --- a/docs/zh/flight_controller/mro_pixhawk.md +++ b/docs/zh/flight_controller/mro_pixhawk.md @@ -88,7 +88,7 @@ See [3DR Pixhawk 1 > Pinouts](../flight_controller/pixhawk.md#pinouts) | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| UART | UART | IO debug | +| UART | /dev/ttyS0 | IO debug | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | | | diff --git a/docs/zh/flight_controller/mro_x2.1.md b/docs/zh/flight_controller/mro_x2.1.md index f22b80daa1..d54c36cd5e 100644 --- a/docs/zh/flight_controller/mro_x2.1.md +++ b/docs/zh/flight_controller/mro_x2.1.md @@ -111,7 +111,7 @@ The board is documented on the mRo hardware repo: [x21_V2_schematic.pdf](https:/ | UART | 设备 | Port | | ------ | ---------- | --------------- | -| USART1 | UART | IO debug | +| USART1 | /dev/ttyS0 | IO debug | | USART2 | /dev/ttyS1 | SERIAL1 | | USART3 | /dev/ttyS2 | TELEM2 | | UART4 | /dev/ttyS3 | GPS/I2C | diff --git a/docs/zh/flight_controller/nxp_mr_vmu_rt1176.md b/docs/zh/flight_controller/nxp_mr_vmu_rt1176.md index 6f3ca1b0b8..fd7a55b3c1 100644 --- a/docs/zh/flight_controller/nxp_mr_vmu_rt1176.md +++ b/docs/zh/flight_controller/nxp_mr_vmu_rt1176.md @@ -182,7 +182,7 @@ _MR-VMU-RT1176_ connectors (following [Pixhawk Connector Standard](https://githu | UART | 设备 | Port | | ------ | ---------- | -------- | -| UART | UART | Debug | +| UART | /dev/ttyS0 | Debug | | UART3 | /dev/ttyS1 | GPS | | UART4 | /dev/ttyS2 | TELEM1 | | UART5 | /dev/ttyS3 | GPS2 | diff --git a/docs/zh/flight_controller/omnibus_f4_sd.md b/docs/zh/flight_controller/omnibus_f4_sd.md index c1783c71d1..1e121343dc 100644 --- a/docs/zh/flight_controller/omnibus_f4_sd.md +++ b/docs/zh/flight_controller/omnibus_f4_sd.md @@ -164,7 +164,7 @@ Here is an example implementation. I used a Spektrum plug to get 3.3v from the D | UART | 设备 | Port | | ------ | ---------- | -------- | -| USART1 | UART | SerialRX | +| USART1 | /dev/ttyS0 | SerialRX | | USART4 | /dev/ttyS1 | TELEM1 | | USART6 | /dev/ttyS2 | GPS | diff --git a/docs/zh/flight_controller/pixfalcon.md b/docs/zh/flight_controller/pixfalcon.md index 0a53eb2800..24611cecd3 100644 --- a/docs/zh/flight_controller/pixfalcon.md +++ b/docs/zh/flight_controller/pixfalcon.md @@ -68,7 +68,7 @@ Developers will need to solder wires to the board test pads for SWD, and to the | UART | 设备 | Port | | ------ | ---------- | ------------------------------------------- | -| UART | UART | IO Debug | +| UART | /dev/ttyS0 | IO Debug | | USART2 | /dev/ttyS1 | TELEM1 (No flow control) | | UART4 | /dev/ttyS2 | GPS | diff --git a/docs/zh/flight_controller/pixhack_v3.md b/docs/zh/flight_controller/pixhack_v3.md index f8e7b063e9..df84cf93db 100644 --- a/docs/zh/flight_controller/pixhack_v3.md +++ b/docs/zh/flight_controller/pixhack_v3.md @@ -80,7 +80,7 @@ make px4_fmu-v3_default | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| UART | UART | IO debug | +| UART | /dev/ttyS0 | IO debug | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | | | diff --git a/docs/zh/flight_controller/pixhawk-2.md b/docs/zh/flight_controller/pixhawk-2.md index 94272adce4..51dd87718f 100644 --- a/docs/zh/flight_controller/pixhawk-2.md +++ b/docs/zh/flight_controller/pixhawk-2.md @@ -126,7 +126,7 @@ Board schematics and other documentation can be found here: [The Cube Project](h | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| USART1 | UART | | +| USART1 | /dev/ttyS0 | | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | /dev/ttyS3 | GPS1 | diff --git a/docs/zh/flight_controller/pixhawk.md b/docs/zh/flight_controller/pixhawk.md index 6a2d7346ae..a7a803013f 100644 --- a/docs/zh/flight_controller/pixhawk.md +++ b/docs/zh/flight_controller/pixhawk.md @@ -247,7 +247,7 @@ Due to space constraints two ports are on one connector. | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| UART | UART | IO debug | +| UART | /dev/ttyS0 | IO debug | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | | | diff --git a/docs/zh/flight_controller/pixhawk3_pro.md b/docs/zh/flight_controller/pixhawk3_pro.md index a0aebc8e8e..65acbbd6de 100644 --- a/docs/zh/flight_controller/pixhawk3_pro.md +++ b/docs/zh/flight_controller/pixhawk3_pro.md @@ -77,7 +77,7 @@ For information about wiring and using this port see: | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| UART | UART | WiFi | +| UART | /dev/ttyS0 | WiFi | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | | | diff --git a/docs/zh/flight_controller/pixhawk4.md b/docs/zh/flight_controller/pixhawk4.md index 9ae81b06e0..7eda15a8f1 100644 --- a/docs/zh/flight_controller/pixhawk4.md +++ b/docs/zh/flight_controller/pixhawk4.md @@ -77,7 +77,7 @@ The exception is the [debug port(s)](#debug_port) (pin 1 is the right-most, as s | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| UART | UART | GPS | +| UART | /dev/ttyS0 | GPS | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | /dev/ttyS3 | TELEM4 | diff --git a/docs/zh/flight_controller/pixhawk4_mini.md b/docs/zh/flight_controller/pixhawk4_mini.md index e3921cbf63..e4e316effb 100644 --- a/docs/zh/flight_controller/pixhawk4_mini.md +++ b/docs/zh/flight_controller/pixhawk4_mini.md @@ -129,7 +129,7 @@ The pinout uses the standard [Pixhawk debug connector](https://github.com/pixhaw | UART | 设备 | QGC Parameter Description | Port Label on FC | | :----: | :--------: | :-----------------------: | :-----------------------------------------: | -| UART | UART | GPS1 | GPS Module | +| UART | /dev/ttyS0 | GPS1 | GPS Module | | USART2 | /dev/ttyS1 | TELEM1 | TELEM1 | | USART3 | /dev/ttyS2 | TELEM2 | N/A | | UART4 | /dev/ttyS3 | TELEM/SERIAL4 | UART/l2C B | diff --git a/docs/zh/flight_controller/pixhawk5x.md b/docs/zh/flight_controller/pixhawk5x.md index e0d6177760..f78e8ef9e4 100644 --- a/docs/zh/flight_controller/pixhawk5x.md +++ b/docs/zh/flight_controller/pixhawk5x.md @@ -140,7 +140,7 @@ Connector pin assignments are left to right (i.e. Pin 1 is the left-most pin). | UART | 设备 | Port | | ------ | ---------- | ------------------------------- | -| USART1 | UART | GPS | +| USART1 | /dev/ttyS0 | GPS | | USART2 | /dev/ttyS1 | TELEM3 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART4 | /dev/ttyS3 | UART4 & I2C | diff --git a/docs/zh/flight_controller/pixhawk6c.md b/docs/zh/flight_controller/pixhawk6c.md index b950285f81..9b2eaa5c76 100644 --- a/docs/zh/flight_controller/pixhawk6c.md +++ b/docs/zh/flight_controller/pixhawk6c.md @@ -112,7 +112,7 @@ The [Pixhawk 6C Wiring Quick Start](../assembly/quick_start_pixhawk6c.md) provid | UART | 设备 | Port | | ------ | ---------- | ------ | -| USART1 | UART | GPS1 | +| USART1 | /dev/ttyS0 | GPS1 | | USART2 | /dev/ttyS1 | TELEM3 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART5 | /dev/ttyS3 | TELEM2 | diff --git a/docs/zh/flight_controller/pixhawk6c_mini.md b/docs/zh/flight_controller/pixhawk6c_mini.md index a5e6079313..5c5069b5ee 100644 --- a/docs/zh/flight_controller/pixhawk6c_mini.md +++ b/docs/zh/flight_controller/pixhawk6c_mini.md @@ -111,7 +111,7 @@ Please refer to the [Pixhawk 4 Mini Wiring Quick Start](../assembly/quick_start_ | UART | 设备 | QGC Parameter Description | Port Label on FC | | ------ | ---------- | ------------------------- | ---------------- | -| USART1 | UART | GPS1 | GPS1 | +| USART1 | /dev/ttyS0 | GPS1 | GPS1 | | USART2 | /dev/ttyS1 | TELEM3 | N/A | | USART3 | /dev/ttyS2 | N/A | FMU Debug | | UART5 | /dev/ttyS3 | TELEM2 | TELEM2 | diff --git a/docs/zh/flight_controller/pixhawk6x-rt.md b/docs/zh/flight_controller/pixhawk6x-rt.md index bb3b3fa805..0214bc782a 100644 --- a/docs/zh/flight_controller/pixhawk6x-rt.md +++ b/docs/zh/flight_controller/pixhawk6x-rt.md @@ -157,7 +157,7 @@ Sample Wiring Diagram | UART | 设备 | Port | | ------ | ---------- | -------- | -| UART | UART | Debug | +| UART | /dev/ttyS0 | Debug | | UART3 | /dev/ttyS1 | GPS | | UART4 | /dev/ttyS2 | TELEM1 | | UART5 | /dev/ttyS3 | GPS2 | diff --git a/docs/zh/flight_controller/pixhawk6x.md b/docs/zh/flight_controller/pixhawk6x.md index aec1d331f4..81d456b8f4 100644 --- a/docs/zh/flight_controller/pixhawk6x.md +++ b/docs/zh/flight_controller/pixhawk6x.md @@ -188,7 +188,7 @@ Sample Wiring Diagram | UART | 设备 | Port | | ------ | ---------- | ------------------------------- | -| USART1 | UART | GPS | +| USART1 | /dev/ttyS0 | GPS | | USART2 | /dev/ttyS1 | TELEM3 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART4 | /dev/ttyS3 | UART4 & I2C | diff --git a/docs/zh/flight_controller/pixhawk6x_pro.md b/docs/zh/flight_controller/pixhawk6x_pro.md index d93f74cf9a..6d5a0fcdbb 100644 --- a/docs/zh/flight_controller/pixhawk6x_pro.md +++ b/docs/zh/flight_controller/pixhawk6x_pro.md @@ -148,7 +148,7 @@ The [Pixhawk 6X Wiring Quick Start](../assembly/quick_start_pixhawk6x.md) provid | UART | 设备 | Port | | ------ | ---------- | ------------------------------- | -| USART1 | UART | GPS | +| USART1 | /dev/ttyS0 | GPS | | USART2 | /dev/ttyS1 | TELEM3 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART4 | /dev/ttyS3 | UART4 & I2C | diff --git a/docs/zh/flight_controller/pixracer.md b/docs/zh/flight_controller/pixracer.md index 2510ed17b1..4fd541cdc7 100644 --- a/docs/zh/flight_controller/pixracer.md +++ b/docs/zh/flight_controller/pixracer.md @@ -190,7 +190,7 @@ For information about using this port see: | UART | 设备 | Port | | ------ | ---------- | --------------------------------- | -| UART | UART | WiFi (ESP8266) | +| UART | /dev/ttyS0 | WiFi (ESP8266) | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | | | diff --git a/docs/zh/flight_controller/raccoonlab_fmu6x.md b/docs/zh/flight_controller/raccoonlab_fmu6x.md index ab1f90407d..656331f732 100644 --- a/docs/zh/flight_controller/raccoonlab_fmu6x.md +++ b/docs/zh/flight_controller/raccoonlab_fmu6x.md @@ -103,7 +103,7 @@ This autopilot is [supported](../flight_controller/autopilot_pixhawk_standard.md | UART | 设备 | Port | | ------ | ---------- | ------------------------------- | -| USART1 | UART | GPS | +| USART1 | /dev/ttyS0 | GPS | | USART2 | /dev/ttyS1 | TELEM3 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART4 | /dev/ttyS3 | UART4 & I2C | diff --git a/docs/zh/flight_controller/radiolink_pix6.md b/docs/zh/flight_controller/radiolink_pix6.md index 61be8aeacb..a1e395ddd8 100644 --- a/docs/zh/flight_controller/radiolink_pix6.md +++ b/docs/zh/flight_controller/radiolink_pix6.md @@ -304,7 +304,7 @@ Recommended modules include: | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| UART | UART | GPS1 | +| UART | /dev/ttyS0 | GPS1 | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | /dev/ttyS3 | GPS2 | diff --git a/docs/zh/flight_controller/svehicle_e2.md b/docs/zh/flight_controller/svehicle_e2.md index 6bbcb05a8d..13baec27c3 100644 --- a/docs/zh/flight_controller/svehicle_e2.md +++ b/docs/zh/flight_controller/svehicle_e2.md @@ -76,7 +76,7 @@ CRSF receiver must be wired to a spare port (UART) on the Flight Controller. The | UART | 设备 | Port | | ------ | ---------- | -------- | -| USART1 | UART | GPS | +| USART1 | /dev/ttyS0 | GPS | | USART2 | /dev/ttyS1 | TELEM3 | | USART3 | /dev/ttyS2 | 调试控制台 | | UART4 | /dev/ttyS3 | UART4 | diff --git a/docs/zh/flight_controller/thepeach_k1.md b/docs/zh/flight_controller/thepeach_k1.md index 3f69940c1a..aefdcb3033 100644 --- a/docs/zh/flight_controller/thepeach_k1.md +++ b/docs/zh/flight_controller/thepeach_k1.md @@ -52,7 +52,7 @@ It is based on the **Pixhawk-project FMUv3** open hardware design and runs **PX4 | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| USART1 | UART | IO Processor Debug | +| USART1 | /dev/ttyS0 | IO Processor Debug | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | /dev/ttyS3 | GPS1 | diff --git a/docs/zh/flight_controller/thepeach_r1.md b/docs/zh/flight_controller/thepeach_r1.md index f4a4cb7281..39bbc2f635 100644 --- a/docs/zh/flight_controller/thepeach_r1.md +++ b/docs/zh/flight_controller/thepeach_r1.md @@ -56,7 +56,7 @@ It is based on the **Pixhawk-project FMUv3** open hardware design and runs **PX4 | UART | 设备 | Port | | ------ | ---------- | --------------------------------------------- | -| USART1 | UART | IO Processor Debug | +| USART1 | /dev/ttyS0 | IO Processor Debug | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (Raspberry pi cm3+) | | UART4 | /dev/ttyS3 | GPS1 | diff --git a/docs/zh/flight_controller/x-mav_ap-h743r1.md b/docs/zh/flight_controller/x-mav_ap-h743r1.md index d1e78267e7..5f140d9ac0 100644 --- a/docs/zh/flight_controller/x-mav_ap-h743r1.md +++ b/docs/zh/flight_controller/x-mav_ap-h743r1.md @@ -62,7 +62,7 @@ CRSF receiver must be wired to a spare port (UART) on the Flight Controller. The | UART | 设备 | Port | | ------ | ---------- | ------- | -| USART1 | UART | GPS | +| USART1 | /dev/ttyS0 | GPS | | USART2 | /dev/ttyS1 | GPS2 | | USART3 | /dev/ttyS2 | TELEM1 | | UART4 | /dev/ttyS3 | TELEM2 | diff --git a/docs/zh/hardware/serial_port_mapping.md b/docs/zh/hardware/serial_port_mapping.md index 3a3bdca5b9..78ec61b713 100644 --- a/docs/zh/hardware/serial_port_mapping.md +++ b/docs/zh/hardware/serial_port_mapping.md @@ -14,8 +14,8 @@ -本节将展示如何通过检查板载配置文件,获取在STMxxyyy架构上构建NuttX所需的映射信息。 -该说明使用FMUv5,但同样可扩展至其他FMU版本/NuttX开发板。 +本节将展示如何通过检查板载配置文件,获取在 STMxxyyy 架构上构建 NuttX 所需的映射信息。 +该说明使用 FMUv5,但同样可扩展至其他FMU版本/NuttX开发板。 ### @@ -49,7 +49,7 @@ CONFIG_BOARD_SERIAL_TEL4="/dev/ttyS3" ### nsh/defconfig _nsh/defconfig_ 允许您确定哪些端口被定义,它们是 UART 还是 USART,以及 USART/UART 与设备之间的映射关系。 -您还可以确定用于该功能的端口[serial/debug console](../debug/system_console.md)。 +您还可以确定用于该功能的端口[串口/调试控制台](../debug/system_console.md)。 打开板载的 defconfig 配置文件,例如:[/boards/px4/fmu-v5/nuttx-config/nsh/defconfig](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/nuttx-config/nsh/defconfig#L215-L221) @@ -69,7 +69,7 @@ CONFIG_STM32F7_USART6=y 这些条目会告知您哪些端口已被定义,以及它们属于UART还是USART。 复制上方段落,按“n”进行数字排序。 -同时递增设备编号ttySn(基于零的计数),以获取设备到串行端口的映射关系。 +同时递增设备编号 _ttyS**n**_(从零开始计数),以获取设备到串行端口的映射关系。 ``` ttyS0 CONFIG_STM32F7_USART1=y @@ -81,7 +81,7 @@ ttyS5 CONFIG_STM32F7_UART7=y ttyS6 CONFIG_STM32F7_UART8=y ``` -要获取调试控制台映射,我们需在[defconfig file](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/nuttx-config/nsh/defconfig#L212) 搜索 `SERIAL_CONSOLE`. +要获取调试控制台映射,我们需在[defconfig file](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/nuttx-config/nsh/defconfig#L212) 搜索 `SERIAL_CONSOLE`。 下面我们看到控制台位于UART7: ``` @@ -117,11 +117,11 @@ ttyS5 CONFIG_STM32F7_UART7=y DEBUG ttyS6 CONFIG_STM32F7_UART8=y PX4IO ``` -在 [flight controller docs]../flight_controller/pixhawk4.md#serial-port-mapping最终生成的表格如下: +在 [flight controller docs](../flight_controller/pixhawk4.md#serial-port-mapping) 最终生成的表格如下: | UART | 设备 | Port | | ------ | ---------- | ------------------------------ | -| UART | UART | GPS | +| UART | /dev/ttyS0 | GPS | | USART2 | /dev/ttyS1 | TELEM1 (流控) | | USART3 | /dev/ttyS2 | TELEM2 (流控) | | UART4 | /dev/ttyS3 | TELEM4 | diff --git a/docs/zh/index.md b/docs/zh/index.md index e079c7da61..b048cb8944 100644 --- a/docs/zh/index.md +++ b/docs/zh/index.md @@ -56,7 +56,7 @@ _PX4_ 是一款专业级飞控。 ### 我想添加一个有效载荷/相机 -[有效载荷](payloads/index.md部分描述了如何添加相机,以及如何配置 PX4 以实现交付包裹。 +[有效载荷](payloads/index.md)部分描述了如何添加相机,以及如何配置 PX4 以实现交付包裹。 ### 我正在修改一个支持的载具 @@ -76,7 +76,7 @@ _PX4_ 是一款专业级飞控。 ## 获取帮助 -[支持](contribute/support.md页解释了如何从核心开发团队和更广泛的社区获得帮助。 +[支持](contribute/support.md)页解释了如何从核心开发团队和更广泛的社区获得帮助。 除此以外,它还包括了: @@ -111,7 +111,7 @@ _PX4_ 是一款专业级飞控。 ## 许可证 -PX4 code is free to use and modify under the terms of the permissive [BSD 3-clause license](https://opensource.org/license/BSD-3-Clause). +PX4 代码可依据宽松的 [BSD 3-clause license](https://opensource.org/license/BSD-3-Clause) 免费使用和修改。 此文档已使用 [CC BY 4.0]授权。(https://creativecommons.org/licenses/by/4.0/)。 详情见: [Licences](contribute/licenses.md)。 @@ -137,11 +137,11 @@ _Dronecode 日历_ 展示了面向平台用户和开发者的重要社区活动 _placeholder_icon 由 Smashicons 通过 www.flaticon.com 创作,使用 CC 3.0 By 授权。 - _camera-automatic-mode_ icon made by Freepik from www.flaticon.com is licensed by CC 3.0 BY. + _camera-automatic-mode_ 图标由 Freepikwww.flaticon.com 是由 CC 3.0 By 授权的。 ## 治理 -The PX4 flight stack is hosted under the governance of the [Dronecode Project](https://dronecode.org/). +PX4 飞行控制架构由[Dronecode Project](https://dronecode.org/)负责管理。 Dronecode Logo Linux Foundation Logo diff --git a/docs/zh/middleware/uorb.md b/docs/zh/middleware/uorb.md index 2f190bb439..8307da5923 100644 --- a/docs/zh/middleware/uorb.md +++ b/docs/zh/middleware/uorb.md @@ -280,6 +280,8 @@ For more information see: [Plotting uORB Topic Data in Real Time using PlotJuggl ## 另见 +- [uORB Documentation Standard](../uorb/uorb_documentation.md) + - _PX4 uORB Explained_ Blog series - [Part 1](https://px4.io/px4-uorb-explained-part-1/) - [Part 2](https://px4.io/px4-uorb-explained-part-2/) diff --git a/docs/zh/peripherals/esc_motors.md b/docs/zh/peripherals/esc_motors.md index 059374dd8b..d91c16a9b1 100644 --- a/docs/zh/peripherals/esc_motors.md +++ b/docs/zh/peripherals/esc_motors.md @@ -3,80 +3,42 @@ Many PX4 drones use brushless motors that are driven by the flight controller via an Electronic Speed Controller (ESC). The ESC takes a signal from the flight controller and uses it to set control the level of power delivered to the motor. -PX4 supports a number of common protocols for sending the signals to ESCs: [PWM ESCs](../peripherals/pwm_escs_and_servo.md), [OneShot ESCs](../peripherals/oneshot.md), [DShot ESCs](../peripherals/dshot.md), [DroneCAN ESCs](../dronecan/escs.md), PCA9685 ESC (via I2C), and some UART ESCs (from Yuneec). +PX4 supports a number of [common protocols](../esc/esc_protocols.md) for sending the signals to ESCs: [PWM ESCs](../peripherals/pwm_escs_and_servo.md), [OneShot ESCs](../peripherals/oneshot.md), [DShot ESCs](../peripherals/dshot.md), [DroneCAN ESCs](../dronecan/escs.md), PCA9685 ESC (via I2C), and some UART ESCs (from Yuneec). + +## Supported ESC + +The following list is non-exhaustive. + +| ESC Device | Protocols | Firmwares | 备注 | +| ---------------------------- | ------------------------------------ | ------------------------ | ----------------------------------------------------- | +| [ARK 4IN1 ESC] | [Dshot], [PWM] | [AM32] | Has versions with/without connnectors | +| [Holybro Kotleta 20] | [DroneCAN], [PWM] | [PX4 Sapog ESC Firmware] | | +| [Vertiq Motor & ESC modules] | [Dshot], [OneShot], Multishot, [PWM] | Vertiq firmware | Larger modules support DroneCAN, ESC and Motor in one | +| [VESC ESCs] | [DroneCAN], [PWM] | VESC project firmware | | +| [Zubax Telega] | [DroneCAN], [PWM] | Telega-based | ESC and Motor in one | + + + +[ARK 4IN1 ESC]: ../esc/ark_4in1_esc.md +[AM32]: https://am32.ca/ +[PX4 Sapog ESC Firmware]: ../dronecan/sapog.md +[VESC ESCs]: ../peripherals/vesc.md +[DroneCAN]: ../dronecan/escs.md +[Dshot]: ../peripherals/dshot.md +[OneShot]: ../peripherals/oneshot.md +[PWM]: ../peripherals/pwm_escs_and_servo.md +[Holybro Kotleta 20]: ../dronecan/holybro_kotleta.md +[Vertiq Motor & ESC modules]: ../peripherals/vertiq.md +[Zubax Telega]: ../dronecan/zubax_telega.md + +## 另见 有关详细信息,请参阅︰ +- [ESC Protocols](../esc/esc_protocols.md) — overview of main ESC/Servo protocols supported by PX4 - [PWM ESCs and Servos](../peripherals/pwm_escs_and_servo.md) - [OneShot ESCs and Servos](../peripherals/oneshot.md) - [DShot](../peripherals/dshot.md) - [DroneCAN ESCs](../dronecan/escs.md) - [ESC Calibration](../advanced_config/esc_calibration.md) - [ESC Firmware and Protocols Overview](https://oscarliang.com/esc-firmware-protocols/) (oscarliang.com) - -A high level overview of the main ESC/Servo protocols supported by PX4 is given below. - -## ESC Protocols - -### PWM - -[PWM ESCs](../peripherals/pwm_escs_and_servo.md) are commonly used for fixed-wing vehicles and ground vehicles (vehicles that require a lower latency like multicopters typically use oneshot or dshot ESCs). - -PWM ESCs communicate using a periodic pulse, where the _width_ of the pulse indicates the desired power level. -The pulse wdith typically ranges between 1000uS for zero power and 2000uS for full power. -The periodic frame rate of the signal depends on the capability of the ESC, and commonly ranges between 50Hz and 490 Hz (the theoretical maximum being 500Hz for a very small "off" cycle). -A higher rate is better for ESCs, in particular where a rapid response to setpoint changes is needed. -For PWM servos 50Hz is usually sufficient, and many don't support higher rates. - -![duty cycle for PWM](../../assets/peripherals/esc_pwm_duty_cycle.png) - -In addition to being a relatively slow protocol PWM ESCs require [calibration](../advanced_config/esc_calibration.md) because the range values representing low and high values can vary significantly. -Unlike [dshot](#dshot) and [DroneCAN ESC](#dronecan) they do not have the ability to provide telemetry and feedback on ESC (or servo) state. - -Setup: - -- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) -- [PX4 Configuration](../peripherals/pwm_escs_and_servo.md#px4-configuration) -- [ESC Calibration](../advanced_config/esc_calibration.md) - -### Oneshot 125 - -[OneShot 125 ESCs](../peripherals/oneshot.md) are usually much faster than PWM ESCs, and hence more responsive and easier to tune. -They are preferred over PWM for multicopters (but not as much as [DShot ESCs](#dshot), which do not require calibration, and may provide telemetry feedback). -There are a number of variants of the OneShot protocol, which support different rates. -PX4 only supports OneShot 125. - -OneShot 125 is the same as PWM but uses pulse widths that are 8 times shorter (from 125us to 250us for zero to full power). -This allows OneShot 125 ESCs to have a much shorter duty cycle/higher rate. -For PWM the theoretical maximum is close to 500 Hz while for OneShot it approaches 4 kHz. -The actual supported rate depends on the ESC used. - -Setup: - -- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs) -- [PX4 Configuration](../peripherals/oneshot.md#px4-configuration) -- [ESC Calibration](../advanced_config/esc_calibration.md) - -### DShot - -[DShot](../peripherals/dshot.md) is a digital ESC protocol that is highly recommended for vehicles that can benefit from reduce latency, in particular racing multicopters, VTOL vehicles, and so on. - -It has reduced latency and is more robust than both [PWM](#pwm) and [OneShot](#oneshot-125). -In addition it does not require ESC calibration, telemetry is available from some ESCs, and you can revers motor spin directions - -PX4 configuration is done in the [Actuator Configuration](../config/actuators.md). -Selecting a higher rate DShot ESC in the UI result in lower latency, but lower rates are more robust (and hence more suitable for large aircraft with longer leads); some ESCs only support lower rates (see datasheets for information). - -Setup: - -- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs) -- [DShot](../peripherals/dshot.md) also contains information about how to send commands etc. - -### DroneCAN - -[DroneCAN ESCs](../dronecan/escs.md) are recommended when DroneCAN is the primary bus used for your vehicle. -The PX4 implementation is currently limited to update rates of 200Hz. - -DroneCAN shares many similar benefits to [Dshot](#dshot) including high data rates, robust connection over long leads, telemetry feedback, no need for calibration of the ESC itself. - -[DroneCAN ESCs](../dronecan/escs.md) are connected via the DroneCAN bus (setup and configuration are covered at that link). diff --git a/docs/zh/uorb/uorb_documentation.md b/docs/zh/uorb/uorb_documentation.md new file mode 100644 index 0000000000..300c195449 --- /dev/null +++ b/docs/zh/uorb/uorb_documentation.md @@ -0,0 +1,170 @@ +# uORB Documentation Standard + +This topic demonstrates and explains how to document uORB messages. + +:::info +At time of writing many topics have not been updated. +::: + +## 综述 + +The [AirspeedValidated](../msg_docs/AirspeedValidated.md) message shown below is a good example of a uORB topic that has been documented to the current standard. + +```py +# 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 # [us] Time since system start + +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 # [@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 + +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 +``` + +The main things to note are: + +- Documentation is added using formatted uORB comments. + Any text on a line after the `#` character is a comment, except for lines that start with the text `# TOPIC` (which indicates a multi-topic message). +- The message starts with a comment block consisting of short description (mandatory), followed by a longer description and then a space. +- Field and constants almost all have comments. + The comments are added on the same line as the field/constant, separated by one space. +- Fields: + - Comments are all on the same line as the field (extra lines become internal comments). + - Comments start with metadata, such as the units (`[m/s]`, `[rad/s]`) or allowed values (`[@enum SOURCE]`), and can also list invalid values (`[@invalid NaN]`) and allowed ranges (`[@range min, max]`). + - Units are required except for boolean fields or for fields with an enum value. + `[-]` is used to indicate unitless fields. + - Comments follow the metadata after a space. + The line should not be terminated in a full stop. +- Constants: + - Don't have metadata: the description follows the comment marker after one space. + - Some constants, such as `MESSAGE_VERSION`, don't need documentation because they are standardized. + - Constants with the same name prefix are grouped together as enums after the associated field. + +The following sections expand on the allowed formats. + +## Message Description + +Every message should start with a comment block that describes the message: + +```py +# Short description (mandatory) +# +# Longer description for the message if needed. +# Can be multiline, and should have punctuation. +# Should be followed by an empty line. +``` + +This consists of a mandatory short description, optionally followed by an empty comment line, and then a longer description. + +Short description (mandatory): + +- A succinct explanation for the purpose of the message. +- Usually just one line without a terminating full stop. +- Minimally it may just mirror the message name. +- For example, [`AirspeedValidated`](../msg_docs/AirspeedValidated.md) above has the short description `Validated airspeed`. + +Long description (Optional): + +- Additional context required to understand how the message is used. +- In particular this should be anything that can't be inferred from the name, fields or constants, such as the publishers and expected consumers. + It might also cover whether the message is only used for a particular frame type or mode. +- The message is often multiline and contains punctuation. +- May include comment lines that are empty, in order to indicate paragraphs. + +Both short and long descriptions may be multi-line. +Single line descriptions should not include a terminating full stop, but multiline comments should do so. + +The message description block ends at the first non-comment line, which should be an empty line, but might be a field or constant. +Any subsequent comment lines are considered "internal comments". + +### Fields + +A typical field comment looks like this: + +```py +float32 indicated_airspeed_m_s # [m/s] [@invalid NaN] Indicated airspeed (IAS) +``` + +Field comments must all be on the same line as the field, and consist of optional metadata followed by a description: + +- `metadata` (Optional) + - Information about the field units and allowed values: + - `[]` + - The unit of measurement inside square brackets (note, no `@` delineator indicates a unit), such as `[m]` for metres. + - Allowed units include: `m`, `m/s`, `m/s^2`, `rad`, `rad/s`, `rpm`, `V`, `A`, `mA`, `mAh`, `W`, `dBm`, `s`, `ms`, `us`, `Ohm`, `MB`, `Kb/s`, `degC`, `Pa`. + - Units are required unless clearly invalid, such as when the field is a boolean, or is an enum value. + - Unitless values should be specified as `[-]`. + Note though that units are not required for boolean fields or enum fields. + - `[@enum ]` + - The `enum_name` gives the prefix of constant values in the message that can be assigned to the field. + Note that enums in uORB are just a naming convention: they are not explicitly declared. + Multiple enum names allowed for a field indicates a possible error in the field design. + - `[@range , ]` + - The allowed range of the field, specified as a `lower_value` and/or an `upper_value`. + Either value can be omitted to indicate an unbounded upper or lower value. + For example `[@range 0, 3]`, `[@range 5.3, ]`, `[@range , 3]`. + - `[@invalid ]` + - The `value` to set the field to indicate that the field doesn't contain valid data, such as `[@invalid NaN]`. + The `description` is optional, and might be used to indicate the conditions under which data is invalid. + - `[@frame ]` + - The `frame` in which the field is set, such as `[@frame NED]` or `[@frame Body]`. +- `description` + - A concise description of the purpose of the field, and including any important information that can't be inferred from the name! + Use a capital first letter, and omit the full stop if the description is a single sentence. + Multiple sentences may also omit the final full stop. + +### Constants + +Constants follow the documentation conventions as fields except they only have a description (no metadata). +Documentation for a constant might look like this: + +```py +int8 SOURCE_GROUND_MINUS_WIND = 0 # Ground speed minus wind +``` + +Constants are often grouped together following a field as enum values. +Note below how the prefix `SOURCE` for the values is specified as an enum against the _field_. + +```py +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 +... +``` + +A small number of constants have a standardised meaning and do not require documentation. +These are: + +- `ORB_QUEUE_LENGTH` +- `MESSAGE_VERSION` + +### `# TOPICS` + +The prefix `# TOPICS` is used to indicate topic names for multi-topic messages. +For example, the [VehicleGlobalPosition.msg](../msg_docs/VehicleGlobalPosition.md) message definition is used to define the topic ids as shown: + +```text +# TOPICS vehicle_global_position vehicle_global_position_groundtruth external_ins_global_position +# TOPICS estimator_global_position +# TOPICS aux_global_position +``` + +At time of writing there is no format for documenting these.