From c4b8f107ae97d643fc784a394e3874f34caec563 Mon Sep 17 00:00:00 2001 From: PX4 Build Bot Date: Sun, 15 Nov 2026 11:31:22 +1100 Subject: [PATCH] docs(i18n): PX4 guide translations (Crowdin) - zh-CN (#29802) Co-authored-by: Crowdin Bot --- docs/zh/SUMMARY.md | 5 +- docs/zh/advanced_config/ethernet_setup.md | 37 +- docs/zh/can/index.md | 2 +- docs/zh/concept/navigation_terminology.md | 198 +++++++ .../navigation_terminology_advanced.md | 539 ++++++++++++++++++ docs/zh/config/safety.md | 5 + docs/zh/config_rover/attitude_tuning.md | 2 +- docs/zh/config_rover/basic_setup.md | 18 +- docs/zh/config_rover/position_tuning.md | 2 +- docs/zh/config_rover/rate_tuning.md | 8 +- docs/zh/config_rover/velocity_tuning.md | 4 +- docs/zh/contribute/notation.md | 2 + docs/zh/debug/failure_injection.md | 42 +- .../autopilot_manufacturer_supported.md | 1 + .../flight_controller/avianautomata_305ap.md | 300 ++++++++++ docs/zh/flight_modes/offboard.md | 35 +- docs/zh/flight_modes_fw/mission.md | 2 + docs/zh/flight_modes_mc/mission.md | 2 + docs/zh/flight_modes_rover/api.md | 6 +- docs/zh/flight_modes_rover/manual.md | 80 ++- docs/zh/middleware/dds_topics.md | 4 +- docs/zh/modules/modules_autotune.md | 5 + docs/zh/modules/modules_command.md | 5 + docs/zh/modules/modules_communication.md | 5 + docs/zh/modules/modules_controller.md | 5 + docs/zh/modules/modules_driver.md | 11 +- docs/zh/modules/modules_driver_adc.md | 5 + .../modules/modules_driver_airspeed_sensor.md | 5 + docs/zh/modules/modules_driver_baro.md | 5 + docs/zh/modules/modules_driver_camera.md | 5 + .../modules/modules_driver_distance_sensor.md | 5 + docs/zh/modules/modules_driver_imu.md | 33 ++ docs/zh/modules/modules_driver_ins.md | 5 + .../zh/modules/modules_driver_magnetometer.md | 5 + .../zh/modules/modules_driver_optical_flow.md | 5 + .../modules/modules_driver_radio_control.md | 5 + docs/zh/modules/modules_driver_rpm_sensor.md | 5 + docs/zh/modules/modules_driver_transponder.md | 5 + docs/zh/modules/modules_estimator.md | 5 + docs/zh/modules/modules_simulation.md | 33 ++ docs/zh/modules/modules_system.md | 5 + docs/zh/modules/modules_template.md | 5 + docs/zh/msg_docs/SetpointConfig.md | 44 +- .../msg_docs/SurfaceVehicleCourseSetpoint.md | 28 +- .../SurfaceVehiclePositionSetpoint.md | 30 +- .../msg_docs/SurfaceVehicleSpeedSetpoint.md | 30 +- docs/zh/msg_docs/SurfaceVehicleSpeedStatus.md | 42 +- .../msg_docs/SurfaceVehicleThrustSetpoint.md | 48 ++ docs/zh/msg_docs/WheelEncoders.md | 57 +- docs/zh/msg_docs/index.md | 4 +- docs/zh/peripherals/mavlink_peripherals.md | 1 + docs/zh/releases/main.md | 20 +- docs/zh/ros2/px4_ros2_control_interface.md | 33 +- docs/zh/sensor/optical_flow.md | 19 + docs/zh/sim_pterosim/index.md | 5 +- docs/zh/sim_sih/index.md | 96 +++- .../community_supported_simulators.md | 2 +- 57 files changed, 1703 insertions(+), 217 deletions(-) create mode 100644 docs/zh/concept/navigation_terminology.md create mode 100644 docs/zh/concept/navigation_terminology_advanced.md create mode 100644 docs/zh/flight_controller/avianautomata_305ap.md create mode 100644 docs/zh/msg_docs/SurfaceVehicleThrustSetpoint.md diff --git a/docs/zh/SUMMARY.md b/docs/zh/SUMMARY.md index ded17809ee6..cc28b10f690 100644 --- a/docs/zh/SUMMARY.md +++ b/docs/zh/SUMMARY.md @@ -178,6 +178,7 @@ - [ARK Electronics ARKV6S](flight_controller/ark_v6s.md) - [ARK FPV Flight Controller](flight_controller/ark_fpv.md) - [ARK Pi6X Flow Flight Controller](flight_controller/ark_pi6x.md) + - [Avian Automata 305AP](flight_controller/avianautomata_305ap.md) - [CBUnmanned H753-SOM](flight_controller/cbunmanned_h753-som.md) - [CORVON 743v1](flight_controller/corvon_743v1.md) - [CORVON 743v2](flight_controller/corvon_743v2.md) @@ -513,6 +514,8 @@ - [控制器框图](flight_stack/controller_diagrams.md) - [参数&配置](advanced/parameters_and_configurations.md) - [事件接口](concept/events_interface.md) + - [Navigation Terminology](concept/navigation_terminology.md) + - [Navigation Terminology (Advanced)](concept/navigation_terminology_advanced.md) - [Flight Modes](concept/flight_modes.md) - [飞行任务](concept/flight_tasks.md) - [Control Allocation](concept/control_allocation.md) @@ -784,7 +787,6 @@ - [RateCtrlStatus](msg_docs/RateCtrlStatus.md) - [RcChannels](msg_docs/RcChannels.md) - [RcParameterMap](msg_docs/RcParameterMap.md) - - [RoverThrottleSetpoint](msg_docs/RoverThrottleSetpoint.md) - [Rpm](msg_docs/Rpm.md) - [RtcmData](msg_docs/RtcmData.md) - [RtlStatus](msg_docs/RtlStatus.md) @@ -823,6 +825,7 @@ - [SurfaceVehicleSpeedSetpoint](msg_docs/SurfaceVehicleSpeedSetpoint.md) - [SurfaceVehicleSpeedStatus](msg_docs/SurfaceVehicleSpeedStatus.md) - [SurfaceVehicleSteeringSetpoint](msg_docs/SurfaceVehicleSteeringSetpoint.md) + - [SurfaceVehicleThrustSetpoint](msg_docs/SurfaceVehicleThrustSetpoint.md) - [SystemPower](msg_docs/SystemPower.md) - [TakeoffStatus](msg_docs/TakeoffStatus.md) - [TargetGnss](msg_docs/TargetGnss.md) diff --git a/docs/zh/advanced_config/ethernet_setup.md b/docs/zh/advanced_config/ethernet_setup.md index 4d73e1454e6..db6215baac3 100644 --- a/docs/zh/advanced_config/ethernet_setup.md +++ b/docs/zh/advanced_config/ethernet_setup.md @@ -165,15 +165,16 @@ You must separately configure the PX4 IP address and other _network settings_ ([ PX4配置串行端口以通过MAVLink连接到地面站,使用下面的参数: -| Parameter | 值 | 描述 | -| --------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------ | -| [MAV_2_CONFIG](../advanced_config/parameter_reference.md#MAV_2_CONFIG) | 1000 | 配置以太网端口 | -| [MAV_2_BROADCAST](../advanced_config/parameter_reference.md#MAV_2_BROADCAST) | 1 | Broadcast `HEARTBEAT` messages | -| [MAV_2_MODE](../advanced_config/parameter_reference.md#MAV_2_MODE) | 0 | 发送“正常”的 MAVLink 消息集合(即地面站消息集合) | -| [MAV_2_RADIO_CTL](../advanced_config/parameter_reference.md#MAV_2_RADIO_CTL) | 0 | 禁用MAVLink流量控制 | -| [MAV_2_RATE](../advanced_config/parameter_reference.md#MAV_2_RATE) | 100000 | 最大发送速率 | -| [MAV_2_REMOTE_PRT](../advanced_config/parameter_reference.md#MAV_2_REMOTE_PRT) | 14550 | MAVLink远程端口14550(地面站) | -| [MAV_2_UDP_PRT](../advanced_config/parameter_reference.md#MAV_2_UDP_PRT) | 14550 | MAVLink网络端口14550(地面站) | +| Parameter | 值 | 描述 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------- | +| [MAV_2_CONFIG](../advanced_config/parameter_reference.md#MAV_2_CONFIG) | 1000 | 配置以太网端口 | +| [MAV_2_BROADCAST](../advanced_config/parameter_reference.md#MAV_2_BROADCAST) | 1 | Broadcast `HEARTBEAT` messages | +| [MAV_2_MODE](../advanced_config/parameter_reference.md#MAV_2_MODE) | 0 | 发送“正常”的 MAVLink 消息集合(即地面站消息集合) | +| [MAV_2_RADIO_CTL](../advanced_config/parameter_reference.md#MAV_2_RADIO_CTL) | 0 | 禁用MAVLink流量控制 | +| [MAV_2_RATE](../advanced_config/parameter_reference.md#MAV_2_RATE) | 100000 | 最大发送速率 | +| [MAV_2_REMOTE_IP](../advanced_config/parameter_reference.md#MAV_2_REMOTE_IP)
| 0 | Auto-discover the partner address from incoming packets (see [MAVLink Partner Address](#partner_address)) | +| [MAV_2_REMOTE_PRT](../advanced_config/parameter_reference.md#MAV_2_REMOTE_PRT) | 14550 | MAVLink远程端口14550(地面站) | +| [MAV_2_UDP_PRT](../advanced_config/parameter_reference.md#MAV_2_UDP_PRT) | 14550 | MAVLink网络端口14550(地面站) | Normally a companion computer would use port `14540` (rather than `14550`) and stream the set of MAVLink messages specified in the `Onboard` profile. You can configure this setup by changing [MAV_2_REMOTE_PRT](../advanced_config/parameter_reference.md#MAV_2_REMOTE_PRT) and [MAV_2_UDP_PRT](../advanced_config/parameter_reference.md#MAV_2_UDP_PRT) to `14540` and [MAV_2_MODE](../advanced_config/parameter_reference.md#MAV_2_MODE) to `2` (Onboard). @@ -181,6 +182,24 @@ You can configure this setup by changing [MAV_2_REMOTE_PRT](../advanced_config/p For more information on MAVLink serial port configuration see [MAVLink Peripherals (GCS/OSD/Companion)](../peripherals/mavlink_peripherals.md) +### MAVLink Partner Address {#partner_address} + +By default, PX4 learns its MAVLink partner's address and port from the first UDP packet it receives on [MAV_2_UDP_PRT](../advanced_config/parameter_reference.md#MAV_2_UDP_PRT), and sends replies there. +Until then, it broadcasts its MAVLink stream on the local network if [MAV_2_BROADCAST](../advanced_config/parameter_reference.md#MAV_2_BROADCAST) is `1` and [MAV_2_MODE](../advanced_config/parameter_reference.md#MAV_2_MODE) isn't `2` (Onboard). +This is why the GCS initiates the connection in the [QGroundControl example](#qgroundcontrol-setup-example). + +If PX4 needs to initiate the connection to a partner with a known, fixed address, such as a companion computer that never sends the first packet, set [MAV_2_REMOTE_IP](../advanced_config/parameter_reference.md#MAV_2_REMOTE_IP) to the partner's address. +The value is a 32-bit integer with the first octet in the most significant byte: for example, `192.168.1.2` is `-1062731518`. +PX4 then sends to that address at port [MAV_2_REMOTE_PRT](../advanced_config/parameter_reference.md#MAV_2_REMOTE_PRT), and auto-discovery is disabled. +Set it back to `0` (the default) to restore auto-discovery. +Changes take effect after a reboot. + +:::tip +The [startup script](../concept/system_startup.md) passes a non-zero value of this parameter to the `mavlink start` command's `-t` option (`-t p:MAV_2_REMOTE_IP`). +If you start a MAVLink instance manually from the [console](../debug/consoles.md), `-t` accepts either a literal address (`-t 192.168.1.2`) or a reference to the parameter (`-t p:MAV_2_REMOTE_IP`). +See the [mavlink module reference](../modules/modules_communication.md#mavlink_usage) for the full command usage. +::: + ## QGroundControl 设置示例 Assuming you have already [Set up the Ethernet Network](#setting-up-the-ethernet-network) so your ground station computer and PX4 run on the same network, and diff --git a/docs/zh/can/index.md b/docs/zh/can/index.md index f91c0396682..731e39a52cc 100644 --- a/docs/zh/can/index.md +++ b/docs/zh/can/index.md @@ -24,7 +24,7 @@ PX4 支持与 CAN 设备通信的两个软件协议: DroneCAN 和 Cyphal 都是早先一个叫做UAVCAN的项目。在2022年,该项目分为两个部分:原始版本的 UAVCAN (UAVCAN v0) 更名为 DroneCAN,较新的 UAVCAN v1 更名为 Cyphal。这两项协议之间的差异在[Cyphal vs. DroneCAN](https://forum.opencyphal.org/t/cyphal-vs-dronecan/1814)中作了概述。 ::: -PX4不支持KDECAN等无人驾驶飞机的其他CAN软件协议(撰写时)。 +PX4不支持 KDECAN 等无人驾驶飞机的其他CAN软件协议(撰写时)。 ## 布线 diff --git a/docs/zh/concept/navigation_terminology.md b/docs/zh/concept/navigation_terminology.md new file mode 100644 index 00000000000..1511432ba2a --- /dev/null +++ b/docs/zh/concept/navigation_terminology.md @@ -0,0 +1,198 @@ +# Navigation Terminology + +This page explains the navigation terms you meet when operating PX4, reading logs or tuning, such as _heading_, _course_, _track_, _bearing_, _cross-track error_ and _drift angle_. + +PX4 uses the official definitions of these terms from aviation and marine navigation, with one deliberate exception: [Course](#course). + +For the official definitions quoted with their sources, how conflicting definitions are resolved, ground vehicle terms, and where PX4 represents things differently, see [Navigation Terminology (Advanced)](../concept/navigation_terminology_advanced.md). + +## 概要 + +**Heading** is the direction the vehicle _points_, **course setpoint** is the direction it _should move_ over the ground, **course** is the direction it _actually moves_, and **bearing** is the direction _to_ something, such as the current waypoint. +Similarly, **desired track** and **track** are the paths the vehicle _should follow_ and _actually follows_. + +| Term | Official meaning | Example in PX4 | +| ----------------------------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Heading](#heading) | Direction in which the body x-axis of the vehicle points. | [`vehicle_local_position.heading`](../msg_docs/VehicleLocalPosition.md#fld_heading) | +| [Course](#course) | Actual direction of motion over the ground. | [`sensor_gnss.course`](../msg_docs/SensorGnss.md#fld_course) | +| [Course setpoint](#course-setpoint) | Intended direction of motion over the ground. | [`fixed_wing_lateral_setpoint.course`](../msg_docs/FixedWingLateralSetpoint.md#fld_course) | +| [Track](#track-and-desired-track) | Actual path of the vehicle over the ground. | Path plotted from a [log](../log/flight_log_analysis.md) | +| [Desired track](#track-and-desired-track) | Intended path over the ground, such as between two waypoints. | Line from [previous](../msg_docs/PositionSetpointTriplet.md#fld_previous) to [current](../msg_docs/PositionSetpointTriplet.md#fld_current) waypoint | +| [Bearing](#bearing) | Direction from one point to another. | [`pure_pursuit_status.bearing_to_waypoint`](../msg_docs/PurePursuitStatus.md#fld_bearing_to_waypoint) | +| [Cross-track error](#cross-track-error) | Perpendicular distance from the desired track, and side. | [`pure_pursuit_status.crosstrack_error`](../msg_docs/PurePursuitStatus.md#fld_crosstrack_error) | +| [Drift angle](#drift-angle) | Angle between heading and track. | — | + +Heading, course setpoint, course and bearing can all differ: in wind the vehicle points away from where it moves, and off the desired track it should move back towards the track, not straight at the waypoint. +The diagram below shows each term. + +Navigation terms seen from above: north arrow, desired track from the previous to the current waypoint, vehicle heading, course, course setpoint pointing back towards the desired track, bearing to the current waypoint, cross-track error from the desired track, wind, and an illustrative future track that rejoins the desired track + +_Overview figure: vehicle seen from above._ + +## Directions and Frames + +All directions on this page are measured clockwise from true north: north is 0°, east is 90°, south is 180° and west is 270°. +_QGroundControl_ shows them in degrees from 0° to 360°, and MAVLink navigation fields usually in centidegrees (for example `GLOBAL_POSITION_INT.hdg`, 0 to 35999). +Internally, PX4 uses radians, usually from $-\pi$ to $\pi$ (west is $-\pi/2$), which matters when you read logs. + +PX4 uses four main frames (see [Frames and Reference Directions](../concept/navigation_terminology_advanced.md#frames-and-reference-directions) for details): + +- **Global (WGS 84):** Latitude, longitude and altitude, for example in `vehicle_global_position`. +- **Local tangent-plane (NED):** North, east, down from a fixed origin where the [estimator](../advanced_config/tuning_the_ecl_ekf.md) started; the positions in `vehicle_local_position`. +- **Local navigation (NED):** North, east, down at the vehicle; velocities and attitude are relative to it. +- **Body (FRD):** Forward, right, down, fixed to the vehicle; the [heading](#heading) is the direction of its forward axis. + +A compass measures magnetic north, which differs from true north by the _magnetic declination_. +The estimator corrects for this automatically, using the World Magnetic Model or [EKF2_MAG_DECL](../advanced_config/parameter_reference.md#EKF2_MAG_DECL) depending on [EKF2_DECL_TYPE](../advanced_config/parameter_reference.md#EKF2_DECL_TYPE). + +## Terms + +### Heading + +The heading is where the x-axis (nose, bow or front) of the vehicle points. +It says nothing about the direction in which the vehicle _moves_: a multicopter can fly sideways, a plane angles into a crosswind, and a boat is pushed off by wind and current. + +PX4 uses _heading_ and _yaw_ (the yaw angle of the vehicle attitude) as synonyms: `vehicle_local_position.heading` is the Euler yaw angle, and heading setpoints are named `yaw`. +The yaw angle is the direction of the body x-axis projected onto the horizontal plane, so the two only differ when the x-axis points (nearly) straight up or down, where the heading is undefined. +Note that _yaw_ also names the rotation about the vertical axis (yaw rate, yaw moment), which is not a direction. + +Heading: angle from north to the body x-axis + +PX4 represents the heading using: + +- [`vehicle_local_position.heading`](../msg_docs/VehicleLocalPosition.md) (estimate). +- [`trajectory_setpoint.yaw`](../msg_docs/TrajectorySetpoint.md) and [`surface_vehicle_attitude_setpoint.yaw_setpoint`](../msg_docs/SurfaceVehicleAttitudeSetpoint.md) (setpoints). +- MAVLink [`GLOBAL_POSITION_INT.hdg`](https://mavlink.io/en/messages/common.html#GLOBAL_POSITION_INT) and [`VFR_HUD.heading`](https://mavlink.io/en/messages/common.html#VFR_HUD). + +### Course + +The course is the direction the vehicle _actually_ moves over the ground: the direction of its ground velocity. +It is also called _course over ground_ (COG) in marine navigation, and it is what a GNSS receiver reports as "course" and what avionics show as _TRK_ (track). +It is undefined when the vehicle is stationary, and noisy at low speed. +For a rover that drives without wheel slip, the course equals the heading when driving forwards, and the heading plus 180° when reversing. + +Course: angle from north to the ground velocity, tangent to the track + +PX4 represents the course using: + +- [`sensor_gnss.course`](../msg_docs/SensorGnss.md) ("Course over ground, not heading"). +- MAVLink [`GPS_RAW_INT.cog`](https://mavlink.io/en/messages/common.html#GPS_RAW_INT). + +### Course Setpoint + +The course setpoint is the direction the vehicle _should_ move over the ground. +PX4's path-following guidance calculates it from the [desired track](#track-and-desired-track): on the track it points along it, and off the track it points back towards it, so that the vehicle rejoins the track ahead. +The actual [course](#course) almost always differs from the course setpoint, often substantially. + +Course setpoint: angle from north to the commanded direction of motion, pointing back towards the desired track, with an illustrative future track that rejoins it + +PX4 represents the course setpoint using: + +- [`position_setpoint.course`](../msg_docs/PositionSetpoint.md#fld_course) (course to hold, set by the navigator). +- [`fixed_wing_lateral_setpoint.course`](../msg_docs/FixedWingLateralSetpoint.md#fld_course) (course commanded by the fixed-wing guidance). + +:::warning PX4 differs from aviation and marine navigation +In aviation and marine navigation, bare _course_ means the _intended_ direction, and the actual direction is the _course over ground_ or _track angle_. +PX4 instead uses _course_ for the measured or estimated direction and _course setpoint_ for the intended one, like _heading_ and _heading setpoint_. +Keep this in mind when you read aviation or marine sources, for example the FAA [wind correction angle](../concept/navigation_terminology_advanced.md#terms-not-yet-used-in-px4), which applies to the course setpoint in PX4 terms. +See [Course Is the Actual Direction](../concept/navigation_terminology_advanced.md#course-is-the-actual-direction) for the reasoning. +::: + +### Track and Desired Track + +- **Track:** The actual path the vehicle traced over the ground, such as the path plotted from a log. + Its direction at any point is the [course](#course). +- **Desired track:** The intended path over the ground, which the vehicle tries to follow. + This is usually the line between two waypoints, but it can also be a line along a course setpoint the vehicle holds. + +:::info +In marine navigation, bare "track" means the _intended_ path. +To avoid confusion, PX4 always writes _desired track_ for the intended path. +::: + +### Bearing + +A bearing is the direction from one point to another, for example from the vehicle to the current waypoint. +It depends only on the two positions, not on where the vehicle points or moves. + +PX4 represents the bearing using: + +- [`pure_pursuit_status.bearing_to_waypoint`](../msg_docs/PurePursuitStatus.md). + +### Cross-Track Error + +The cross-track error (XTE) is how far the vehicle is off the [desired track](#track-and-desired-track), measured perpendicular to it, and on which side. + +In PX4, the cross-track error is positive when the vehicle is to the right of the desired track, and negative when it is to the left, looking in the direction of travel. + +PX4 represents the cross-track error using: + +- [`pure_pursuit_status.crosstrack_error`](../msg_docs/PurePursuitStatus.md) (rovers). +- [`fixed_wing_lateral_guidance_status.signed_track_error`](../msg_docs/FixedWingLateralGuidanceStatus.md) (fixed-wing). + +Cross-track error: positive to the right of the desired track, negative to the left + +### Drift Angle + +The drift angle is the difference between where the vehicle points ([heading](#heading)) and where it moves ([course](#course)). +Wind causes it for aircraft, wind and current for boats, and wheel slip for rovers. +Multicopters and [mecanum rovers](../frames_rover/index.md#mecanum) can also move sideways on purpose. + +Rover and vehicle dynamics material calls this angle the _vehicle sideslip angle_, while for aircraft the _sideslip angle_ is measured against the airflow, not the ground. +In marine navigation, bare _drift_ is the speed of the current, which is why PX4 always writes _drift angle_. + +Drift angle: angle between heading and course + +### Airspeed and Ground Speed + +Ground speed (called _speed over ground_, SOG, in marine navigation) is the speed over the ground, in the direction of the course. +Airspeed is the speed through the air (see [Airspeed in PX4](../config_fw/airspeed_scale_handling.md#airspeed-in-px4) for indicated, calibrated and true airspeed). +The two differ by the wind. + +### Wind Direction + +Weather reports, aviation and marine navigation give the wind direction as the direction it blows from: a wind "from 90°" blows from the east towards the west. + +PX4 does not use this convention. +PX4 wind estimates and the wind fields it sends over MAVLink are velocity vectors of the air relative to the ground, which point where the air moves to. +A wind from the north therefore has a negative `windspeed_north` in PX4. + +PX4 represents the wind using: + +- [`wind.windspeed_north`](../msg_docs/Wind.md) and `wind.windspeed_east` (estimate, NED). +- MAVLink [`WIND_COV.wind_x`](https://mavlink.io/en/messages/common.html#WIND_COV) and `WIND_COV.wind_y` (same sign convention as `wind`). + +## Wind Triangle + +Heading and course differ because the vehicle moves through air (or water) that itself moves over the ground: + +$$ +\mathbf{v}_{ground} = \mathbf{v}_{air} + \mathbf{v}_{wind} +$$ + +- The direction of $\mathbf{v}_{ground}$ is the **course**, and its magnitude is the **ground speed**. +- For a fixed-wing aircraft, $\mathbf{v}_{air}$ points along the **heading**, and its magnitude is the **airspeed**. +- The angle between the heading and $\mathbf{v}_{ground}$ is the **drift angle**. + +Wind triangle: air velocity along the heading plus wind velocity gives the ground velocity along the course + +## Names That Don't Mean What They Say + +Some names you see when tuning, flying or reading logs predate this terminology and don't match it: + +- "Bearing" in [Rover Velocity Tuning](../config_rover/velocity_tuning.md) and [Rover Position Tuning](../config_rover/position_tuning.md) means the [course setpoint](#course-setpoint). +- MAVLink [`NAV_CONTROLLER_OUTPUT.nav_bearing`](https://mavlink.io/en/messages/common.html#NAV_CONTROLLER_OUTPUT) and `NAV_CONTROLLER_OUTPUT.xtrack_error` are always 0 in current PX4. +- The ADS-B traffic "heading" ([`transponder_report.heading`](../msg_docs/TransponderReport.md), MAVLink [`ADSB_VEHICLE.heading`](https://mavlink.io/en/messages/common.html#ADSB_VEHICLE)) is the other aircraft's [course](#course). + +The code-level names that deviate are listed in [Field Names That Deviate](../concept/navigation_terminology_advanced.md#field-names-that-deviate). + +## 更多信息 + +[Navigation Terminology (Advanced)](../concept/navigation_terminology_advanced.md) covers: + +- The official definitions of each term, quoted from the aviation, marine and ground vehicle sources, and the rule PX4 uses when they disagree. +- The reference frames in detail (ECEF/WGS 84, local tangent-plane and local navigation NED, FRD, along-track/cross-track), north references and z-up conventions such as ROS and ISO 8855. +- Why PX4 uses _course_ for the actual direction, unlike aviation and marine navigation. +- Ground vehicle terms (yaw, course and sideslip angle), and why _sideslip_ means different things for planes and rovers. +- Where PX4 represents things differently from the official definitions, and existing field names that deviate. +- Guidelines for contributors, and terms PX4 does not use yet. diff --git a/docs/zh/concept/navigation_terminology_advanced.md b/docs/zh/concept/navigation_terminology_advanced.md new file mode 100644 index 00000000000..27a4c2004ce --- /dev/null +++ b/docs/zh/concept/navigation_terminology_advanced.md @@ -0,0 +1,539 @@ +# Navigation Terminology (Advanced) + +This page is the developer reference behind [Navigation Terminology](../concept/navigation_terminology.md). +It is aimed at contributors who add or change uORB fields, parameters, MAVLink handling, log analysis tools or documentation. + +PX4 flies aircraft, drives rovers, and can drive boats, so its code and documentation use the vocabulary of aviation, marine navigation and ground vehicle dynamics. +These traditions use the same words (_heading_, _course_, _track_, _bearing_, _drift_, _sideslip_), and they do not always mean the same thing. + +This page collects the official definitions, the reference frames they are measured in, and the rule PX4 applies when they conflict. +PX4 uses these definitions, with one deliberate exception: it uses _course_ for the actual direction of motion, and _course setpoint_ for the intended one (see [Course Is the Actual Direction](#course-is-the-actual-direction)). +Where PX4 represents or computes something differently from the official definitions, this is described separately in [Where PX4 Differs](#where-px4-differs). + +## Sources and Precedence + +The definitions are taken from these authorities (see [References](#references)): + +- **Aviation:** ICAO (Annex 2, Doc 9713), FAA _Pilot's Handbook of Aeronautical Knowledge_ (PHAK) and FAA _Pilot/Controller Glossary_ (P/CG). +- **Marine:** NGA _The American Practical Navigator_ (Bowditch, Pub. No. 9), IHO S-32 _Hydrographic Dictionary_, NMEA 0183. +- **Ground vehicles:** ISO 8855 (road vehicle dynamics vocabulary) and SAE J670 (vehicle dynamics terminology). +- **Frames:** WGS 84 (NGA, adopted by ICAO), ISO 1151 (flight dynamics), SNAME (marine vehicle motion) and ISO 8855 (road vehicles). + +Where definitions of the same word conflict between these traditions, PX4 applies this rule: + +1. **Aviation definitions take precedence** (ICAO first, then FAA). + They are international standards, and most existing PX4 interfaces already follow them. + The one exception is _course_ (see [Course Is the Actual Direction](#course-is-the-actual-direction)). +2. **Marine terms are used for marine concepts** that aviation does not define, such as speed through the water, leeway, and set and drift (see [Terms Not Yet Used in PX4](#terms-not-yet-used-in-px4)). +3. **Ground vehicle terms are used for vehicle dynamics concepts** that navigation does not define, such as tyre slip angle (see [Terms Not Yet Used in PX4](#terms-not-yet-used-in-px4)). + For directions (heading, course, drift angle), the navigation terms apply to rovers too. +4. **Where a word is ambiguous between traditions, use the official qualified term**: for example _desired track_ (FAA P/CG) instead of bare _track_ for an intended path, and _drift angle_ (FAA PHAK) instead of bare _drift_. + +The conflicts and the resulting choices are listed in [Terminology Conflicts](#terminology-conflicts). + +## Frames and Reference Directions + +Every position and direction is relative to a reference frame. +This section describes the frames PX4 uses, and the official convention each one is based on. + +### Global Frame (ECEF, WGS 84) + +The global frame is the Earth-centred, Earth-fixed (ECEF) frame of the World Geodetic System 1984 (WGS 84), the reference system that ICAO requires for aeronautical data and that GNSS receivers use. +Its origin is the Earth's centre of mass, and it rotates with the Earth. +Global positions are given in it as geodetic latitude, longitude and altitude on the WGS 84 ellipsoid. + +- Latitude and longitude are in degrees, positive north and east. +- Altitude has two different references, which must never be mixed up: + - Height above the WGS 84 ellipsoid, as output by GNSS receivers. + - Altitude above mean sea level (AMSL), which differs from the ellipsoid height by the local geoid height (up to about 100 m). + +In PX4, `vehicle_global_position` carries `lat`, `lon`, `alt` (AMSL) and `alt_ellipsoid`. +On MAVLink and in mission items, the reference of each altitude is given by its `MAV_FRAME`. + +### Local Tangent-Plane Frame (NED) + +ISO 1151 defines the _normal earth-fixed axis system_: an earth-fixed frame whose z-axis points vertically down. +Aviation and marine engineering conventionally align its horizontal axes with north and east, which gives the **north-east-down (NED)** frame: + +- x points to true north, y points to east, z points down. +- It is a plane tangent to the Earth at a chosen origin. +- It is right-handed, so positive rotation about z is clockwise when viewed from above. + This matches the clockwise sense of headings, courses and bearings. + +In PX4, the positions of `vehicle_local_position` (fields `x`, `y`, `z`) are in this frame. +Its origin is the position where the [estimator](../advanced_config/tuning_the_ecl_ekf.md) was initialised, or where it was set manually (`ref_lat`, `ref_lon`, `ref_alt`). +This is the same frame as MAVLink `MAV_FRAME_LOCAL_NED`. + +See [Local Frame Is a Map Projection](#local-frame-is-a-map-projection) for how PX4 relates the local tangent-plane frame to the global frame. + +### Local Navigation Frame (NED) + +The local navigation frame has the same north, east and down axes, but moves with the vehicle: + +- Its origin is the body frame origin. +- Its axes point to true north, east and down at the vehicle's current position. + +In PX4, the velocities of `vehicle_local_position` (fields `vx`, `vy`, `vz`), the attitude and the heading are relative to this frame. +Close to the local origin, its axes and those of the local tangent-plane frame are practically the same. + +### Body Frame (FRD) + +ISO 1151 (aircraft) and SNAME (ships and submarines) define the body-fixed axes the same way: + +- x points forward (nose, bow or front). +- y points to the right. +- z points down, completing a right-handed frame. + +PX4 calls this frame **FRD** (forward, right, down), which is the same frame as MAVLink `MAV_FRAME_BODY_FRD`. +Its origin is the vehicle's centre of mass. +The vehicle's attitude is the rotation from the [local navigation frame](#local-navigation-frame-ned) to FRD, and its [heading](#heading) is the direction of the body x-axis in the horizontal plane. + +:::info +Some ground vehicle and robotics conventions use z-up frames instead: + +- ISO 8855 defines the road vehicle axis system with x forward, y to the left and z up (FLU), and an earth-fixed frame with z up. + Angles about z are then positive counterclockwise when viewed from above, the opposite of navigation practice. + SAE J670 allows both the ISO z-up and the traditional SAE z-down axis systems, so check which one a source uses. +- ROS uses ENU for the local frame and FLU for the body frame. + See [ROS 2 & PX4 Frame Conventions](../ros2/user_guide.md#ros-2-px4-frame-conventions). + +::: + +### Track Frame (Along-Track and Cross-Track) + +To describe how well a vehicle follows a path, area navigation (RNAV, ICAO Doc 9613) splits the horizontal position error into two components relative to the [desired track](#track): + +- **Along-track:** along the desired track, in the direction of travel. +- **Cross-track:** perpendicular to the desired track (see [Cross-Track Error](#cross-track-error)). + +PX4 path-following controllers ([NPFG](../config_fw/position_tuning_guide_fixedwing.md#fw-path-control-tuning-position), [pure pursuit](../config_rover/position_tuning.md#pure-pursuit-guidance-logic-info-only)) work in this frame. + +### North References + +ICAO defines directions as measured "from North (true, magnetic, compass or grid)", and Bowditch uses the same four references: + +- **True north:** The direction of the geographic North Pole along the local meridian. +- **Magnetic north:** The direction of the horizontal component of the Earth's magnetic field. + The angle between true and magnetic north is called _magnetic variation_ in aviation (FAA PHAK) and _variation_ in marine navigation (Bowditch). + Geomagnetic models such as the World Magnetic Model call the same angle _magnetic declination_. +- **Compass north:** The direction an installed compass indicates. + It differs from magnetic north by the _deviation_ caused by the vehicle's own magnetic fields. +- **Grid north:** The direction of the north axis of a map projection grid. + It differs from true north away from the projection's central meridian. + +PX4 uses true north internally. +The magnetometer measures compass north, so PX4 applies the magnetometer calibration, which removes the deviation. +The estimator then applies the declination (from the World Magnetic Model, or from [EKF2_MAG_DECL](../advanced_config/parameter_reference.md#EKF2_MAG_DECL) depending on [EKF2_DECL_TYPE](../advanced_config/parameter_reference.md#EKF2_DECL_TYPE)). + +### Angle Conventions + +The official aviation and marine definitions express directions in degrees, measured clockwise from north from 000° to 360°. +East is 090°, south is 180°, west is 270°. +MAVLink follows this convention for navigation angles (for example `GPS_RAW_INT.cog` in centidegrees from 0 to 35999). + +PX4 uses the same zero and the same sense of rotation, but a different unit and range internally: see [Angles in Radians](#angles-in-radians). + +## Definitions by Tradition + +The [Navigation Terminology](../concept/navigation_terminology.md) page gives one definition per term. +This section lists the definitions, where they differ, and the choice PX4 makes. + +### Heading + +> **ICAO:** "The direction in which the longitudinal axis of an aircraft is pointed, usually expressed in degrees from North (true, magnetic, compass or grid)." +> — ICAO Doc 9713, _International Civil Aviation Vocabulary_, and Annex 2, _Rules of the Air_ + +> **FAA:** "Heading—direction in which the nose of the aircraft points during flight." +> — FAA PHAK, Chapter 16 + +> **Bowditch:** "Heading (Hdg., SH) is the direction in which a vessel is pointed at any given moment, expressed as angular distance from 000° clockwise through 360°. It is easy to confuse heading and course." +> — Bowditch (2019), Art. 107 + +Aviation and marine definitions agree, and ground vehicle dynamics (ISO 8855, SAE J670) calls the same angle the _yaw angle_ (see [Ground Vehicles](#ground-vehicles-yaw-course-and-sideslip-angle)). + +### Course + +> **FAA:** "Course—intended path of an aircraft over the ground or the direction of a line drawn on a chart representing the intended aircraft path, expressed as the angle measured from a specific reference datum clockwise from 0° through 360° to the line." +> — FAA PHAK, Chapter 16 + +> **FAA:** "COURSE - The intended direction of flight in the horizontal plane measured in degrees from north." +> — FAA P/CG + +> **Bowditch:** "Course (C, Cn) is the horizontal direction in which a vessel is intended to be steered, expressed as angular distance from north clockwise through 360°. Strictly used, the term applies to direction through the water, not the direction intended to be made good over the ground." +> — Bowditch (2019), Art. 107 + +In aviation and marine navigation, the course is an _intended_ direction. +In aviation it is intended over the ground, while in strict marine usage it is the direction steered through the water. + +PX4 deviates from both: it calls the intended direction of motion over the ground the _course setpoint_, and uses _course_ for the actual direction, the [course over ground](#course-over-ground) (see [Course Is the Actual Direction](#course-is-the-actual-direction)). + +Course setpoints in PX4: `fixed_wing_lateral_setpoint.course` and `position_setpoint.course`. + +### Course Over Ground + +> **IHO:** "course over ground: The direction of the path over the ground actually followed by a vessel. It is normally a somewhat irregular line." +> — IHO S-32 + +Course over ground (COG) is the _actual_ direction of motion over the ground: the direction of the horizontal ground velocity vector. +With $v_N$ and $v_E$ the north and east components of the ground velocity: + +$$ +\chi = \operatorname{atan2}(v_E, v_N) +$$ + +Ground vehicle dynamics (ISO 8855, SAE J670) calls the same angle the _course angle_ (see [Ground Vehicles](#ground-vehicles-yaw-course-and-sideslip-angle)). +PX4 calls it the _course_, and uses _course over ground_ as a synonym (see [Course Is the Actual Direction](#course-is-the-actual-direction)). + +It is the direction of the [track](#track) at the current point. +This is why avionics display it as _TRK_ (track angle), and why NMEA 0183 `VTG` labels it "track made good". +COG is undefined when the vehicle is stationary, and noisy at low speed, so code that uses it must check a minimum ground speed or the course accuracy. + +In PX4: `sensor_gnss.course`, MAVLink `GPS_RAW_INT.cog`, NMEA `RMC` and `VTG`. + +### Track + +> **ICAO:** "TRACK [ICAO] - The projection on the earth's surface of the path of an aircraft, the direction of which path at any point is usually expressed in degrees from North (True, Magnetic, or Grid)." +> — FAA P/CG, quoting ICAO + +> **FAA:** "Track—actual path made over the ground in flight. (If proper correction has been made for the wind, track and course are identical.)" +> — FAA PHAK, Chapter 16 + +> **FAA:** "DESIRED TRACK - The planned or intended track between two waypoints. It is measured in degrees from either magnetic or true north. The instantaneous angle may change from point to point along the great circle track between waypoints." +> — FAA P/CG + +> **Bowditch:** "Track (TR) is the intended horizontal direction of travel with respect to the Earth. The terms intended track and trackline are used to indicate the path of intended travel." +> — Bowditch (2019), Art. 107 + +In aviation the **track** is the _actual_ path over the ground, and the **desired track** is the _intended_ path between two waypoints. +In marine navigation the track is the _intended_ path. + +Following the [precedence rule](#sources-and-precedence), PX4 uses the aviation terms: + +- **Track:** The actual path over the ground. + Its direction at any point is the [course](#course-over-ground). +- **Desired track:** The intended path over the ground, from which the [cross-track error](#cross-track-error) is measured. + This is usually the line between two waypoints, but it can also be a line along a course setpoint the vehicle holds, which the FAA definition does not cover. + +Marine readers understand bare "track" as the intended path, so always write _desired track_ for the intended path. + +### Bearing + +> **FAA:** "BEARING - The horizontal direction to or from any point, usually measured clockwise from true north, magnetic north, or some other reference point through 360 degrees." +> — FAA P/CG + +> **Bowditch:** "Bearing (B, Brg.) is the direction of one terrestrial point from another, expressed as angular distance from 000° (North) clockwise through 360°." +> — Bowditch (2019), Art. 107 + +Aviation and marine definitions agree. + +:::warning +A bearing is not a commanded direction. +The direction a guidance law commands is a course (or heading) setpoint. +See [Field Names That Deviate](#field-names-that-deviate). +::: + +### Cross-Track Error + +Cross-track error (XTE) is a standard output of RNAV systems and marine navigation receivers. +Bowditch lists it alongside course over ground, speed over ground and bearing to the next waypoint (Art. 2501). +NMEA 0183 reports it in the `XTE`, `APB` and `RMB` sentences, as a distance together with the direction to steer (`L` or `R`) to return to the desired track. + +The cross-track error is the perpendicular distance of the vehicle from the [desired track](#track), together with the side of the track the vehicle is on. +The official definitions do not define a sign: see [Signed Cross-Track Error](#signed-cross-track-error) for how PX4 represents it. + +### Drift Angle + +> **FAA:** "Drift angle—angle between heading and track." +> — FAA PHAK, Chapter 16 + +The drift angle is caused by wind for aircraft, and by wind and current for vessels. +For ground vehicles, it is caused by wheel slip, and ISO 8855 calls it the _vehicle sideslip angle_ (see [Ground Vehicles](#ground-vehicles-yaw-course-and-sideslip-angle)). + +:::warning +Marine _drift_ is the speed of a current, while the aviation _drift angle_ is an angle between heading and track. +Always write _drift angle_ for the angle, and never bare _drift_. +::: + +:::info +For aircraft, the drift angle is not the _sideslip angle_ ($\beta$, see [Terminology/Notation](../contribute/notation.md)). +In flight dynamics (ISO 1151), sideslip is measured against the airflow, so a plane flying through a crosswind with its nose into the wind has a large drift angle and zero sideslip. +Ground vehicle dynamics uses the same name for a ground-referenced angle: see [Ground Vehicles](#ground-vehicles-yaw-course-and-sideslip-angle). +::: + +In PX4, the aerodynamic sideslip is used by the EKF2 synthetic sideslip fusion (`estimator_aid_src_sideslip`, `estimator_innovations.beta`). + +### Ground Vehicles: Yaw, Course and Sideslip Angle + +ISO 8855 and SAE J670 describe the horizontal motion of a ground vehicle with three angles, measured in the ground plane: + +- **Yaw angle** ($\psi$): The angle from the earth-fixed x-axis to the vehicle x-axis. + This is the [heading](#heading). +- **Course angle** ($\nu$): The angle from the earth-fixed x-axis to the horizontal velocity of the vehicle over the ground. + This is the actual direction of motion, which is the PX4 [course](#course-over-ground), not the intended [course](#course) of the FAA definition. +- **Sideslip angle** ($\beta = \nu - \psi$): The angle from the vehicle x-axis to the horizontal velocity over the ground. + This is the ground vehicle counterpart of the [drift angle](#drift-angle), and not the air-relative sideslip angle of flight dynamics. + +ISO 8855 measures these angles counterclockwise about a z-up axis, so its sideslip angle has the opposite sign of the [PX4 drift angle](#drift-angle-sign). + +Following the [precedence rule](#sources-and-precedence), use these terms for rovers: + +- _Heading_ for the yaw angle, _course_ for the course angle and _drift angle_ for the vehicle sideslip angle. +- When code or documentation follows vehicle dynamics literature, the ISO 8855 terms may be used, but write _vehicle sideslip angle_ and cite ISO 8855, so that it is not confused with aerodynamic sideslip. + +For a rover that drives without wheel slip (Ackermann or differential drive), the course equals the heading when driving forwards, and the heading plus 180° when reversing. +A drift angle appears when the wheels slip, for example on loose ground or in fast turns, and by design on [mecanum rovers](../frames_rover/index.md#mecanum). + +### Airspeed, Ground Speed and Speed Over Ground + +> **FAA:** "Airspeed—rate of the aircraft's progress through the air." "GS—rate of the aircraft's inflight progress over the ground." +> — FAA PHAK, Chapter 16 + +> **Bowditch:** "Speed over the ground (SOG) is the actual speed of the vessel over the surface of the Earth at any given time." +> — Bowditch (2019), Art. 106 + +Ground speed (aviation, FAA PHAK) and speed over ground (marine) are the same quantity: the magnitude of the horizontal ground velocity, whose direction is the course over ground. +For vessels, the water-relative counterpart of airspeed is the _speed through the water_, which a log (paddle wheel) measures and a GNSS receiver does not. + +### Wind and Current Triangle + +The [wind triangle](../concept/navigation_terminology.md#wind-triangle) has a marine counterpart for vessels: + +$$ +\mathbf{v}_{ground} = \mathbf{v}_{water} + \mathbf{v}_{current} +$$ + +The current is described by its [set and drift](#terms-not-yet-used-in-px4), and $\mathbf{v}_{water}$ is offset from the heading by [leeway](#terms-not-yet-used-in-px4). + +## Terminology Conflicts + +These are the terms where the traditions disagree, and the official term PX4 uses as a result of the [precedence rule](#sources-and-precedence). +Heading (yaw angle in ISO 8855), bearing, course over ground and cross-track error mean the same in all of them. + +| Term | Aviation (ICAO/FAA, ISO 1151) | Marine (Bowditch) | Ground vehicles (ISO 8855/SAE J670) | Term to use in PX4 | +| ---------------------- | ----------------------------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Track | Actual path over the ground; the intended path is _desired track_ | Intended path over the ground | — | _Track_ (actual) and _desired track_ (intended) | +| Course | Intended direction over the ground | Direction steered through the water (strict sense) | _Course angle_: actual direction of motion over the ground | _Course_ (actual, also _course over ground_) and _course setpoint_ (intended); differs from aviation, see [Course Is the Actual Direction](#course-is-the-actual-direction) | +| Drift | _Drift angle_: angle between heading and track | Speed of the current, with _set_ as its direction | — | _Drift angle_ (angle); never bare _drift_ | +| Sideslip | Angle between the body x-axis and the airflow | — | Angle between the vehicle x-axis and the velocity over the ground | _Sideslip angle_ (air-relative) and _drift angle_ or _vehicle sideslip angle_ (ground-relative) | +| True to magnetic north | _Magnetic variation_ | _Variation_ | — | _Declination_ (World Magnetic Model term, used by EKF2) | + +## Where PX4 Differs + +PX4 follows the official definitions above, except for the meaning of _course_. +The sections below describe where PX4 represents, computes or names a quantity differently from the official definitions, so that you can convert correctly. + +### Course Is the Actual Direction + +The official definitions use bare _course_ for an _intended_ direction (FAA, Bowditch), and _course over ground_ (IHO) or _track angle_ (avionics) for the _actual_ direction. +PX4 deliberately uses: + +- **Course:** The actual (measured or estimated) direction of motion over the ground. + _Course over ground_ (COG) is a synonym. +- **Course setpoint:** The intended direction of motion over the ground, which aviation calls the _course_. + +The reasons are: + +- PX4 names a quantity by its actual value and adds _setpoint_ for the commanded value, as for _heading_ and _heading setpoint_, or _velocity_ and _velocity setpoint_. + With the aviation meaning, the course setpoint would be the setpoint of an intended value, and the actual value would need a different word. +- It matches the _course angle_ of ground vehicle dynamics (ISO 8855) and what GNSS receivers report as course (`sensor_gnss.course`, NMEA `RMC` and `VTG`). +- Existing fields already fit: `sensor_gnss.course` is measured, and the `course` fields of setpoint topics (`fixed_wing_lateral_setpoint.course`, `position_setpoint.course`) are setpoints. + +When you read aviation or marine sources, translate their _course_ to the PX4 _course setpoint_. +For example, the FAA [wind correction angle](#terms-not-yet-used-in-px4) is applied to the course setpoint in PX4 terms. + +### Angles in Radians + +The official definitions express directions in degrees from 000° to 360°. +In uORB, PX4 expresses them in radians, usually wrapped to $[-\pi, \pi]$, with the same zero (true north) and the same sense (clockwise). +East is $+\pi/2$ and west is $-\pi/2$. +Some fields use another range, for example `transponder_report.heading` ($[0, 2\pi]$) and unwrapped yaw setpoints, so check the field's `[@range]`. + +Convert with `matrix::wrap_2pi()` and `math::degrees()` when you output to MAVLink or to users, as the MAVLink streams do. + +### Local Frame Is a Map Projection + +The estimator keeps the vehicle's global position (latitude and longitude), and derives the local position from it with an **azimuthal equidistant projection** centred on the local origin (`MapProjection` in `src/lib/geo`). +As a result: + +- The x-axis of `vehicle_local_position` points to true north at the origin. + At the vehicle's position it points to the grid north of the projection, which differs from true north by the meridian convergence. + The difference grows with distance from the origin, mainly east or west of it. + It is about 0.1° at 10 km east of an origin at 47° latitude. +- Heading and velocity are relative to true north at the vehicle ([local navigation frame](#local-navigation-frame-ned)), not to the projection's grid north. +- A straight line between two waypoints in the local frame is a straight line in the projection. + The FAA desired track follows the great circle between the waypoints. + The two are identical for lines through the origin, and practically identical over typical mission distances. + +For vehicles that operate tens of kilometres from the origin, take this into account when you compare local-frame directions with true directions. + +### Signed Cross-Track Error + +The official definitions express cross-track error as a distance and a side (NMEA: the direction to steer). +PX4 represents it as a single signed distance: + +- It is the shortest horizontal distance from the vehicle to the desired track. +- It is positive when the vehicle is to the right of the desired track and negative when it is to the left, looking in the direction of travel. + +With $\mathbf{t}$ the unit vector along the desired track and $\mathbf{d}$ the vector from a point on the track to the vehicle (north and east components): + +$$ +e_{xt} = t_N d_E - t_E d_N +$$ + +This is the convention used by NPFG (`fixed_wing_lateral_guidance_status.signed_track_error`) and by pure pursuit (`pure_pursuit_status.crosstrack_error`). +A vehicle with a positive cross-track error gets NMEA "steer L". + +### Drift Angle Sign + +The FAA defines the drift angle as the angle between heading and track, without a sign. +Where PX4 needs a signed value, it is `wrap_pi(course - heading)`: positive when the vehicle moves to the right of where its nose points. + +### Wind as a Velocity Vector + +The official definitions describe wind by the direction it blows _from_. +PX4 wind estimates (`wind`, `airspeed_wind`) are velocity vectors in NED (`windspeed_north`, `windspeed_east`), which point in the direction the air moves _towards_. +A wind reported as "from 360°" has `windspeed_north < 0` in PX4. + +### Field Names That Deviate + +Some existing names predate these pages or come from external protocols, and do not match the official terms. +Read them with the meaning given here, and use the official term in new code: + +| Field | Actual meaning | Official term | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | +| `position_setpoint.course` (comment: "desired course (bearing)") | Intended direction of motion over the ground. | Course setpoint | +| `position_controller_status.nav_bearing` (MAVLink `NAV_CONTROLLER_OUTPUT.nav_bearing`) | Intended for the direction commanded by the guidance law. Not populated by current controllers (always 0). | Course or heading setpoint | +| `position_controller_status.xtrack_error` (MAVLink `NAV_CONTROLLER_OUTPUT.xtrack_error`) | Intended for the signed cross-track error. Not populated by current controllers (always 0). | Cross-track error | +| `fixed_wing_lateral_guidance_status.bearing_feas` | Feasibility of the course commanded by NPFG (NPFG calls it "bearing"). | Course setpoint | +| `transponder_report.heading` (MAVLink `ADSB_VEHICLE.heading`) | Course over ground of the other aircraft, as reported by ADS-B. | Course | +| `bearing_setpoint` in the Ackermann and mecanum rover position controllers (`AckermannPosControl`, `MecanumPosControl`) | Course setpoint, taken from the bearing to the pure pursuit lookahead point (`PurePursuit::calcTargetBearing()`, which is a bearing). Ackermann rovers use it directly as the heading (yaw) setpoint, assuming no slip. | Course setpoint (mecanum), heading setpoint (Ackermann) | +| "Direction (bearing)" of the velocity setpoint in [Rover Velocity Tuning](../config_rover/velocity_tuning.md) and "bearing setpoints" in [Rover Position Tuning](../config_rover/position_tuning.md) | Intended direction of motion over the ground. | Course setpoint | + +## Guidelines for Contributors + +When you add or change uORB fields, parameters, MAVLink handling, log analysis tools or documentation: + +- Use the official terms on these pages. + Do not introduce new navigation terms. + If a concept is missing, look up its official name in the [references](#references) and add it here. +- Use _heading_ only for the direction the vehicle points, _course_ for the actual direction of motion over the ground, _course setpoint_ for the intended direction over the ground, and _bearing_ only for the direction from one point to another. + Do not use bare _course_ for an intended direction, even where an aviation or marine source does (see [Course Is the Actual Direction](#course-is-the-actual-direction)). +- Write _desired track_ for an intended path, and never use bare _drift_. +- Use _sideslip angle_ only for the angle against the airflow. + For the ground-relative angle, use _drift angle_, or _vehicle sideslip angle_ with a reference to ISO 8855. +- Use the PX4 [signed cross-track error](#signed-cross-track-error) convention. +- State the reference (true north), unit and range in the field comment, and add the `[@frame]` and `[@range]` tags (see [uORB Documentation Standard](../uorb/uorb_documentation.md)). +- When you convert to or from an external protocol, check that protocol's definition of each field: names alone are not reliable. + +## Terms Not Yet Used in PX4 + +These terms have official definitions, but PX4 does not use them yet. +They are kept here for reference, so that new code uses the official term when it needs one of these concepts. + +| Term | Official meaning | Source | +| --------------------- | ----------------------------------------------------------------------------------------- | ------------------ | +| Track made good | Net direction from the point of departure to the point of arrival. | Bowditch | +| Relative bearing | Bearing measured from the vehicle's heading. | Bowditch | +| Wind correction angle | Correction applied to the course setpoint to obtain a heading that keeps the track on it. | FAA | +| Tyre slip angle | Angle between the wheel plane and the direction of travel of the tyre contact patch. | ISO 8855, SAE J670 | +| Leeway | Leeward motion of a vessel due to the wind. | Bowditch | +| Set and drift | Direction (towards) and speed of a current. | Bowditch | + +Expand the block below for the official definition of each term. + +::::details Official definitions + +### Track Made Good + +> **Bowditch:** "Track made good (TMG) is the single resultant direction from the point of departure to point of arrival at any given time. The use of this term is preferred to the use of the misnomer 'course made good.'" +> — Bowditch (2019), Art. 107 + +Track made good (also called course made good, CMG) is the net direction between two positions, not an instantaneous value. +The matching speed is the _speed made good_ (SMG): the distance between the two positions divided by the elapsed time. +PX4 controllers do not use it, but it is useful in log analysis. + +### Relative Bearing + +> **Bowditch:** "A relative bearing is measured relative to the ship's heading from 000° (dead ahead) clockwise through 360°." +> — Bowditch (2019), Art. 107 + +- **Relative bearing:** The [bearing](#bearing) measured from the vehicle's heading. + Bowditch: "True Bearing = Relative Bearing + True Heading." +- **Reciprocal bearing:** The bearing in the opposite direction, which differs by 180°. + +### Wind Correction Angle + +> **FAA:** "WCA—correction applied to the course to establish a heading so that track coincides with course." +> — FAA PHAK, Chapter 16 + +The **wind correction angle** (WCA, also called _crab angle_) is the angle by which the heading is offset from the course setpoint into the wind, so that the track follows the course setpoint. +The FAA definition calls this intended direction the _course_ (see [Course Is the Actual Direction](#course-is-the-actual-direction)). +In the [wind triangle](../concept/navigation_terminology.md#wind-triangle), it is the angle between the heading and the course setpoint. + +### Tyre Slip Angle + +ISO 8855 and SAE J670 define the _slip angle_ of each tyre: the angle between the wheel plane and the direction of travel of the wheel's contact patch. +It describes how a tyre generates lateral force, and is a vehicle dynamics term with no navigation counterpart. +Write _tyre slip angle_ for it, to distinguish it from the [vehicle sideslip angle](#ground-vehicles-yaw-course-and-sideslip-angle). + +### Leeway + +> **Bowditch:** "Leeway is the leeward motion of a vessel due to that component of the wind vector perpendicular to the vessel's track." +> — Bowditch (2019), Art. 1006 + +Leeway is the sideways push of the wind on a vessel's hull and superstructure, relative to the water. +It is the marine counterpart of an aircraft being displaced by the wind, and contributes to the drift angle. +In the [current triangle](#wind-and-current-triangle), $\mathbf{v}_{water}$ is offset from the heading by leeway. + +### Set and Drift + +> **Bowditch:** "Set refers to the current's direction, and drift refers to the current's speed." +> — Bowditch (2019), Art. 1006 + +The _set_ is the direction towards which the current flows, and the _drift_ is its speed. +When a dead reckoning (DR) position is compared with a fix, the same terms describe the total unexplained offset: "The set is the direction from the DR to the fix" (Bowditch, Art. 1008). + +This is the opposite of [wind direction](../concept/navigation_terminology.md#wind-direction), which is the direction the wind blows from. +A current with set 000° and a wind from 180° push a vehicle the same way. +PX4 wind estimates are velocity vectors, so they [point the same way as current set](#wind-as-a-velocity-vector). + +:::warning +Marine _drift_ is the speed of a current, while the aviation _drift angle_ is an angle between heading and track. +Write _drift angle_ for the angle, and _set and drift_ (of the current) for the current. +::: + +:::: + +## 参考 + +Aviation: + +- ICAO Doc 9713, _International Civil Aviation Vocabulary_, and ICAO Annex 2, _Rules of the Air_ (heading, track). +- ICAO Doc 9613, _Performance-based Navigation (PBN) Manual_ (along-track and cross-track components). +- ICAO Doc 9674, _World Geodetic System — 1984 (WGS-84) Manual_. +- FAA, [Pilot's Handbook of Aeronautical Knowledge](https://www.faa.gov/regulations_policies/handbooks_manuals/aviation/phak) (FAA-H-8083-25), Chapter 16: Navigation. +- FAA, [Pilot/Controller Glossary](https://www.faa.gov/air_traffic/publications/atpubs/pcg_html/) (BEARING, COURSE, DESIRED TRACK, TRACK, TRACK [ICAO]). +- SKYbrary, [Heading, Track and Radial](https://skybrary.aero/articles/heading-track-and-radial) (summary of the ICAO definitions). + +Marine: + +- National Geospatial-Intelligence Agency, [The American Practical Navigator (Bowditch), Pub. No. 9](https://msi.nga.mil/Publications/APN), 2019 edition, Volume I: Art. 106 and 107 (speed and direction), Art. 1006 and 1008 (leeway, set and drift), Art. 2501 (receiver outputs, including cross-track error). +- International Hydrographic Organization, [S-32 Hydrographic Dictionary](https://portal.iho.int/iho-ohi/S32/engView.php?page=56) (course over ground, course made good). +- National Marine Electronics Association, [NMEA 0183](https://www.nmea.org/nmea-0183.html) (`RMC`, `VTG`, `HDT`, `XTE`, `APB`, `RMB`). +- SNAME, _Nomenclature for Treating the Motion of a Submerged Body Through a Fluid_ (body axes for marine vehicles). + +Ground vehicles: + +- ISO 8855:2011, [Road vehicles — Vehicle dynamics and road-holding ability — Vocabulary](https://www.iso.org/standard/51180.html) (axis systems, yaw, course and sideslip angle, tyre slip angle). +- SAE J670 (2022), [Vehicle Dynamics Terminology](https://saemobilus.sae.org/standards/j670_202206-vehicle-dynamics-terminology). + +Frames: + +- ISO 1151, _Flight dynamics — Concepts, quantities and symbols_ (earth-fixed and body axis systems, aerodynamic sideslip). +- National Geospatial-Intelligence Agency, _World Geodetic System 1984_ (NGA.STND.0036). + +PX4: + +- [Navigation Terminology](../concept/navigation_terminology.md): the commonly used terms. +- [Terminology/Notation](../contribute/notation.md): symbols, frames and acronyms. +- [uORB Documentation Standard](../uorb/uorb_documentation.md): how to document frames, units and ranges of message fields. diff --git a/docs/zh/config/safety.md b/docs/zh/config/safety.md index f1958f1209a..45adb42997f 100644 --- a/docs/zh/config/safety.md +++ b/docs/zh/config/safety.md @@ -142,6 +142,7 @@ The remaining flight time comes from the battery: Without a remaining flight time estimate, the distance-aware return failsafe never triggers, and there is no warning either. This is the case if `BATn_CAPACITY` is not set (the default is `-1`), if a DroneCAN battery sends only `BatteryInfo`, or if a MAVLink battery does not fill in `time_remaining`. This also applies when there is no valid home position or global position estimate. +It also never triggers with [RTL_TYPE](../advanced_config/parameter_reference.md#RTL_TYPE) = 2 or 4 while a valid mission is loaded: these Return types do not estimate the time to follow the mission. The vehicle is then only protected by the [battery level failsafe](#battery-level-failsafe). ::: @@ -381,8 +382,12 @@ The parachute health failsafe is triggered when a [MAVLink parachute](../periphe Failsafe for when a VTOL vehicle can no longer fly in fixed-wing mode, perhaps due to the failure of a pusher motor, airspeed sensor, or control surface. If the failsafe is triggered, the vehicle will immediately switch to multicopter mode and execute the action defined in parameter [COM_QC_ACT](#COM_QC_ACT). +After a quad-chute, Mission and VTOL Takeoff mode no longer command forward transitions, as the next one would likely fail too: they skip them and fly on in multicopter mode, which has much less range. +A forward transition commanded by the pilot or ground station allows them again; otherwise this lasts until the vehicle is rebooted. + :::info The quad-chute can also be triggered by sending a MAVLINK [MAV_CMD_DO_VTOL_TRANSITION](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_VTOL_TRANSITION) message with `param2` set to `1`. +As this is not caused by a failure, it only switches to multicopter mode, without executing [COM_QC_ACT](#COM_QC_ACT) or requiring a reboot before the next arming. ::: The parameters that control when the quad-chute will trigger are listed in the table below. diff --git a/docs/zh/config_rover/attitude_tuning.md b/docs/zh/config_rover/attitude_tuning.md index 754a646a794..b23a8d517ef 100644 --- a/docs/zh/config_rover/attitude_tuning.md +++ b/docs/zh/config_rover/attitude_tuning.md @@ -13,7 +13,7 @@ Configure the following [parameters](../advanced_config/parameters.md) in QGroun ::: tip In stabilized mode the closed loop yaw control is only active when driving a straight line (no yaw rate input). To tune it start with a value of 1 for [RO_YAW_P](#RO_YAW_P). - Put the rover into stabilized mode and move the left stick of your controller up to drive forwards. + Put the rover into stabilized mode and drive forwards in a straight line. Disarm the rover and from the flight log plot the `measured_yaw` and the `adjusted_yaw_setpoint` from the [SurfaceVehicleAttitudeStatus](../msg_docs/SurfaceVehicleAttitudeStatus.md) message over each other. Increase/Decrease the parameter until you are satisfied with the setpoint tracking. If you observe a steady state error in the yaw setpoint increase the integrator of the rate controller: [RO_YAW_RATE_I](../advanced_config/parameter_reference.md#RO_YAW_RATE_I) . diff --git a/docs/zh/config_rover/basic_setup.md b/docs/zh/config_rover/basic_setup.md index 0e633b84a67..493aa671ad7 100644 --- a/docs/zh/config_rover/basic_setup.md +++ b/docs/zh/config_rover/basic_setup.md @@ -119,6 +119,9 @@ Navigate to [Parameters](../advanced_config/parameters.md) in QGroundControl and ## (Optional) Stick Input Mapping +[RO_STICK_MAP](#RO_STICK_MAP) selects which sticks drive the rover forwards/backwards, turn it and, for mecanum rovers, drive it left/right. +The available layouts are described in [Manual Modes](../flight_modes_rover/manual.md#stick-mapping). + Input shaping can be used to adjust the default linear mapping from stick inputs $\in [-1, 1]$ to normalized setpoints $\in [-1, 1]$. Applying this specifically to the steering input, can provide a smoother driving experience, by enabling the user to make small adjustments when the stick is close to the center, but still send large inputs when moving them to the edges. We provide this input shaping through the super exponential function: @@ -154,13 +157,14 @@ You can now continue the configuration process with [rate tuning](rate_tuning.md ## Parameter Overview -| Parameter | 描述 | Unit | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | ------- | -| [RO_MAX_THR_SPEED](../advanced_config/parameter_reference.md#RO_MAX_THR_SPEED) | Speed the rover drives at maximum throttle | $m/s$ | -| [RO_ACCEL_LIM](../advanced_config/parameter_reference.md#RO_ACCEL_LIM) | (Optional) Maximum allowed acceleration | $m/s^2$ | -| [RO_DECEL_LIM](../advanced_config/parameter_reference.md#RO_DECEL_LIM) | (Optional) Maximum allowed deceleration | $m/s^2$ | -| [RO_YAW_EXPO](../advanced_config/parameter_reference.md#RO_YAW_EXPO) | (Optional) Yaw rate expo factor | $-$ | -| [RO_YAW_SUPEXPO](../advanced_config/parameter_reference.md#RO_YAW_SUPEXPO) | (Optional) Yaw rate super expo factor | $-$ | +| Parameter | 描述 | Unit | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ------- | +| [RO_MAX_THR_SPEED](../advanced_config/parameter_reference.md#RO_MAX_THR_SPEED) | Speed the rover drives at maximum throttle | $m/s$ | +| [RO_ACCEL_LIM](../advanced_config/parameter_reference.md#RO_ACCEL_LIM) | (Optional) Maximum allowed acceleration | $m/s^2$ | +| [RO_DECEL_LIM](../advanced_config/parameter_reference.md#RO_DECEL_LIM) | (Optional) Maximum allowed deceleration | $m/s^2$ | +| [RO_YAW_EXPO](../advanced_config/parameter_reference.md#RO_YAW_EXPO) | (Optional) Yaw rate expo factor | $-$ | +| [RO_YAW_SUPEXPO](../advanced_config/parameter_reference.md#RO_YAW_SUPEXPO) | (Optional) Yaw rate super expo factor | $-$ | +| [RO_STICK_MAP](../advanced_config/parameter_reference.md#RO_STICK_MAP) | (Optional) Stick mapping for manual modes | $-$ | ### Ackermann Specific diff --git a/docs/zh/config_rover/position_tuning.md b/docs/zh/config_rover/position_tuning.md index c79e0af866e..7908cdefba7 100644 --- a/docs/zh/config_rover/position_tuning.md +++ b/docs/zh/config_rover/position_tuning.md @@ -52,7 +52,7 @@ The [pure pursuit](#pure-pursuit-guidance-logic-info-only) algorithm is used to The following parameters are used to tune the algorithm: -1. [PP_LOOKAHD_GAIN](#PP_LOOKAHD_GAIN): When driving in a straight line (right stick centered) position mode leverages the same path following algorithm used in [auto modes](../flight_modes_rover/auto.md) called [pure pursuit](#pure-pursuit-guidance-logic-info-only) to achieve the best possible straight line driving behaviour. +1. [PP_LOOKAHD_GAIN](#PP_LOOKAHD_GAIN): When driving in a straight line (no turn input) position mode leverages the same path following algorithm used in [auto modes](../flight_modes_rover/auto.md) called [pure pursuit](#pure-pursuit-guidance-logic-info-only) to achieve the best possible straight line driving behaviour. This parameter determines how aggressive the controller will steer towards the path. ::: tip diff --git a/docs/zh/config_rover/rate_tuning.md b/docs/zh/config_rover/rate_tuning.md index 26360e720d2..c6479d23fd5 100644 --- a/docs/zh/config_rover/rate_tuning.md +++ b/docs/zh/config_rover/rate_tuning.md @@ -40,7 +40,7 @@ Configure the following [parameters](../advanced_config/parameters.md) in QGroun :::tip To tune this parameter, first make sure you set [RO_YAW_RATE_P](#RO_YAW_RATE_P) and [RO_YAW_RATE_I](#RO_YAW_RATE_I) to zero. This way the yaw rate is only controlled by the feed-forward term, which makes it easier to tune. - Now put the rover in [Acro mode](../flight_modes_rover/manual.md#acro-mode) and then move the right-stick of your controller to the right and/or left and hold it at a few different levels for a couple of seconds each while driving with a constant throttle (for differential/mecanum rovers this can also be done while standing still). + Now put the rover in [Acro mode](../flight_modes_rover/manual.md#acro-mode) and turn it to the right and/or left with a few different stick inputs ([stick mapping](../flight_modes_rover/manual.md#stick-mapping)), holding each for a couple of seconds while driving with a constant throttle (for differential/mecanum rovers this can also be done while standing still). Disarm the rover and from the flight log plot the `adjusted_yaw_rate_setpoint` from [SurfaceVehicleRateStatus](../msg_docs/SurfaceVehicleRateStatus.md) and the `measured_yaw_rate` from [SurfaceVehicleRateStatus](../msg_docs/SurfaceVehicleRateStatus.md) over each other. If the actual yaw rate of the rover is higher than the yaw rate setpoint, decrease [RO_YAW_RATE_CORR](#RO_YAW_RATE_CORR) (between [0, 1]). If it is the other way around increase the parameter [1, inf] and repeat until you are satisfied with the setpoint tracking. @@ -55,7 +55,7 @@ Configure the following [parameters](../advanced_config/parameters.md) in QGroun :::tip To tune this parameter: - 1. Put the rover in [Acro mode](../flight_modes_rover/manual.md#acro-mode) and hold the throttle stick and the right stick at a few different levels for a couple of seconds each. + 1. Put the rover in [Acro mode](../flight_modes_rover/manual.md#acro-mode) and drive and turn it with a few different stick inputs, holding each for a couple of seconds. 2. Disarm the rover and from the flight log plot the `adjusted_yaw_rate_setpoint` and the `measured_yaw_rate` from [SurfaceVehicleRateStatus](../msg_docs/SurfaceVehicleRateStatus.md) over each other. 3. Increase [RO_YAW_RATE_P](#RO_YAW_RATE_P) if the measured value does not track the setpoint fast enough or decrease it if the measurement overshoots the setpoint by too much. 4. Repeat until you are satisfied with the behaviour. @@ -73,7 +73,7 @@ Configure the following [parameters](../advanced_config/parameters.md) in QGroun 5. (Optional) [RO_YAW_ACCEL_LIM](#RO_YAW_ACCEL_LIM)/[RO_YAW_DECEL_LIM](#RO_YAW_DECEL_LIM) [deg/s^2]: Used to limit the yaw acceleration/deceleration. This can be used to smoothen the yaw rate setpoint trajectory. -6. (Optional) [RO_YAW_STICK_DZ](#RO_YAW_STICK_DZ) [-]: Percentage of yaw stick input range that will be interpreted as zero around the stick centered value. +6. (Optional) [RO_YAW_STICK_DZ](#RO_YAW_STICK_DZ) [-]: Percentage of the turn input range that will be interpreted as zero around the stick centered value. 7. (Advanced) [RO_YAW_RATE_TH](#RO_YAW_RATE_TH) [deg/s]: The minimum threshold for the yaw rate measurement not to be interpreted as zero. This can be used to cut off measurement noise when the rover is standing still. @@ -113,7 +113,7 @@ with The steering setpoint is equal to $\delta$ interpolated from [-[RA_MAX_STR_ANG](../advanced_config/parameter_reference.md#RA_MAX_STR_ANG), [RA_MAX_STR_ANG](../advanced_config/parameter_reference.md#RA_MAX_STR_ANG)] to [-1, 1]. -For driving this means that the same right hand stick input will cause a different steering angle based on how fast you are driving. +For driving this means that the same turn input will cause a different steering angle based on how fast you are driving. By limiting the maximum yaw rate, we can restrict the steering angle based on the speed, which can prevent the rover from rolling over. This mode will feel more like "driving a car" than [Manual mode](../flight_modes_rover/manual.md#manual-mode). diff --git a/docs/zh/config_rover/velocity_tuning.md b/docs/zh/config_rover/velocity_tuning.md index b5359b10534..cbb3fb3a512 100644 --- a/docs/zh/config_rover/velocity_tuning.md +++ b/docs/zh/config_rover/velocity_tuning.md @@ -27,7 +27,7 @@ To tune the velocity controller configure the following [parameters](../advanced 1. Set [RO_SPEED_P](#RO_SPEED_P) and [RO_SPEED_I](#RO_SPEED_I) to zero. This way the speed is only controlled by the feed-forward term, which makes it easier to tune. - 2. Put the rover in [Position mode](../flight_modes_rover/manual.md#position-mode) and then move the left stick of your controller up and/or down and hold it at a few different levels for a couple of seconds each. + 2. Put the rover in [Position mode](../flight_modes_rover/manual.md#position-mode) and drive forwards and/or backwards with a few different stick inputs, holding each for a couple of seconds. 3. Disarm the rover and from the flight log plot the `adjusted_speed_body_x_setpoint` and the `measured_speed_body_x` from the [SurfaceVehicleSpeedStatus](../msg_docs/SurfaceVehicleSpeedStatus.md) message over each other. 4. If the actual speed of the rover is higher than the speed setpoint, increase [RO_MAX_THR_SPEED](#RO_MAX_THR_SPEED). If it is the other way around decrease the parameter and repeat until you are satisfied with the setpoint tracking. @@ -62,7 +62,7 @@ To tune the velocity controller configure the following [parameters](../advanced These steps are only necessary if you are tuning/want to unlock the manual [Position mode](../flight_modes_rover/manual.md#position-mode). Otherwise, you can continue with [position tuning](position_tuning.md) where these same parameters will also be configured. -1. [PP_LOOKAHD_GAIN](#PP_LOOKAHD_GAIN): When driving in a straight line (right stick centered) position mode leverages the same path following algorithm used in [auto modes](../flight_modes_rover/auto.md) called [pure pursuit](position_tuning.md#pure-pursuit-guidance-logic-info-only) to achieve the best possible straight line driving behaviour. +1. [PP_LOOKAHD_GAIN](#PP_LOOKAHD_GAIN): When driving in a straight line (no turn input) position mode leverages the same path following algorithm used in [auto modes](../flight_modes_rover/auto.md) called [pure pursuit](position_tuning.md#pure-pursuit-guidance-logic-info-only) to achieve the best possible straight line driving behaviour. This parameter determines how aggressive the controller will steer towards the path. ::: tip diff --git a/docs/zh/contribute/notation.md b/docs/zh/contribute/notation.md index 7d954692090..0cb31f0ce24 100644 --- a/docs/zh/contribute/notation.md +++ b/docs/zh/contribute/notation.md @@ -2,6 +2,8 @@ 本指南中的文本和图表中使用了以下术语、符号和装饰器。 +For navigation terms such as heading, course, track, bearing and cross-track error, see [Navigation Terminology](../concept/navigation_terminology.md). + ## 符号 - Bold face variables indicate vectors or matrices and non-bold face variables represent scalars. diff --git a/docs/zh/debug/failure_injection.md b/docs/zh/debug/failure_injection.md index 70e202aa2fd..54ccf0ffcc5 100644 --- a/docs/zh/debug/failure_injection.md +++ b/docs/zh/debug/failure_injection.md @@ -11,24 +11,24 @@ What differs is whether a _consumer_ applies the failure, and that depends on th ## Supported Failure Types -The table lists the failure types that actually take effect per environment: `off`, `stuck`, `wrong` (`ok` is not listed, but clears an active injection on all environments). +The table lists the failure types that actually take effect per environment: `off`, `stuck`, `wrong`, `garbage`, `drift` (`ok` is not listed, but clears an active injection in all environments). A `—` means the module still accepts the command, but no consumer applies it in that environment. -| Component | [Gazebo] (gz) | [SIH] | `simulator_mavlink` (Gazebo Classic) | 硬件 | -| ----------------- | ----------------------- | ----------------------- | ------------------------------------------------------- | ----------------------- | -| `gyro` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | -| `accel` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | -| `mag` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | -| `baro` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | -| `distance_sensor` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | -| `gps` | `off`, `stuck`, `wrong` | `off`, `stuck`, `wrong` | `off`, `stuck`, `wrong` | `off`, `stuck`, `wrong` | -| `airspeed` | `off`, `stuck`, `wrong` | — | `off`, `wrong` | — | -| `vio` | `off`, `stuck` | — | `off` | — | -| `battery` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` | -| `traffic` | `off` | `off` | `off` | `off` | -| `motor` | `off`, `wrong` | `off`, `stuck`, `wrong` | `off`, `wrong` | `off`, `wrong` | -| `esc` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` | -| `can` | — | — | — | `off` | +| Component | [Gazebo] (gz) | [SIH] | `simulator_mavlink` (Gazebo Classic) | 硬件 | +| ----------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------------------- | ------------------------------------------- | +| `gyro` | `off`, `stuck`, `wrong`, `garbage`, `drift` | `off`, `stuck`, `wrong`, `garbage`, `drift` | `off`, `stuck`, `wrong`, `garbage`, `drift` | `off`, `stuck`, `wrong`, `garbage`, `drift` | +| `accel` | `off`, `stuck`, `wrong`, `garbage`, `drift` | `off`, `stuck`, `wrong`, `garbage`, `drift` | `off`, `stuck`, `wrong`, `garbage`, `drift` | `off`, `stuck`, `wrong`, `garbage`, `drift` | +| `mag` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | +| `baro` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | +| `distance_sensor` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | `off`, `stuck` | +| `gps` | `off`, `stuck`, `wrong` | `off`, `stuck`, `wrong` | `off`, `stuck`, `wrong` | `off`, `stuck`, `wrong` | +| `airspeed` | `off`, `stuck`, `wrong` | — | `off`, `wrong` | — | +| `vio` | `off`, `stuck` | — | `off` | — | +| `battery` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` | +| `traffic` | `off` | `off` | `off` | `off` | +| `motor` | `off`, `wrong` | `off`, `stuck`, `wrong` | `off`, `wrong` | `off`, `wrong` | +| `esc` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` | `off`, `wrong` | +| `can` | — | — | — | `off` | [SIH]: ../sim_sih/index.md [Gazebo]: ../sim_gazebo_gz/index.md @@ -36,6 +36,7 @@ A `—` means the module still accepts the command, but no consumer applies it i ::: info - `gps off | stuck | wrong` on Gazebo (Gz): applied to the GNSS data from the simulator's own sensor as well as to the simulated-GPS module ([SIM_GZ_EN_GPS](../advanced_config/parameter_reference.md#SIM_GZ_EN_GPS) `0`). +- `gyro wrong | garbage | drift` and `accel wrong | garbage | drift` corrupt the addressed sensor's samples on all three axes: `wrong` adds a constant bias ([SYS_FAIL_G_BIAS](../advanced_config/parameter_reference.md#SYS_FAIL_G_BIAS) / [SYS_FAIL_A_BIAS](../advanced_config/parameter_reference.md#SYS_FAIL_A_BIAS)), `garbage` adds uniform noise within ±[SYS_FAIL_G_NOISE](../advanced_config/parameter_reference.md#SYS_FAIL_G_NOISE) / ±[SYS_FAIL_A_NOISE](../advanced_config/parameter_reference.md#SYS_FAIL_A_NOISE), and `drift` adds a bias that grows by [SYS_FAIL_G_DRIFT](../advanced_config/parameter_reference.md#SYS_FAIL_G_DRIFT) / [SYS_FAIL_A_DRIFT](../advanced_config/parameter_reference.md#SYS_FAIL_A_DRIFT) per second since injection. - `airspeed off | stuck | wrong` on Gazebo (Gz): only injectable when airspeed is provided by the simulated-airspeed module ([SENS_EN_ARSPDSIM](../advanced_config/parameter_reference.md#SENS_EN_ARSPDSIM)); worlds that model an airspeed sensor directly are not injected. - `vio off | stuck` on Gazebo (Gz): applied to the external-vision odometry that the bridge publishes from the model's odometry topic (for example `x500_vision`); `stuck` keeps publishing the last good sample with fresh timestamps. - `battery wrong` reports the remaining charge just below the [SYS_FAIL_BAT_LVL](../advanced_config/parameter_reference.md#SYS_FAIL_BAT_LVL) warning threshold to trigger the battery failsafe; `off` stops publishing the battery status entirely. @@ -51,6 +52,7 @@ A `—` means the module still accepts the command, but no consumer applies it i ::: Sensors delivered through the shared driver layer (IMU, magnetometer, barometer, rangefinder via the `PX4*` sensor wrappers) support `off`/`stuck` in every environment that uses that layer — including the Gazebo and SIH sensor simulators, which feed synthesized measurements through the same wrappers. +The IMU (`gyro`, `accel`) also supports `wrong`/`garbage`/`drift` through the same layer. The remaining gaps are backend-specific: GPS and airspeed are handled by dedicated simulator code (see the GPS and airspeed notes in the info box above), SIH does not simulate an injectable airspeed. Components not listed (`optical_flow`, `servo`, `avoidance`, `rc_signal`, `mavlink_signal`) are rejected everywhere (`MAV_RESULT_UNSUPPORTED`); see the note below on NACK behaviour. @@ -102,14 +104,16 @@ where: - `off`: Stop publishing - `stuck`: Constantly report the same value, which _can_ happen on a malfunctioning sensor. For `motor` (SIH only), `stuck` stops the rotor while its ESC keeps reporting zero RPM. - - `garbage`: Publish random noise. This looks like reading uninitialized memory + - `garbage`: Publish random noise (which looks like reading uninitialised memory). For `gyro`/`accel` the noise is instead added to the real measurement. - `wrong`: Publish invalid values that still look reasonable/aren't "garbage". For an actuator such as `motor` there is nothing to publish, so `wrong` means the motor stops without anything reporting it - `slow`: Publish at a reduced rate - `delayed`: Publish valid data with a significant delay - `intermittent`: Publish intermittently + - `drift`: Publish values that drift increasingly away from the true value - _instance number_ (optional): Instance number of affected sensor. 0 (default) indicates all sensors of specified type. -- _instance bitmask_ (optional): address several instances at once (bit 0 = first instance, bit 1 = second, …; decimal or `0x` hex). Used only when `-i` is omitted. +- _instance bitmask_ (optional): + address several instances at once (bit 0 = first instance, bit 1 = second, …; decimal or `0x` hex). Used only when `-i` is omitted. Example: `-m 0x5` targets instances 1 and 3. :::info @@ -119,6 +123,8 @@ GPS implements only the `off`, `stuck`, and `wrong` failure modes; the other fai ## RC Switch Trigger + + A failure can also be injected from an RC switch, without a console or telemetry link. This is useful for in-flight hardware testing. It is configured with the following parameters: - [SYS_FAIL_RC_SRC](../advanced_config/parameter_reference.md#SYS_FAIL_RC_SRC): the auxiliary RC input that triggers the failure — `0` disables it, `1`–`6` select AUX1–AUX6 (mapped via `RC_MAP_AUXn`). diff --git a/docs/zh/flight_controller/autopilot_manufacturer_supported.md b/docs/zh/flight_controller/autopilot_manufacturer_supported.md index b3856cc5295..d58605fd38e 100644 --- a/docs/zh/flight_controller/autopilot_manufacturer_supported.md +++ b/docs/zh/flight_controller/autopilot_manufacturer_supported.md @@ -28,6 +28,7 @@ The boards in this category are: - [ARK Electronics ARKV6S](../flight_controller/ark_v6s.md) - [ARK FPV Flight Controller](../flight_controller/ark_fpv.md) - [ARK Pi6X Flow Flight Controller](../flight_controller/ark_pi6x.md) +- [Avian Automata 305AP](../flight_controller/avianautomata_305ap.md) - [CBUnmanned H753-SOM](../flight_controller/cbunmanned_h753-som.md) - [CORVON 743v1](../flight_controller/corvon_743v1.md) - [CORVON 743v2](../flight_controller/corvon_743v2.md) diff --git a/docs/zh/flight_controller/avianautomata_305ap.md b/docs/zh/flight_controller/avianautomata_305ap.md new file mode 100644 index 00000000000..830dacfdfec --- /dev/null +++ b/docs/zh/flight_controller/avianautomata_305ap.md @@ -0,0 +1,300 @@ +# Avian Automata 305AP + + + +:::warning +PX4 does not manufacture this (or any) autopilot. +Contact the [manufacturer](https://docs.avianautomata.com) for hardware support or compliance issues. +::: + +The [305AP](https://www.avianautomata.com/products/305ap) is a compact flight controller designed by [Avian Automata](https://www.avianautomata.com/). +It is built around the STM32H743 processor with two IMU slots, an onboard barometer and magnetometer, two CAN buses, and eight motor outputs. + +![Avian Automata 305AP](../../assets/flight_controller/avianautomata_305ap/305ap.webp) + +:::info +This flight controller is [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md). +::: + +## Specifications {#specifications} + +### Processor {#processor} + +- **Main FMU processor:** [STM32H743VIH6](https://www.st.com/en/microcontrollers-microprocessors/stm32h743vi.html) (32-bit Arm® Cortex®-M7, 480 MHz, 2 MB flash, 1 MB RAM) + +### Sensors {#sensors} + +- **IMU:** 2 slots (SPI2, SPI3), each fitted with either an [ST LSM6DSV16X](https://www.st.com/en/mems-and-sensors/lsm6dsv16x.html) or a [TDK InvenSense ICM-45686](https://www.invensense.tdk.com/en-us/products/6-axis/icm-45686) (detected at boot) +- **Barometer:** [Bosch BMP581](https://www.bosch-sensortec.com/en/products/environmental-sensors/pressure-sensors/bmp581/) (SPI1) +- **Magnetometer:** [MEMSIC MMC5983MA](https://www.memsic.com/magnetometer-5) (I2C1) + +### Interfaces {#interfaces} + +- **PWM outputs:** 8, all supporting [DShot](../peripherals/dshot.md) +- **Serial ports:** 7 (`TELEM 1`, `TELEM 2`, `GPS`, `RC IN`, `VTX`, the debug console on `VTX`, and ESC telemetry on the `Motors` connector) +- **I2C buses:** 3 (I2C1 internal; I2C2 and I2C4 external, I2C4 on the `GPS` connector) +- **SPI buses:** 4, of which SPI4 is external with 2 chip selects +- **CAN buses:** 2 (FDCAN1, FDCAN2) +- **USB:** USB-C (USB 2.0 Full Speed) +- **RC input:** Yes +- **Parameter storage:** microSD card +- **SD card:** microSD slot +- **OSD:** MSP OSD on `VTX` + +### Electrical Data {#electrical_data} + +- **Input voltage:** 2S-6S (6.4 V to 25.2 V) +- **Power monitoring:** 1 analog battery voltage input, plus an analog current sense input (no onboard current shunt) +- **Power outputs:** regulated 5 V and 9 V (9 V at battery voltage on 2S) + +### Mechanical Data {#mechanical_data} + +- **Dimensions:** 36.5 mm x 36.5 mm +- **Weight:** 11 g (with microSD card) +- **Mounting hole spacing:** 30.5 mm x 30.5 mm, M4 holes sized for M3 rubber vibration isolators + +## Where to Buy {#store} + +Order from the [Avian Automata store](https://www.avianautomata.com/products/305ap). + +## Block Diagram + +![305AP block diagram](../../assets/flight_controller/avianautomata_305ap/305ap_block_diagram.svg) + +## Pinouts {#pinouts} + +All connectors are JST-GH. +Pin 1 is marked on each connector housing. + +### Power (CN1) + +| 针脚 | 信号 | +| --- | ------- | +| 1-3 | VBAT_IN | +| 4-6 | GND | + +### TELEM 1 (CN2) and TELEM 2 (CN3) + +| 针脚 | 信号 | TELEM 1 (UART4) | TELEM 2 (UART7) | +| -- | ---- | --------------- | --------------- | +| 1 | +5V | | | +| 2 | TX | PA0 | PE8 | +| 3 | RX | PA1 | PE7 | +| 4 | CTS | PB0 | PE10 | +| 5 | RTS: | PB14 | PE9 | +| 6 | GND | | | + +### GPS (CN4) + +This is a 6-pin port, not the 10-pin Pixhawk GPS port. + +| 针脚 | 信号 | MCU | +| -- | -------- | ---- | +| 1 | +5V | | +| 2 | UART TX | PC6 | +| 3 | UART RX | PC7 | +| 4 | I2C4 SCL | PD12 | +| 5 | I2C4 SDA | PD13 | +| 6 | GND | | + +### CAN 1 (U18) and CAN 2 (U19) + +| 针脚 | 信号 | +| -- | ----- | +| 1 | +5V | +| 2 | CAN_H | +| 3 | CAN_L | +| 4 | GND | + +### External I2C (U20) + +| 针脚 | 信号 | MCU | +| -- | -------- | ---- | +| 1 | +5V | | +| 2 | I2C2 SCL | PB10 | +| 3 | I2C2 SDA | PB11 | +| 4 | GND | | + +### External SPI (CN7) + +| 针脚 | 信号 | MCU | +| -- | --------- | ---- | +| 1 | +5V | | +| 2 | SPI4 SCK | PE2 | +| 3 | SPI4 MISO | PE13 | +| 4 | SPI4 MOSI | PE6 | +| 5 | CS1 | PC13 | +| 6 | CS2 | PC14 | +| 7 | GND | | + +The firmware includes the [MS5611](../modules/modules_driver_baro.md#ms5611) barometer and [PMW3901](../sensor/pmw3901.md) optical flow drivers for sensors on this port, but doesn't start them. +To use one, start it from [extras.txt](../concept/system_startup.md#starting-additional-applications-extras-txt) on the SD card, for example `ms5611 -S -b 1 -c 2 start` for an MS5611 on `CS2`. + +### Motors (U21) + +| 针脚 | 信号 | MCU | Timer | +| -- | ------------- | ---- | -------- | +| 1 | +5V | | | +| 2 | Current sense | PC3 | | +| 3 | ESC telemetry | PA9 | | +| 4 | Motor 1 | PA8 | TIM1 CH1 | +| 5 | Motor 2 | PE11 | TIM1 CH2 | +| 6 | Motor 3 | PA15 | TIM2 CH1 | +| 7 | Motor 4 | PA2 | TIM2 CH3 | +| 8 | Motor 5 | PA7 | TIM3 CH2 | +| 9 | Motor 6 | PB1 | TIM3 CH4 | +| 10 | Motor 7 | PB7 | TIM4 CH2 | +| 11 | Motor 8 | PD14 | TIM4 CH3 | +| 12 | GND | | | + +### VTX (CN6) + +| 针脚 | 信号 | MCU | +| -- | -------- | --- | +| 1 | +9V | | +| 2 | GND | | +| 3 | UART TX | PD5 | +| 4 | UART RX | PD6 | +| 5 | GND | | +| 6 | SBUS out | PD8 | + +### RC IN (U22) + +| 针脚 | 信号 | MCU | +| -- | ----- | ---- | +| 1 | +5V | | +| 2 | RC_IN | PB13 | +| 3 | GND | | + +## Power {#power} + +The board is powered from the battery on the 6-pin JST-GH `Power` connector (2S-6S), or from USB-C. +The board has no power-enable GPIOs: every rail, sensor and peripheral is powered whenever the board has power, except the 9 V rail, which needs battery power. + +Battery monitoring is analog. +The board measures battery voltage with a 10k/1k divider ([BAT1_V_DIV](../advanced_config/parameter_reference.md#BAT1_V_DIV) defaults to `11.0`). +There is no onboard current shunt. +To measure current, connect an external sensor to the current sense pin on the `Motors` connector and set [BAT1_A_PER_V](../advanced_config/parameter_reference.md#BAT1_A_PER_V), which defaults to `0` (see [Amps per volt](../config/battery.md#current_divider)). +See [Battery and Power Module Setup](../config/battery.md) for configuration. + +The board can't sense its 5 V rail or detect USB VBUS, so the arming power-supply check is disabled ([CBRK_SUPPLY_CHK](../advanced_config/parameter_reference.md#CBRK_SUPPLY_CHK) defaults to `894281`). + +## Voltage Ratings {#voltage_ratings} + +- `Power` input: 2S-6S, 6.4 V to 25.2 V (35 V DC absolute maximum) +- USB input: 5 V nominal (5.5 V recommended maximum, 6 V absolute maximum) + +## PWM Outputs {#pwm_outputs} + +The 8 outputs are in 4 groups: + +- Outputs 1-2 in group 1 (TIM1) +- Outputs 3-4 in group 2 (TIM2) +- Outputs 5-6 in group 3 (TIM3) +- Outputs 7-8 in group 4 (TIM4) + +All outputs support PWM and [DShot](../peripherals/dshot.md), and default to DShot300 ([PWM_MAIN_TIM0](../advanced_config/parameter_reference.md#PWM_MAIN_TIM0) to `PWM_MAIN_TIM3` = `-4`). +The firmware also supports [bidirectional DShot](../peripherals/dshot.md#bidirectional-dshot-telemetry) on all outputs, but it hasn't yet been verified on this board. +All outputs in a group must use the same protocol and rate. + +## SD Card (Optional) {#sd_card} + +The board has a push-push microSD card slot on the bottom. +Parameters are stored on the card, so they can't be saved without one. +For information about choosing and using an SD card see [SD Cards (Removable Memory)](../getting_started/px4_basic_concepts.md#sd-cards-removable-memory). + +## Serial Port Mapping {#serial_port_mapping} + +| UART | 设备 | Port | Connector | Flow Control | +| ------ | ------------ | ------------------ | ---------------------- | ------------ | +| USART1 | `/dev/ttyS0` | ESC telemetry | `Motors` (pin 3) | | +| USART2 | `/dev/ttyS1` | `TELEM 3` | `VTX` | | +| USART3 | `/dev/ttyS2` | 调试控制台 | `VTX` (`SBUS out` pin) | | +| UART4 | `/dev/ttyS3` | `TELEM 1` | `TELEM 1` | Yes | +| UART5 | `/dev/ttyS4` | `Radio Controller` | `RC IN` | | +| USART6 | `/dev/ttyS5` | `GPS 1` | `GPS` | | +| UART7 | `/dev/ttyS6` | `TELEM 2` | `TELEM 2` | Yes | + +[ESC telemetry](../peripherals/dshot.md#esc-telemetry) from `Motors` pin 3 (USART1) is enabled by default, so leave [DSHOT_TEL_CFG](../advanced_config/parameter_reference.md#DSHOT_TEL_CFG) at `Disabled`. + +:::info +The bootloader enables no UART, so firmware can only be flashed over USB. +::: + +## Assembly {#assembly} + +### Radio Control {#radio_control} + +A remote control (RC) radio system is required if you want to manually control your vehicle (PX4 does not require a radio system for autonomous flight modes). +You will need to [select a compatible transmitter/receiver](../getting_started/rc_transmitter_receiver.md) and then bind them so that they communicate. + +Connect the receiver to the 3-pin JST-GH `RC IN` connector, a single-wire port on the FMU (UART5, `/dev/ttyS4`). + +- S.BUS, DSM, SUMD, ST24, [CRSF](../telemetry/crsf_telemetry.md) and GHST receivers are detected automatically, with no configuration ([RC_INPUT_PROTO](../advanced_config/parameter_reference.md#RC_INPUT_PROTO) = `Auto`). +- PPM receivers are not supported, so PWM receivers can't be connected through a PPM encoder either. +- DSM receivers can't be bound from _QGroundControl_ on this board: bind them before connecting. +- CRSF telemetry back to the transmitter needs a full-duplex port, so connect those receivers to `TELEM 1` or `TELEM 2` instead. + Set [RC_CRSF_PRT_CFG](../advanced_config/parameter_reference.md#RC_CRSF_PRT_CFG) to that port and [RC_CRSF_TEL_EN](../advanced_config/parameter_reference.md#RC_CRSF_TEL_EN) to `1`, then reboot. + On `TELEM 1`, also set [MAV_0_CONFIG](../advanced_config/parameter_reference.md#MAV_0_CONFIG) to `Disabled`, since MAVLink uses it by default. + +The DSM, GHST and S.BUS drivers can also be run on another serial port, using [RC_DSM_PRT_CFG](../advanced_config/parameter_reference.md#RC_DSM_PRT_CFG), [RC_GHST_PRT_CFG](../advanced_config/parameter_reference.md#RC_GHST_PRT_CFG) or [RC_SBUS_PRT_CFG](../advanced_config/parameter_reference.md#RC_SBUS_PRT_CFG). +Only one protocol can be active on a port. + +### GPS & Compass {#gps_compass} + +The 6-pin JST-GH `GPS` connector carries GPS (USART6) and I2C (I2C4) for the compass in a GPS module. +It has no safety switch, buzzer or LED signals. + +The board has an onboard MMC5983MA magnetometer. +The `+5V` pins on all connectors come from the board's 5 V rail, so a load on them that varies in flight (servos, a companion computer, a video transmitter) can upset the onboard compass. +On such vehicles, use an [external compass](../gps_compass/magnetometer.md) in a GPS module. +See [Mounting a GPS/Compass](../assembly/mount_gps_compass.md) for more information. + +### Telemetry Radios (Optional) {#telemetry} + +The board has two [telemetry](../telemetry/index.md) ports, `TELEM 1` and `TELEM 2`, each a 6-pin JST-GH connector with flow control. +A telemetry radio connected to `TELEM 1` needs no further configuration. + +### CAN {#can} + +The board has two CAN ports, `CAN 1` and `CAN 2`, each a 4-pin JST-GH connector, for [DroneCAN](../dronecan/index.md) peripherals. +Both buses are fully terminated on the board, so do not add external termination. + +DroneCAN is not enabled by default: set [UAVCAN_ENABLE](../advanced_config/parameter_reference.md#UAVCAN_ENABLE) to enable it. + +### OSD {#osd} + +Connect the video transmitter to the 6-pin JST-GH `VTX` connector, which carries 9 V power, a UART (USART2) and the `SBUS out` pin. +[MSP OSD](../peripherals/osd.md) runs on this UART (`TELEM 3`) by default, at 115200 baud ([MSP_OSD_CONFIG](../advanced_config/parameter_reference.md#MSP_OSD_CONFIG) = `TELEM 3`, [SER_TEL3_BAUD](../advanced_config/parameter_reference.md#SER_TEL3_BAUD) = `115200`). +The 9 V rail is only available when the board is powered from the battery, and runs at battery voltage on 2S. + +:::warning +Pin 6 (`SBUS out`) carries the PX4 System Console output. +If your air unit's cable has an SBUS wire, leave it unconnected. +::: + +## Building Firmware {#building_firmware} + +:::tip +From PX4 v2.0, most users will not need to build this firmware! +It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected. +::: + +To [build PX4](../dev_setup/building_px4.md) for this target: + +```sh +make avianautomata_305ap_default +``` + +The board also has a rover build variant: `avianautomata_305ap_rover`. + +## Debug Port {#debug_port} + +The FMU's [PX4 System Console](../debug/system_console.md) output is on USART3 TX (PD8) at 57600 baud, the `SBUS out` pin of the `VTX` connector. +The port is transmit-only, so use the [MAVLink Shell](../debug/mavlink_shell.md) over USB for an interactive console. + +The [SWD interface](../debug/swd_debug.md) isn't brought out: its pins (PA13 and PA14) are used by the second IMU slot. + +## Further Information {#further_information} + +- [305AP documentation](https://docs.avianautomata.com/305ap/intro) diff --git a/docs/zh/flight_modes/offboard.md b/docs/zh/flight_modes/offboard.md index 97e0a591291..f91a45569fe 100644 --- a/docs/zh/flight_modes/offboard.md +++ b/docs/zh/flight_modes/offboard.md @@ -193,11 +193,11 @@ For fixed-wing offboard control, please refer to the [PX4 ROS 2 Interface Librar Rover modules must set the control mode using `OffboardControlMode` and use the appropriate messages to configure the corresponding setpoints. The approach is similar to other vehicle types, but the allowed control mode combinations and setpoints are different: -| Category | 用法 | Setpoints | -| -------------------------------------------------------------------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| (Recommended) [Rover Setpoints](#rover-setpoints) | General rover control | [SurfaceVehiclePositionSetpoint](../msg_docs/SurfaceVehiclePositionSetpoint.md), [SurfaceVehicleSpeedSetpoint](../msg_docs/SurfaceVehicleSpeedSetpoint.md), [SurfaceVehicleAttitudeSetpoint](../msg_docs/SurfaceVehicleAttitudeSetpoint.md), [SurfaceVehicleRateSetpoint](../msg_docs/SurfaceVehicleRateSetpoint.md), [RoverThrottleSetpoint](../msg_docs/RoverThrottleSetpoint.md), [SurfaceVehicleSteeringSetpoint](../msg_docs/SurfaceVehicleSteeringSetpoint.md) | -| [Actuator Setpoints](#actuator-setpoints) | Direct actuator control | [ActuatorMotors](../msg_docs/ActuatorMotors.md), [ActuatorServos](../msg_docs/ActuatorServos.md) | -| (Deprecated) [Trajectory Setpoint](#deprecated-trajectory-setpoint) | General vehicle control | [TrajectorySetpoint](../msg_docs/TrajectorySetpoint.md) | +| Category | 用法 | Setpoints | +| -------------------------------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| (Recommended) [Rover Setpoints](#rover-setpoints) | General rover control | [SurfaceVehiclePositionSetpoint](../msg_docs/SurfaceVehiclePositionSetpoint.md), [SurfaceVehicleSpeedSetpoint](../msg_docs/SurfaceVehicleSpeedSetpoint.md), [SurfaceVehicleAttitudeSetpoint](../msg_docs/SurfaceVehicleAttitudeSetpoint.md), [SurfaceVehicleRateSetpoint](../msg_docs/SurfaceVehicleRateSetpoint.md), [SurfaceVehicleThrustSetpoint](../msg_docs/SurfaceVehicleThrustSetpoint.md), [SurfaceVehicleSteeringSetpoint](../msg_docs/SurfaceVehicleSteeringSetpoint.md) | +| [Actuator Setpoints](#actuator-setpoints) | Direct actuator control | [ActuatorMotors](../msg_docs/ActuatorMotors.md), [ActuatorServos](../msg_docs/ActuatorServos.md) | +| (Deprecated) [Trajectory Setpoint](#deprecated-trajectory-setpoint) | General vehicle control | [TrajectorySetpoint](../msg_docs/TrajectorySetpoint.md) | #### Rover 设置点 @@ -208,22 +208,23 @@ The approach is similar to other vehicle types, but the allowed control mode com The "highest" setpoint that is provided will be used within the PX4 rover modules to generate the setpoints that are below it (overriding them!). 这个层次结构有提供有效控制输入的明确规则: -- Provide a position setpoint **or** -- “左”上的设置点之一(速度 **或** 节点) **和** “右”上的设置点之一(态度、速率 **或** 节点)。所有“左”和“右”设置点的组合都是有效的。 +- Provide a position setpoint, or +- One of the setpoints on the "left" (speed or thrust) and one of the setpoints on the "right" (attitude, rate or steering). + 所有“左”和“右”设置点的组合都是有效的。 The following are all valid setpoint combinations and their respective control flags that must be set through [OffboardControlMode](../msg_docs/OffboardControlMode.md) (set all others to _false_). Additionally, for some combinations we require certain setpoints to be published with `NAN` values so that the setpoints of interest are not overridden by the rover module (due to the hierarchy above). ✓ are the relevant setpoints we publish, and ✗ are the setpoint that need to be published with `NAN` values. -| Setpoint Combination | Control Flag | [SurfaceVehiclePositionSetpoint](../msg_docs/SurfaceVehiclePositionSetpoint.md) | [SurfaceVehicleSpeedSetpoint](../msg_docs/SurfaceVehicleSpeedSetpoint.md) | [RoverThrottleSetpoint](../msg_docs/RoverThrottleSetpoint.md) | [SurfaceVehicleAttitudeSetpoint](../msg_docs/SurfaceVehicleAttitudeSetpoint.md) | [SurfaceVehicleRateSetpoint](../msg_docs/SurfaceVehicleRateSetpoint.md) | [SurfaceVehicleSteeringSetpoint](../msg_docs/SurfaceVehicleSteeringSetpoint.md) | -| -------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| 安装位置 | position | ✓ | | | | | | -| Speed + Attitude | velocity | | ✓ | | ✓ | | | -| Speed + Rate | velocity | | ✓ | | ✗ | ✓ | | -| Speed + Steering | velocity | | ✓ | | ✗ | ✗ | ✓ | -| Throttle + Attitude | attitude | | | ✓ | ✓ | | | -| Throttle + Rate | body_rate | | | ✓ | | ✓ | | -| Throttle + Steering | thrust_and_torque | | | ✓ | | | ✓ | +| Setpoint Combination | Control Flag | [SurfaceVehiclePositionSetpoint](../msg_docs/SurfaceVehiclePositionSetpoint.md) | [SurfaceVehicleSpeedSetpoint](../msg_docs/SurfaceVehicleSpeedSetpoint.md) | [SurfaceVehicleThrustSetpoint](../msg_docs/SurfaceVehicleThrustSetpoint.md) | [SurfaceVehicleAttitudeSetpoint](../msg_docs/SurfaceVehicleAttitudeSetpoint.md) | [SurfaceVehicleRateSetpoint](../msg_docs/SurfaceVehicleRateSetpoint.md) | [SurfaceVehicleSteeringSetpoint](../msg_docs/SurfaceVehicleSteeringSetpoint.md) | +| -------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| 安装位置 | position | ✓ | | | | | | +| Speed + Attitude | velocity | | ✓ | | ✓ | | | +| Speed + Rate | velocity | | ✓ | | ✗ | ✓ | | +| Speed + Steering | velocity | | ✓ | | ✗ | ✗ | ✓ | +| Thrust + Attitude | attitude | | | ✓ | ✓ | | | +| Thrust + Rate | body_rate | | | ✓ | | ✓ | | +| Thrust + Steering | thrust_and_torque | | | ✓ | | | ✓ | :::info If you intend to use the rover setpoints, we recommend using the [PX4 ROS 2 Interface Library](../ros2/px4_ros2_interface_lib.md) instead since it simplifies the publishing of these setpoints. @@ -236,7 +237,7 @@ In [OffboardControlMode](../msg_docs/OffboardControlMode.md) set `direct_actuato :::info This bypasses the rover modules including any limits on steering rates or accelerations and the inverse kinematics step. -We recommend using [SurfaceVehicleSteeringSetpoint](../msg_docs/SurfaceVehicleSteeringSetpoint.md) and [RoverThrottleSetpoint](../msg_docs/RoverThrottleSetpoint.md) instead for low level control (see [Rover Setpoints](#rover-setpoints)). +We recommend using [SurfaceVehicleSteeringSetpoint](../msg_docs/SurfaceVehicleSteeringSetpoint.md) and [SurfaceVehicleThrustSetpoint](../msg_docs/SurfaceVehicleThrustSetpoint.md) instead for low-level control (see [Rover Setpoints](#rover-setpoints)). ::: #### (Deprecated) Trajectory Setpoint diff --git a/docs/zh/flight_modes_fw/mission.md b/docs/zh/flight_modes_fw/mission.md index 7ad76fa2f23..051f0e71de5 100644 --- a/docs/zh/flight_modes_fw/mission.md +++ b/docs/zh/flight_modes_fw/mission.md @@ -155,8 +155,10 @@ Mission Items: - [MAV_CMD_DO_JUMP](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_JUMP) - _Param1_ (sequence number) must refer to an earlier mission item. A mission is rejected if a jump targets itself or a later item, even if its repeat count is 0. + It is also rejected if the items from the target reach a `DO_JUMP` before a waypoint, the jump itself included, even if its repeat count is 0: a jump cannot target another jump, and a loop needs a waypoint. - _Param2_ (repeat count) must be from 0 to 65535. A mission with a negative or larger repeat count is rejected. + - Up to 9 `DO_JUMP` items in a row are supported: with more, the mission ends there once the first 9 have used up their repeats. - [MAV_CMD_NAV_ROI](https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_ROI) - [MAV_CMD_DO_SET_ROI](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_SET_ROI) - [MAV_CMD_DO_SET_ROI_LOCATION](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_SET_ROI_LOCATION) diff --git a/docs/zh/flight_modes_mc/mission.md b/docs/zh/flight_modes_mc/mission.md index 834a0f2e49d..55995394beb 100644 --- a/docs/zh/flight_modes_mc/mission.md +++ b/docs/zh/flight_modes_mc/mission.md @@ -157,8 +157,10 @@ Mission Items: - [MAV_CMD_DO_JUMP](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_JUMP) - _Param1_ (sequence number) must refer to an earlier mission item. A mission is rejected if a jump targets itself or a later item, even if its repeat count is 0. + It is also rejected if the items from the target reach a `DO_JUMP` before a waypoint, the jump itself included, even if its repeat count is 0: a jump cannot target another jump, and a loop needs a waypoint. - _Param2_ (repeat count) must be from 0 to 65535. A mission with a negative or larger repeat count is rejected. + - Up to 9 `DO_JUMP` items in a row are supported: with more, the mission ends there once the first 9 have used up their repeats. - [MAV_CMD_NAV_ROI](https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_ROI) - [MAV_CMD_DO_SET_ROI](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_SET_ROI) - [MAV_CMD_DO_SET_ROI_LOCATION](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_SET_ROI_LOCATION) diff --git a/docs/zh/flight_modes_rover/api.md b/docs/zh/flight_modes_rover/api.md index 1783ee93449..7124f1f1408 100644 --- a/docs/zh/flight_modes_rover/api.md +++ b/docs/zh/flight_modes_rover/api.md @@ -5,12 +5,12 @@ We specifically provide guides for using [ROS 2](../ros2/index.md) to interface | Method | 描述 | | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [PX4 ROS 2 Interface](#px4-ros-2-interface) (Recommended) | Register a custom mode and publish [RoverSetpointTypes](../ros2/px4_ros2_control_interface.md#rover-setpoints). | +| [PX4 ROS 2 Interface](#px4-ros-2-interface) (Recommended) | Register a custom mode and publish [rover SetpointTypes](../ros2/px4_ros2_control_interface.md#rover-setpoints). | | [ROS 2 Offboard Control](#ros-2-offboard-control) | Use the PX4 internal [Offboard Mode](../flight_modes/offboard.md) and publish messages defined in [dds_topics.yaml](../middleware/dds_topics.md). | ## PX4 ROS 2 Interface -We recommend the use of the [PX4 ROS 2 Interface Library](../ros2/px4_ros2_interface_lib.md) which allows you to register a custom drive mode and exposes [RoverSetpointTypes](../ros2/px4_ros2_control_interface.md#rover-setpoints). +We recommend the use of the [PX4 ROS 2 Interface Library](../ros2/px4_ros2_interface_lib.md) which allows you to register a custom drive mode and exposes [rover SetpointTypes](../ros2/px4_ros2_control_interface.md#rover-setpoints). By using these setpoints (instead of the PX4 internal rover setpoints), you are guaranteed to send valid control inputs to your vehicle and the control flags for the setpoints you are using are automatically set for you. Registering a custom drive mode instead of using [ROS 2 Offboard Control](#ros-2-offboard-control) additionally provides the advantages listed [here](../concept/flight_modes.md#internal-vs-external-modes). @@ -22,7 +22,7 @@ To get familiar with this method, read through the guide for the [PX4 ROS 2 Inte [ROS 2 Offboard Control](../ros2/offboard_control.md) uses the PX4 internal [Offboard Mode](../flight_modes/offboard.md). While you can subscribe/publish to all topics specified in [dds_topics.yaml](../middleware/dds_topics.md), not all rover modules support all of these topics (see [Supported Setpoints](../flight_modes/offboard.md#rover)). -Unlike the [RoverSetpointTypes](../ros2/px4_ros2_control_interface.md#rover-setpoints) exposed through the [PX4 ROS 2 Interface](#px4-ros-2-interface), there is no guarantee that the published setpoints lead to a valid control input. +Unlike the [rover SetpointTypes](../ros2/px4_ros2_control_interface.md#rover-setpoints) exposed through the [PX4 ROS 2 Interface](#px4-ros-2-interface), there is no guarantee that the published setpoints lead to a valid control input. In addition, the correct control mode flags must be set through [OffboardControlMode](../msg_docs/OffboardControlMode.md). This requires a deeper understanding of PX4 and the structure of the rover modules. diff --git a/docs/zh/flight_modes_rover/manual.md b/docs/zh/flight_modes_rover/manual.md index 39ac99b2524..4f3d2178d0d 100644 --- a/docs/zh/flight_modes_rover/manual.md +++ b/docs/zh/flight_modes_rover/manual.md @@ -6,11 +6,31 @@ Manual modes require stick inputs from the user to drive the vehicle. The sticks provide the same "high level" control effects over direction and rate of movement in all manual modes: -| Rover Type | Left stick up/down | Left stick left/right | Right stick left/right | -| ------------ | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Ackermann | Drive the rover forwards/backwards (controlling speed) | - | Make a left/right turn (controlling steering angle in [Manual mode](#manual-mode), and yaw rate in [Acro](#acro-mode), [Stabilized](#stabilized-mode) and [Position](#position-mode) modes). | -| Differential | Drive the rover forwards/backwards (controlling speed). | - | Make a left/right turn (controlling speed difference in [Manual mode](#manual-mode), and yaw rate in [Acro](#acro-mode), [Stabilized](#stabilized-mode) and [Position](#position-mode) modes). | -| Mecanum | Drive the rover forwards/backwards (controlling speed) | Make a left/right turn (controlling speed difference in [Manual mode](#manual-mode), and yaw rate in [Acro](#acro-mode), [Stabilized](#stabilized-mode) and [Position](#position-mode) modes). | Drive the rover left/right (controlling speed). | +| Rover Type | Left stick up/down | Left stick left/right | Right stick left/right | +| ------------ | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Ackermann | Drive the rover forwards/backwards (controlling speed) | - | Make a left/right turn (controlling steering angle in [Manual mode](#manual-mode), and yaw rate in [Acro](#acro-mode), [Stabilized](#stabilized-mode) and [Position](#position-mode) modes). | +| Differential | Drive the rover forwards/backwards (controlling speed). | - | Make a left/right turn (controlling speed difference in [Manual mode](#manual-mode), and yaw rate in [Acro](#acro-mode), [Stabilized](#stabilized-mode) and [Position](#position-mode) modes). | +| Mecanum | Drive the rover forwards/backwards (controlling speed) | Drive the rover left/right (controlling speed). | Make a left/right turn (controlling speed difference in [Manual mode](#manual-mode), and yaw rate in [Acro](#acro-mode), [Stabilized](#stabilized-mode) and [Position](#position-mode) modes). | + + + +:::tip +The sticks can be reassigned with [RO_STICK_MAP](../advanced_config/parameter_reference.md#RO_STICK_MAP). +Ackermann and differential rovers ignore the sideways ("drive left/right") assignment. + +The options follow the RC transmitter modes 1-4, with the pitch stick driving the rover forwards/backwards, the roll stick driving it left/right and the yaw stick turning it. +The table assumes the RC channels are mapped as for a mode 2 transmitter (throttle and yaw on the left stick). + +| `RO_STICK_MAP` | Left stick up/down | Left stick left/right | Right stick up/down | Right stick left/right | +| -------------------------------------- | ------------------ | --------------------- | ------------------- | ---------------------- | +| 1 (Mode 1) | Forwards/backwards | Turn left/right | - | Drive left/right | +| 2 (Mode 2) | - | Turn left/right | Forwards/backwards | Drive left/right | +| 3 (Mode 3, default) | Forwards/backwards | Drive left/right | - | Turn left/right | +| 4 (Mode 4) | - | Drive left/right | Forwards/backwards | Turn left/right | + +The tables on this page show the default mapping. +In the tank-style [Manual Parking mode](#manual-parking-mode) of differential and mecanum rovers only the left/right driving assignment applies. +::: The manual modes provide progressively increasing levels of autopilot support for maintaining a course, speed, and rate of turn, compensating for external factors such as slopes or uneven terrain. @@ -41,11 +61,11 @@ In this mode the stick inputs are directly mapped to motor commands. The rover does not attempt to maintain a specific orientation or compensate for external factors like slopes or uneven terrain! The user is responsible for making the necessary adjustments to the stick inputs to keep the rover on the desired course. -| Rover Type | Left stick up/down | Left stick left/right | Right stick left/right | -| ------------ | --------------------------------------------------- | ------------------------------------------------ | ---------------------------------------------------------- | -| Ackermann | Drive the rover forwards/backwards. | - | Move the steering angle to the left/right. | -| Differential | Drive the rover forwards/backwards. | - | Yaw the rover to the left/right. | -| Mecanum | Drive the rover forwards/backwards. | Yaw the rover to the left/right. | Drive the rover left/right | +| Rover Type | Left stick up/down | Left stick left/right | Right stick left/right | +| ------------ | --------------------------------------------------- | -------------------------- | ---------------------------------------------------------- | +| Ackermann | Drive the rover forwards/backwards. | - | Move the steering angle to the left/right. | +| Differential | Drive the rover forwards/backwards. | - | Yaw the rover to the left/right. | +| Mecanum | Drive the rover forwards/backwards. | Drive the rover left/right | Yaw the rover to the left/right. | For the configuration/tuning of this mode see [Basic Setup](../config_rover/basic_setup.md). @@ -57,11 +77,11 @@ This mode requires a yaw rate measurement. In this mode the vehicle regulates its yaw rate to a setpoint (but does not stabilize heading or regulate speed). -| Rover Type | Left stick up/down | Left stick left/right | Right stick left/right | -| ------------ | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Ackermann | Drive the rover forwards/backwards. | - | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will attempt to maintain a zero yaw rate (minimal disturbance rejection). | -| Differential | Drive the rover forwards/backwards. | - | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will attempt to maintain a zero yaw rate (minimal disturbance rejection) | -| Mecanum | Drive the rover forwards/backwards. | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will attempt to maintain a zero yaw rate (minimal disturbance rejection) | Drive the rover left/right | +| Rover Type | Left stick up/down | Left stick left/right | Right stick left/right | +| ------------ | --------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Ackermann | Drive the rover forwards/backwards. | - | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will attempt to maintain a zero yaw rate (minimal disturbance rejection). | +| Differential | Drive the rover forwards/backwards. | - | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will attempt to maintain a zero yaw rate (minimal disturbance rejection) | +| Mecanum | Drive the rover forwards/backwards. | Drive the rover left/right | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will attempt to maintain a zero yaw rate (minimal disturbance rejection) | For the configuration/tuning of this mode see [Rate tuning](../config_rover/rate_tuning.md). @@ -74,11 +94,11 @@ This mode requires a yaw rate and yaw estimate. In this mode the vehicle regulates its yaw rate to a setpoint and will maintain its heading if this setpoint is zero (but does not regulate speed). Compared to [Acro mode](#acro-mode), this mode is much better at driving in a straight line as it can more effectively reject disturbances. -| Rover Type | Left stick up/down | Left stick left/right | Right stick left/right | -| ------------ | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Ackermann | Drive the rover forwards/backwards. | - | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will maintain the current yaw. | -| Differential | Drive the rover forwards/backwards. | - | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will maintain the current yaw. | -| Mecanum | Drive the rover forwards/backwards. | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will maintain the current yaw. | Drive the rover left/right | +| Rover Type | Left stick up/down | Left stick left/right | Right stick left/right | +| ------------ | --------------------------------------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Ackermann | Drive the rover forwards/backwards. | - | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will maintain the current yaw. | +| Differential | Drive the rover forwards/backwards. | - | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will maintain the current yaw. | +| Mecanum | Drive the rover forwards/backwards. | Drive the rover left/right | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will maintain the current yaw. | For the configuration/tuning of this mode see [Attitude tuning](../config_rover/attitude_tuning.md). @@ -93,11 +113,11 @@ The vehicle regulates its yaw rate and speed to a setpoint. If the yaw rate setpoint is zero, the controller will remember the GPS coordinates and yaw (heading) of the vehicle and use those to construct a line that the rover will then follow (course control). This offers the highest amount of disturbance rejection, which leads to the best straight line driving behavior. -| Rover Type | Left stick up/down | Left stick left/right | Right stick left/right | -| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Ackermann | Stick position sets a forward/back speed setpoint. The vehicle attempts to maintain this speed on slopes etc. | - | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will maintain the course of the rover. | -| Differential | Stick position sets a forward/back speed setpoint. The vehicle attempts to maintain this speed on slopes etc. | - | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will maintain the course of the rover. | -| Mecanum | Stick position sets a forward/back speed setpoint. The vehicle attempts to maintain this speed on slopes etc. | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will maintain the course of the rover. | Stick position sets a left/right speed setpoint. The vehicle attempts to maintain this speed on slopes etc. | +| Rover Type | Left stick up/down | Left stick left/right | Right stick left/right | +| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Ackermann | Stick position sets a forward/back speed setpoint. The vehicle attempts to maintain this speed on slopes etc. | - | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will maintain the course of the rover. | +| Differential | Stick position sets a forward/back speed setpoint. The vehicle attempts to maintain this speed on slopes etc. | - | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will maintain the course of the rover. | +| Mecanum | Stick position sets a forward/back speed setpoint. The vehicle attempts to maintain this speed on slopes etc. | Stick position sets a left/right speed setpoint. The vehicle attempts to maintain this speed on slopes etc. | Create a yaw rate setpoint for the control system to regulate. If this input is zero the control system will maintain the course of the rover. | For the configuration/tuning of this mode see [Velocity tuning](../config_rover/velocity_tuning.md). @@ -111,11 +131,11 @@ Pushing both sticks in the same direction drives straight, pushing them in oppos Ackermann vehicles are controlled in the same way as they are in manual mode, but with reduced throttle. -| Rover Type | Left stick up/down | Right stick up/down | Right stick left/right | -| ------------ | -------------------------------------------------------------- | ---------------------------------------------------------- | ----------------------------------------------------------------------- | -| Ackermann | Drive the rover forwards/backwards (slowly) | - | Move the steering angle to the left/right. | -| Differential | Drive the left motor forwards/backwards. | Drive the right motor forwards/backwards. | - | -| Mecanum | Drive the left motors forwards/backwards. | Drive the right motors forwards/backwards. | Drive the rover left/right (slowly). | +| Rover Type | Left stick up/down | Left stick left/right | Right stick up/down | Right stick left/right | +| ------------ | -------------------------------------------------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| Ackermann | Drive the rover forwards/backwards (slowly) | - | - | Move the steering angle to the left/right. | +| Differential | Drive the left motor forwards/backwards. | - | Drive the right motor forwards/backwards. | - | +| Mecanum | Drive the left motors forwards/backwards. | Drive the rover left/right (slowly). | Drive the right motors forwards/backwards. | - | :::info This mode has to be assigned to a flight mode switch (see [Flight Mode Configuration](../config/flight_mode.md)) or selected via the ground station. diff --git a/docs/zh/middleware/dds_topics.md b/docs/zh/middleware/dds_topics.md index 81476c4e3fd..0d0aa1c075b 100644 --- a/docs/zh/middleware/dds_topics.md +++ b/docs/zh/middleware/dds_topics.md @@ -42,6 +42,7 @@ This document shows a markdown-rendered version of [dds_topics.yaml](https://git | `/fmu/out/vehicle_status` | [px4_msgs::msg::VehicleStatus](../msg_docs/VehicleStatus.md) | 5.0 | | `/fmu/out/vtol_vehicle_status` | [px4_msgs::msg::VtolVehicleStatus](../msg_docs/VtolVehicleStatus.md) | | | `/fmu/out/vtx` | [px4_msgs::msg::Vtx](../msg_docs/Vtx.md) | 1.0 | +| `/fmu/out/wheel_encoders` | [px4_msgs::msg::WheelEncoders](../msg_docs/WheelEncoders.md) | 10.0 | | `/fmu/out/wind` | [px4_msgs::msg::Wind](../msg_docs/Wind.md) | 1.0 | ## Subscriptions @@ -66,7 +67,6 @@ This document shows a markdown-rendered version of [dds_topics.yaml](https://git | `/fmu/in/offboard_control_mode` | [px4_msgs::msg::OffboardControlMode](../msg_docs/OffboardControlMode.md) | | `/fmu/in/onboard_computer_status` | [px4_msgs::msg::OnboardComputerStatus](../msg_docs/OnboardComputerStatus.md) | | `/fmu/in/register_ext_component_request` | [px4_msgs::msg::RegisterExtComponentRequest](../msg_docs/RegisterExtComponentRequest.md) | -| `/fmu/in/rover_throttle_setpoint` | [px4_msgs::msg::RoverThrottleSetpoint](../msg_docs/RoverThrottleSetpoint.md) | | `/fmu/in/sensor_gnss` | [px4_msgs::msg::SensorGnss](../msg_docs/SensorGnss.md) | | `/fmu/in/sensor_optical_flow` | [px4_msgs::msg::SensorOpticalFlow](../msg_docs/SensorOpticalFlow.md) | | `/fmu/in/setpoint_config` | [px4_msgs::msg::SetpointConfig](../msg_docs/SetpointConfig.md) | @@ -76,6 +76,7 @@ This document shows a markdown-rendered version of [dds_topics.yaml](https://git | `/fmu/in/surface_vehicle_rate_setpoint` | [px4_msgs::msg::SurfaceVehicleRateSetpoint](../msg_docs/SurfaceVehicleRateSetpoint.md) | | `/fmu/in/surface_vehicle_speed_setpoint` | [px4_msgs::msg::SurfaceVehicleSpeedSetpoint](../msg_docs/SurfaceVehicleSpeedSetpoint.md) | | `/fmu/in/surface_vehicle_steering_setpoint` | [px4_msgs::msg::SurfaceVehicleSteeringSetpoint](../msg_docs/SurfaceVehicleSteeringSetpoint.md) | +| `/fmu/in/surface_vehicle_thrust_setpoint` | [px4_msgs::msg::SurfaceVehicleThrustSetpoint](../msg_docs/SurfaceVehicleThrustSetpoint.md) | | `/fmu/in/telemetry_status` | [px4_msgs::msg::TelemetryStatus](../msg_docs/TelemetryStatus.md) | | `/fmu/in/trajectory_setpoint` | [px4_msgs::msg::TrajectorySetpoint](../msg_docs/TrajectorySetpoint.md) | | `/fmu/in/unregister_ext_component` | [px4_msgs::msg::UnregisterExtComponent](../msg_docs/UnregisterExtComponent.md) | @@ -332,7 +333,6 @@ See messages - [VteInput](../msg_docs/VteInput.md) - [VteOrientation](../msg_docs/VteOrientation.md) - [VtePosition](../msg_docs/VtePosition.md) -- [WheelEncoders](../msg_docs/WheelEncoders.md) - [YawEstimatorStatus](../msg_docs/YawEstimatorStatus.md) ::: diff --git a/docs/zh/modules/modules_autotune.md b/docs/zh/modules/modules_autotune.md index da9b2bf6e72..77a50e3688c 100644 --- a/docs/zh/modules/modules_autotune.md +++ b/docs/zh/modules/modules_autotune.md @@ -1,5 +1,10 @@ # Modules Reference: Autotune +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## fw_autotune_attitude_control Source: [modules/fw_autotune_attitude_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/fw_autotune_attitude_control) diff --git a/docs/zh/modules/modules_command.md b/docs/zh/modules/modules_command.md index 57df60c16f2..bba5fb858b6 100644 --- a/docs/zh/modules/modules_command.md +++ b/docs/zh/modules/modules_command.md @@ -1,5 +1,10 @@ # 模块参考:命令(Command) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## actuator_test Source: [systemcmds/actuator_test](https://github.com/PX4/PX4-Autopilot/tree/main/src/systemcmds/actuator_test) diff --git a/docs/zh/modules/modules_communication.md b/docs/zh/modules/modules_communication.md index 60d3ebdd515..b1bca2d58cd 100644 --- a/docs/zh/modules/modules_communication.md +++ b/docs/zh/modules/modules_communication.md @@ -1,5 +1,10 @@ # 模块参考:通信(Communication) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## frsky_telemetry Source: [drivers/telemetry/frsky_telemetry](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/telemetry/frsky_telemetry) diff --git a/docs/zh/modules/modules_controller.md b/docs/zh/modules/modules_controller.md index 3723a16695f..052b3702686 100644 --- a/docs/zh/modules/modules_controller.md +++ b/docs/zh/modules/modules_controller.md @@ -1,5 +1,10 @@ # 模块参考:控制器 +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## fw_att_control Source: [modules/airship_att_control](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/airship_att_control) diff --git a/docs/zh/modules/modules_driver.md b/docs/zh/modules/modules_driver.md index 068a0aef7cd..e9e215f5b3e 100644 --- a/docs/zh/modules/modules_driver.md +++ b/docs/zh/modules/modules_driver.md @@ -1,5 +1,10 @@ # 模块参考:驱动 +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + 子分类 - [Adc](modules_driver_adc.md) @@ -1130,7 +1135,7 @@ px4io [arguments...] ## rgbled -Source: [drivers/lights/rgbled_ncp5623c](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/lights/rgbled_ncp5623c) +Source: [drivers/lights/rgbled](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/lights/rgbled) ### Usage {#rgbled_usage} @@ -1147,9 +1152,7 @@ rgbled [arguments...] [-f ] bus frequency in kHz [-q] quiet startup (no message if no device found) [-a ] I2C address - default: 57 - [-o ] RGB PWM Assignment - default: 123 + default: 85 stop diff --git a/docs/zh/modules/modules_driver_adc.md b/docs/zh/modules/modules_driver_adc.md index 307dbe6118d..56883553d67 100644 --- a/docs/zh/modules/modules_driver_adc.md +++ b/docs/zh/modules/modules_driver_adc.md @@ -1,5 +1,10 @@ # Modules Reference: Adc (Driver) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## ADS7128 Source: [drivers/adc/ads7128](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/adc/ads7128) diff --git a/docs/zh/modules/modules_driver_airspeed_sensor.md b/docs/zh/modules/modules_driver_airspeed_sensor.md index 24236f60aa4..569f42f4b68 100644 --- a/docs/zh/modules/modules_driver_airspeed_sensor.md +++ b/docs/zh/modules/modules_driver_airspeed_sensor.md @@ -1,5 +1,10 @@ # Modules Reference: Airspeed Sensor (Driver) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## asp5033 Source: [drivers/differential_pressure/asp5033](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/differential_pressure/asp5033) diff --git a/docs/zh/modules/modules_driver_baro.md b/docs/zh/modules/modules_driver_baro.md index 767c73da79a..50ec746ef6f 100644 --- a/docs/zh/modules/modules_driver_baro.md +++ b/docs/zh/modules/modules_driver_baro.md @@ -1,5 +1,10 @@ # Modules Reference: Baro (Driver) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## bmp280 Source: [drivers/barometer/bmp280](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer/bmp280) diff --git a/docs/zh/modules/modules_driver_camera.md b/docs/zh/modules/modules_driver_camera.md index 526dabcce8c..6da217b7236 100644 --- a/docs/zh/modules/modules_driver_camera.md +++ b/docs/zh/modules/modules_driver_camera.md @@ -1,5 +1,10 @@ # Modules Reference: Camera (Driver) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## camera_trigger Source: [drivers/camera_trigger](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/camera_trigger) diff --git a/docs/zh/modules/modules_driver_distance_sensor.md b/docs/zh/modules/modules_driver_distance_sensor.md index e8be54bd220..73fb862f898 100644 --- a/docs/zh/modules/modules_driver_distance_sensor.md +++ b/docs/zh/modules/modules_driver_distance_sensor.md @@ -1,5 +1,10 @@ # Modules Reference: Distance Sensor (Driver) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## afbrs50 Source: [drivers/distance_sensor/broadcom/afbrs50](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/broadcom/afbrs50) diff --git a/docs/zh/modules/modules_driver_imu.md b/docs/zh/modules/modules_driver_imu.md index 2af402ed9dc..76d77173bb7 100644 --- a/docs/zh/modules/modules_driver_imu.md +++ b/docs/zh/modules/modules_driver_imu.md @@ -1,5 +1,10 @@ # Modules Reference: Imu (Driver) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## adis16448 Source: [drivers/imu/analog_devices/adis16448](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/imu/analog_devices/adis16448) @@ -778,6 +783,34 @@ icm45686 [arguments...] status print status info ``` +## icm56686 + +Source: [drivers/imu/invensense/icm56686](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/imu/invensense/icm56686) + +### Usage {#icm56686_usage} + +``` +icm56686 [arguments...] + Commands: + start + [-s] Internal SPI bus(es) (onboard sensors; shared bus only if -b is + given) + [-S] External SPI bus (connector sensors, including shared buses) + [-b ] board-specific bus (default=all) (external SPI: n-th bus + (default=1)) + [-c ] chip-select pin (for internal SPI) or index (for external SPI) + [-m ] SPI mode + [-f ] bus frequency in kHz + [-q] quiet startup (no message if no device found) + [-R ] Rotation + default: 0 + [-2] Route the FIFO interrupt to INT2 instead of INT1 + + stop + + status print status info +``` + ## iim20670 Source: [drivers/imu/invensense/iim20670](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/imu/invensense/iim20670) diff --git a/docs/zh/modules/modules_driver_ins.md b/docs/zh/modules/modules_driver_ins.md index 664659dea44..558d53b77d2 100644 --- a/docs/zh/modules/modules_driver_ins.md +++ b/docs/zh/modules/modules_driver_ins.md @@ -1,5 +1,10 @@ # Modules Reference: Ins (Driver) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## MicroStrain Source: [drivers/ins/microstrain](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/ins/microstrain) diff --git a/docs/zh/modules/modules_driver_magnetometer.md b/docs/zh/modules/modules_driver_magnetometer.md index 1b775f3dae5..65f22e59a61 100644 --- a/docs/zh/modules/modules_driver_magnetometer.md +++ b/docs/zh/modules/modules_driver_magnetometer.md @@ -1,5 +1,10 @@ # Modules Reference: Magnetometer (Driver) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## af9838 Source: [drivers/magnetometer/voltafield/af9838](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/voltafield/af9838) diff --git a/docs/zh/modules/modules_driver_optical_flow.md b/docs/zh/modules/modules_driver_optical_flow.md index 097660a8e39..2b3c013b7bf 100644 --- a/docs/zh/modules/modules_driver_optical_flow.md +++ b/docs/zh/modules/modules_driver_optical_flow.md @@ -1,5 +1,10 @@ # Modules Reference: Optical Flow (Driver) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## thoneflow Source: [drivers/optical_flow/thoneflow](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/optical_flow/thoneflow) diff --git a/docs/zh/modules/modules_driver_radio_control.md b/docs/zh/modules/modules_driver_radio_control.md index fef2c414b28..99bcbf93c19 100644 --- a/docs/zh/modules/modules_driver_radio_control.md +++ b/docs/zh/modules/modules_driver_radio_control.md @@ -1,5 +1,10 @@ # Modules Reference: Radio Control (Driver) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## crsf_rc Source: [drivers/rc/crsf_rc](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/rc/crsf_rc) diff --git a/docs/zh/modules/modules_driver_rpm_sensor.md b/docs/zh/modules/modules_driver_rpm_sensor.md index b03fb766a42..e9e6a7c29e1 100644 --- a/docs/zh/modules/modules_driver_rpm_sensor.md +++ b/docs/zh/modules/modules_driver_rpm_sensor.md @@ -1,5 +1,10 @@ # Modules Reference: Rpm Sensor (Driver) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## pcf8583 Source: [drivers/rpm/pcf8583](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/rpm/pcf8583) diff --git a/docs/zh/modules/modules_driver_transponder.md b/docs/zh/modules/modules_driver_transponder.md index cd9e77ee033..3c746eb08c4 100644 --- a/docs/zh/modules/modules_driver_transponder.md +++ b/docs/zh/modules/modules_driver_transponder.md @@ -1,5 +1,10 @@ # Modules Reference: Transponder (Driver) +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## sagetech_mxs Source: [drivers/transponder/sagetech_mxs](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/transponder/sagetech_mxs) diff --git a/docs/zh/modules/modules_estimator.md b/docs/zh/modules/modules_estimator.md index de9947335b5..d3dbed44a28 100644 --- a/docs/zh/modules/modules_estimator.md +++ b/docs/zh/modules/modules_estimator.md @@ -1,5 +1,10 @@ # 模块参考:估计器 +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## AttitudeEstimatorQ Source: [modules/attitude_estimator_q](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/attitude_estimator_q) diff --git a/docs/zh/modules/modules_simulation.md b/docs/zh/modules/modules_simulation.md index 207ccfb7188..c2c9fe95cae 100644 --- a/docs/zh/modules/modules_simulation.md +++ b/docs/zh/modules/modules_simulation.md @@ -1,5 +1,10 @@ # 模块参考:仿真 +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## simulator_sih Source: [modules/simulation/simulator_sih](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/simulation/simulator_sih) @@ -18,12 +23,40 @@ signals given by the control allocation module. 模拟器运用矩阵代数方法实现了运动方程。姿态采用四元数表示。积分计算采用前向欧拉法。为避免堆栈溢出,大部分变量在 .hpp 文件中声明为全局变量。 +### 示例 + +Pose the vehicle on the ground for accel and mag calibration (SITL only), sides named as the calibration names them. +With `rotate` it turns about the vertical with a tilt swing, as the mag calibration asks for: + +``` +simulator_sih orient left rotate +``` + +Each side in turn: 10 s still, then 10 s rotating, then level. This completes either calibration. + +``` +simulator_sih orient all +``` + +Level the vehicle and resume the flight dynamics: + +``` +simulator_sih orient off +``` + ### Usage {#simulator_sih_usage} ``` simulator_sih [arguments...] Commands: start + [-t ] Terrain elevation GeoTIFF (DEM), SITL only + values: + + orient Pose the vehicle on the ground for calibration + down|up|front|back|left|right|all|off Side facing down, every side in turn, + or level + [rotate] Rotate about the vertical stop diff --git a/docs/zh/modules/modules_system.md b/docs/zh/modules/modules_system.md index a8694786618..d2dd47999c1 100644 --- a/docs/zh/modules/modules_system.md +++ b/docs/zh/modules/modules_system.md @@ -1,5 +1,10 @@ # 模块参考:系统 +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## battery_simulator Source: [modules/simulation/battery_simulator](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/simulation/battery_simulator) diff --git a/docs/zh/modules/modules_template.md b/docs/zh/modules/modules_template.md index d4143986710..31dc6f4743c 100644 --- a/docs/zh/modules/modules_template.md +++ b/docs/zh/modules/modules_template.md @@ -1,5 +1,10 @@ # 模块参考: 模板 +:::info +**This page is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/markdownout.py) from the source code** using the build command: `make module_documentation`. +Do not edit it directly; fix the module documentation in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) source instead. +::: + ## mc_raptor Source: [modules/mc_raptor](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/mc_raptor) diff --git a/docs/zh/msg_docs/SetpointConfig.md b/docs/zh/msg_docs/SetpointConfig.md index dc0537c40f4..1379e5e2aa9 100644 --- a/docs/zh/msg_docs/SetpointConfig.md +++ b/docs/zh/msg_docs/SetpointConfig.md @@ -26,25 +26,25 @@ Published by external modes and PX4 will respond with SetpointConfigReply. Used in field(s): [type](#fld_type) -| 参数名 | 类型 | 值 | 描述 | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -- | -------------------------------------------------------------- | -| TYPE_INVALID | `uint16` | 0 | | -| TYPE_DIRECT_ACTUATORS | `uint16` | 1 | ActuatorMotors and ActuatorServos | -| TYPE_MULTICOPTER_GOTO | `uint16` | 2 | GotoSetpoint | -| TYPE_FIXEDWING_LATERAL_LONGITUDINAL | `uint16` | 3 | FixedWingLateralSetpoint and FixedWingLongitudinalSetpoint | -| TYPE_TRAJECTORY | `uint16` | 4 | TrajectorySetpoint | -| TYPE_RATES | `uint16` | 5 | VehicleRatesSetpoint | -| TYPE_ATTITUDE | `uint16` | 6 | VehicleAttitudeSetpoint | -| TYPE_SURFACE_VEHICLE_POSITION | `uint16` | 7 | SurfaceVehiclePositionSetpoint | -| TYPE_SURFACE_VEHICLE_SPEED_ATTITUDE | `uint16` | 8 | SurfaceVehicleSpeedSetpoint and SurfaceVehicleAttitudeSetpoint | -| TYPE_SURFACE_VEHICLE_SPEED_RATE | `uint16` | 9 | SurfaceVehicleSpeedSetpoint and SurfaceVehicleRateSetpoint | -| TYPE_SURFACE_VEHICLE_SPEED_STEERING | `uint16` | 10 | SurfaceVehicleSpeedSetpoint and SurfaceVehicleSteeringSetpoint | -| TYPE_ROVER_THROTTLE_ATTITUDE | `uint16` | 11 | RoverThrottleSetpoint and SurfaceVehicleAttitudeSetpoint | -| TYPE_ROVER_THROTTLE_RATE | `uint16` | 12 | RoverThrottleSetpoint and SurfaceVehicleRateSetpoint | -| TYPE_ROVER_THROTTLE_STEERING | `uint16` | 13 | RoverThrottleSetpoint and SurfaceVehicleSteeringSetpoint | -| TYPE_TRAJECTORY_6DOF | `uint16` | 14 | TrajectorySetpoint6dof | -| TYPE_THRUST_AND_TORQUE | `uint16` | 15 | VehicleThrustSetpoint and VehicleTorqueSetpoint | -| TYPE_POSITION_TRIPLET | `uint16` | 16 | PositionSetpointTriplet | +| 参数名 | 类型 | 值 | 描述 | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -- | --------------------------------------------------------------- | +| TYPE_INVALID | `uint16` | 0 | | +| TYPE_DIRECT_ACTUATORS | `uint16` | 1 | ActuatorMotors and ActuatorServos | +| TYPE_MULTICOPTER_GOTO | `uint16` | 2 | GotoSetpoint | +| TYPE_FIXEDWING_LATERAL_LONGITUDINAL | `uint16` | 3 | FixedWingLateralSetpoint and FixedWingLongitudinalSetpoint | +| TYPE_TRAJECTORY | `uint16` | 4 | TrajectorySetpoint | +| TYPE_RATES | `uint16` | 5 | VehicleRatesSetpoint | +| TYPE_ATTITUDE | `uint16` | 6 | VehicleAttitudeSetpoint | +| TYPE_SURFACE_VEHICLE_POSITION | `uint16` | 7 | SurfaceVehiclePositionSetpoint | +| TYPE_SURFACE_VEHICLE_SPEED_ATTITUDE | `uint16` | 8 | SurfaceVehicleSpeedSetpoint and SurfaceVehicleAttitudeSetpoint | +| TYPE_SURFACE_VEHICLE_SPEED_RATE | `uint16` | 9 | SurfaceVehicleSpeedSetpoint and SurfaceVehicleRateSetpoint | +| TYPE_SURFACE_VEHICLE_SPEED_STEERING | `uint16` | 10 | SurfaceVehicleSpeedSetpoint and SurfaceVehicleSteeringSetpoint | +| TYPE_SURFACE_VEHICLE_THRUST_ATTITUDE | `uint16` | 11 | SurfaceVehicleThrustSetpoint and SurfaceVehicleAttitudeSetpoint | +| TYPE_SURFACE_VEHICLE_THRUST_RATE | `uint16` | 12 | SurfaceVehicleThrustSetpoint and SurfaceVehicleRateSetpoint | +| TYPE_SURFACE_VEHICLE_THRUST_STEERING | `uint16` | 13 | SurfaceVehicleThrustSetpoint and SurfaceVehicleSteeringSetpoint | +| TYPE_TRAJECTORY_6DOF | `uint16` | 14 | TrajectorySetpoint6dof | +| TYPE_THRUST_AND_TORQUE | `uint16` | 15 | VehicleThrustSetpoint and VehicleTorqueSetpoint | +| TYPE_POSITION_TRIPLET | `uint16` | 16 | PositionSetpointTriplet | ## Constants @@ -79,9 +79,9 @@ uint16 TYPE_SURFACE_VEHICLE_POSITION = 7 # SurfaceVehiclePositionSetpoint uint16 TYPE_SURFACE_VEHICLE_SPEED_ATTITUDE = 8 # SurfaceVehicleSpeedSetpoint and SurfaceVehicleAttitudeSetpoint uint16 TYPE_SURFACE_VEHICLE_SPEED_RATE = 9 # SurfaceVehicleSpeedSetpoint and SurfaceVehicleRateSetpoint uint16 TYPE_SURFACE_VEHICLE_SPEED_STEERING = 10 # SurfaceVehicleSpeedSetpoint and SurfaceVehicleSteeringSetpoint -uint16 TYPE_ROVER_THROTTLE_ATTITUDE = 11 # RoverThrottleSetpoint and SurfaceVehicleAttitudeSetpoint -uint16 TYPE_ROVER_THROTTLE_RATE = 12 # RoverThrottleSetpoint and SurfaceVehicleRateSetpoint -uint16 TYPE_ROVER_THROTTLE_STEERING = 13 # RoverThrottleSetpoint and SurfaceVehicleSteeringSetpoint +uint16 TYPE_SURFACE_VEHICLE_THRUST_ATTITUDE = 11 # SurfaceVehicleThrustSetpoint and SurfaceVehicleAttitudeSetpoint +uint16 TYPE_SURFACE_VEHICLE_THRUST_RATE = 12 # SurfaceVehicleThrustSetpoint and SurfaceVehicleRateSetpoint +uint16 TYPE_SURFACE_VEHICLE_THRUST_STEERING = 13 # SurfaceVehicleThrustSetpoint and SurfaceVehicleSteeringSetpoint uint16 TYPE_TRAJECTORY_6DOF = 14 # TrajectorySetpoint6dof uint16 TYPE_THRUST_AND_TORQUE = 15 # VehicleThrustSetpoint and VehicleTorqueSetpoint uint16 TYPE_POSITION_TRIPLET = 16 # PositionSetpointTriplet diff --git a/docs/zh/msg_docs/SurfaceVehicleCourseSetpoint.md b/docs/zh/msg_docs/SurfaceVehicleCourseSetpoint.md index 746640cdd97..62403b9781b 100644 --- a/docs/zh/msg_docs/SurfaceVehicleCourseSetpoint.md +++ b/docs/zh/msg_docs/SurfaceVehicleCourseSetpoint.md @@ -7,13 +7,12 @@ pageClass: is-wide-page Surface Vehicle Course Setpoint. Course setpoint for surface vehicles, on land or on water (rovers, boats). -Consumed by the position controllers of these vehicles (currently AckermannPosControl, -DifferentialPosControl and MecanumPosControl), which turn it into speed and attitude -setpoints. +Consumed by the position controllers of rover_ackermann, rover_differential and +rover_mecanum, which turn it into speed and attitude setpoints. Published by the Guided Course mode of rover_ackermann, rover_differential and rover_mecanum, and can be sent from ROS 2 over uXRCE-DDS (/fmu/in/surface_vehicle_course_setpoint). The vehicle tries to track the course over ground, as with the fixed-wing course hold: vehicles -that steer by heading correct their heading by the estimated drift angle, mecanum rovers drive +that steer by heading correct their heading by the estimated drift angle; omnidirectional vehicles drive along the course setpoint directly. There is no desired track, so a sideways offset is not corrected. To follow a desired track, publish surface_vehicle_position_setpoint instead. The position controller follows whichever of the two was published most recently. @@ -22,12 +21,12 @@ The position controller follows whichever of the two was published most recently ## Fields -| 参数名 | 类型 | Unit [Frame] | Range/Enum | 描述 | -| ----------------------------------- | --------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| timestamp | `uint64` | us | | Time since system start | -| course | `float32` | rad [NED] | [-pi : pi] | Course over ground to hold (Invalid: NaN No course; the position controller stays idle) | -| speed | `float32` | 米/秒 | [-inf : inf] | Cruising speed; a negative value drives the vehicle in reverse (rear first) along the course (Invalid: NaN Defaults to maximum speed) | -| yaw | `float32` | rad [NED] | [-pi : pi] | Currently unused. Only for vehicles that can move sideways (e.g. mecanum rovers): vehicle yaw while holding the course. (Invalid: NaN Not considered) | +| 参数名 | 类型 | Unit [Frame] | Range/Enum | 描述 | +| ----------------------------------- | --------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| timestamp | `uint64` | us | | Time since system start | +| course | `float32` | rad [NED] | [-pi : pi] | Course over ground to hold (Invalid: NaN No course; the position controller stays idle) | +| speed | `float32` | 米/秒 | [-inf : inf] | Cruising speed; a negative value drives the vehicle in reverse (rear first) along the course (Invalid: NaN Defaults to maximum speed) | +| yaw | `float32` | rad [NED] | [-pi : pi] | Currently unused. Only for omnidirectional vehicles: vehicle yaw while holding the course. (Invalid: NaN Not considered) | ## Source Message @@ -40,13 +39,12 @@ Click here to see original file # Surface Vehicle Course Setpoint # # Course setpoint for surface vehicles, on land or on water (rovers, boats). -# Consumed by the position controllers of these vehicles (currently AckermannPosControl, -# DifferentialPosControl and MecanumPosControl), which turn it into speed and attitude -# setpoints. +# Consumed by the position controllers of rover_ackermann, rover_differential and +# rover_mecanum, which turn it into speed and attitude setpoints. # Published by the Guided Course mode of rover_ackermann, rover_differential and rover_mecanum, # and can be sent from ROS 2 over uXRCE-DDS (/fmu/in/surface_vehicle_course_setpoint). # The vehicle tries to track the course over ground, as with the fixed-wing course hold: vehicles -# that steer by heading correct their heading by the estimated drift angle, mecanum rovers drive +# that steer by heading correct their heading by the estimated drift angle; omnidirectional vehicles drive # along the course setpoint directly. There is no desired track, so a sideways offset is not # corrected. To follow a desired track, publish surface_vehicle_position_setpoint instead. # The position controller follows whichever of the two was published most recently. @@ -54,7 +52,7 @@ Click here to see original file uint64 timestamp # [us] Time since system start float32 course # [rad] [@range -pi, pi] [@frame NED] [@invalid NaN No course; the position controller stays idle] Course over ground to hold float32 speed # [m/s] [@range -inf, inf] [@invalid NaN Defaults to maximum speed] Cruising speed; a negative value drives the vehicle in reverse (rear first) along the course -float32 yaw # [rad] [@range -pi, pi] [@frame NED] [@invalid NaN Not considered] Currently unused. Only for vehicles that can move sideways (e.g. mecanum rovers): vehicle yaw while holding the course. +float32 yaw # [rad] [@range -pi, pi] [@frame NED] [@invalid NaN Not considered] Currently unused. Only for omnidirectional vehicles: vehicle yaw while holding the course. ``` ::: diff --git a/docs/zh/msg_docs/SurfaceVehiclePositionSetpoint.md b/docs/zh/msg_docs/SurfaceVehiclePositionSetpoint.md index 688b14431a9..d46d3d3204a 100644 --- a/docs/zh/msg_docs/SurfaceVehiclePositionSetpoint.md +++ b/docs/zh/msg_docs/SurfaceVehiclePositionSetpoint.md @@ -6,9 +6,9 @@ pageClass: is-wide-page Surface Vehicle Position Setpoint. -Position setpoint consumed by the rover position controllers (AckermannPosControl, -DifferentialPosControl, MecanumPosControl), which turn it into surface_vehicle_speed_setpoint -and surface_vehicle_attitude_setpoint. +Position setpoint consumed by the position controllers of rover_ackermann, rover_differential +and rover_mecanum, which turn it into surface_vehicle_speed_setpoint and +surface_vehicle_attitude_setpoint. Published by the manual (position), auto and offboard drive modes of rover_ackermann, rover_differential and rover_mecanum, and can be sent from ROS 2 over uXRCE-DDS (/fmu/in/surface_vehicle_position_setpoint). @@ -20,14 +20,14 @@ of the two was published most recently. ## Fields -| 参数名 | 类型 | Unit [Frame] | Range/Enum | 描述 | -| ------------------------------------------------------------------ | ------------ | ---------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| timestamp | `uint64` | us | | Time since system start | -| target_ned | `float32[2]` | m [NED] | [-inf : inf] | Target position (Invalid: NaN No target; the position controller stays idle) | -| start_ned | `float32[2]` | m [NED] | [-inf : inf] | Start position of the desired track towards target_ned (Invalid: NaN Defaults to the vehicle position when the setpoint is received) | -| cruising_speed | `float32` | 米/秒 | [-inf : inf] | Cruising speed; a negative value drives the rover in reverse (rear first) towards target_ned (Invalid: NaN Defaults to maximum speed) | -| arrival_speed | `float32` | 米/秒 | [0 : inf] | Speed magnitude to arrive at the target with, independent of the direction of travel (Invalid: NaN Defaults to 0) | -| yaw | `float32` | rad [NED] | [-pi : pi] | Currently unused. Only for vehicles that can move sideways (e.g. mecanum): vehicle yaw during travel. (Invalid: NaN Not considered) | +| 参数名 | 类型 | Unit [Frame] | Range/Enum | 描述 | +| ------------------------------------------------------------------ | ------------ | ---------------------------------------------------------------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| timestamp | `uint64` | us | | Time since system start | +| target_ned | `float32[2]` | m [NED] | [-inf : inf] | Target position (Invalid: NaN No target; the position controller stays idle) | +| start_ned | `float32[2]` | m [NED] | [-inf : inf] | Start position of the desired track towards target_ned (Invalid: NaN Defaults to the vehicle position when the setpoint is received) | +| cruising_speed | `float32` | 米/秒 | [-inf : inf] | Cruising speed; a negative value drives the rover in reverse (rear first) towards target_ned (Invalid: NaN Defaults to maximum speed) | +| arrival_speed | `float32` | 米/秒 | [0 : inf] | Speed magnitude to arrive at the target with, independent of the direction of travel (Invalid: NaN Defaults to 0) | +| yaw | `float32` | rad [NED] | [-pi : pi] | Currently unused. Only for omnidirectional vehicles: vehicle yaw during travel. (Invalid: NaN Not considered) | ## Source Message @@ -39,9 +39,9 @@ Click here to see original file ```c # Surface Vehicle Position Setpoint # -# Position setpoint consumed by the rover position controllers (AckermannPosControl, -# DifferentialPosControl, MecanumPosControl), which turn it into surface_vehicle_speed_setpoint -# and surface_vehicle_attitude_setpoint. +# Position setpoint consumed by the position controllers of rover_ackermann, rover_differential +# and rover_mecanum, which turn it into surface_vehicle_speed_setpoint and +# surface_vehicle_attitude_setpoint. # Published by the manual (position), auto and offboard drive modes of rover_ackermann, # rover_differential and rover_mecanum, and can be sent from ROS 2 over uXRCE-DDS # (/fmu/in/surface_vehicle_position_setpoint). @@ -54,7 +54,7 @@ float32[2] target_ned # [m] [@range -inf, inf] [@frame NED] [@invalid NaN No tar float32[2] start_ned # [m] [@range -inf, inf] [@frame NED] [@invalid NaN Defaults to the vehicle position when the setpoint is received] Start position of the desired track towards target_ned float32 cruising_speed # [m/s] [@range -inf, inf] [@invalid NaN Defaults to maximum speed] Cruising speed; a negative value drives the rover in reverse (rear first) towards target_ned float32 arrival_speed # [m/s] [@range 0, inf] [@invalid NaN Defaults to 0] Speed magnitude to arrive at the target with, independent of the direction of travel -float32 yaw # [rad] [@range -pi, pi] [@frame NED] [@invalid NaN Not considered] Currently unused. Only for vehicles that can move sideways (e.g. mecanum): vehicle yaw during travel. +float32 yaw # [rad] [@range -pi, pi] [@frame NED] [@invalid NaN Not considered] Currently unused. Only for omnidirectional vehicles: vehicle yaw during travel. ``` ::: diff --git a/docs/zh/msg_docs/SurfaceVehicleSpeedSetpoint.md b/docs/zh/msg_docs/SurfaceVehicleSpeedSetpoint.md index 5a56d9a489e..628336b62f2 100644 --- a/docs/zh/msg_docs/SurfaceVehicleSpeedSetpoint.md +++ b/docs/zh/msg_docs/SurfaceVehicleSpeedSetpoint.md @@ -6,15 +6,22 @@ pageClass: is-wide-page Surface Vehicle Speed Setpoint. +Speed setpoint for surface vehicles, on land or on water (rovers, boats). +Published by the position controllers of rover_ackermann, rover_differential and rover_mecanum, +which turn surface_vehicle_position_setpoint and surface_vehicle_course_setpoint into it, by +their position mode while steering or at rest, and by their offboard mode. Can be sent from +ROS 2 over uXRCE-DDS (/fmu/in/surface_vehicle_speed_setpoint). +The speed controllers of these modules turn it into surface_vehicle_thrust_setpoint. + **TOPICS:** surface_vehicle_speed_setpoint ## Fields -| 参数名 | 类型 | Unit [Frame] | Range/Enum | 描述 | -| ----------------------------------------------------------------------------------- | --------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| timestamp | `uint64` | us | | Time since system start | -| speed_body_x | `float32` | m/s [Body] | [-inf (Backwards) : inf (Forwards)] | Speed setpoint in body x direction | -| speed_body_y | `float32` | m/s [Body] | [-inf (Left) : inf (Right)] | Mecanum only: Speed setpoint in body y direction (Invalid: NaN If not mecanum) | +| 参数名 | 类型 | Unit [Frame] | Range/Enum | 描述 | +| ----------------------------------- | --------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| timestamp | `uint64` | us | | Time since system start | +| x | `float32` | m/s [Body] | [-inf (Backwards) : inf (Forwards)] | Speed setpoint along the body X axis | +| y | `float32` | m/s [Body] | [-inf (Left) : inf (Right)] | Omnidirectional vehicles only: Speed setpoint along the body Y axis (Invalid: NaN If not omnidirectional) | ## Source Message @@ -25,10 +32,17 @@ Click here to see original file ```c # Surface Vehicle Speed Setpoint +# +# Speed setpoint for surface vehicles, on land or on water (rovers, boats). +# Published by the position controllers of rover_ackermann, rover_differential and rover_mecanum, +# which turn surface_vehicle_position_setpoint and surface_vehicle_course_setpoint into it, by +# their position mode while steering or at rest, and by their offboard mode. Can be sent from +# ROS 2 over uXRCE-DDS (/fmu/in/surface_vehicle_speed_setpoint). +# The speed controllers of these modules turn it into surface_vehicle_thrust_setpoint. -uint64 timestamp # [us] Time since system start -float32 speed_body_x # [m/s] [@range -inf (Backwards), inf (Forwards)] [@frame Body] Speed setpoint in body x direction -float32 speed_body_y # [m/s] [@range -inf (Left), inf (Right)] [@frame Body] [@invalid NaN If not mecanum] Mecanum only: Speed setpoint in body y direction +uint64 timestamp # [us] Time since system start +float32 x # [m/s] [@range -inf (Backwards), inf (Forwards)] [@frame Body] Speed setpoint along the body X axis +float32 y # [m/s] [@range -inf (Left), inf (Right)] [@frame Body] [@invalid NaN If not omnidirectional] Omnidirectional vehicles only: Speed setpoint along the body Y axis ``` ::: diff --git a/docs/zh/msg_docs/SurfaceVehicleSpeedStatus.md b/docs/zh/msg_docs/SurfaceVehicleSpeedStatus.md index 46500bf5c9e..6f001c6ef2c 100644 --- a/docs/zh/msg_docs/SurfaceVehicleSpeedStatus.md +++ b/docs/zh/msg_docs/SurfaceVehicleSpeedStatus.md @@ -6,19 +6,24 @@ pageClass: is-wide-page Surface Vehicle Speed Status. +Status of the speed controller of surface vehicles, on land or on water (rovers, boats). +Published by the speed controllers of rover_ackermann, rover_differential and rover_mecanum +while they track surface_vehicle_speed_setpoint, for logging and tuning. +Not consumed by other modules. + **TOPICS:** surface_vehicle_speed_status ## Fields -| 参数名 | 类型 | Unit [Frame] | Range/Enum | 描述 | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| timestamp | `uint64` | us | | Time since system start | -| measured_speed_body_x | `float32` | m/s [Body] | [-inf (Backwards) : inf (Forwards)] | Measured speed in body x direction | -| adjusted_speed_body_x_setpoint | `float32` | m/s [Body] | [-inf (Backwards) : inf (Forwards)] | Speed setpoint in body x direction that is being tracked (Applied slew rates) | -| pid_throttle_body_x_integral | `float32` | | [-1 : 1] | Integral of the PID for the closed loop controller of the speed in body x direction | -| measured_speed_body_y | `float32` | m/s [Body] | [-inf (Left) : inf (Right)] | Mecanum only: Measured speed in body y direction (Invalid: NaN If not mecanum) | -| adjusted_speed_body_y_setpoint | `float32` | m/s [Body] | [-inf (Left) : inf (Right)] | Mecanum only: Speed setpoint in body y direction that is being tracked (Applied slew rates) (Invalid: NaN If not mecanum) | -| pid_throttle_body_y_integral | `float32` | | [-1 : 1] | Mecanum only: Integral of the PID for the closed loop controller of the speed in body y direction (Invalid: NaN If not mecanum) | +| 参数名 | 类型 | Unit [Frame] | Range/Enum | 描述 | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| timestamp | `uint64` | us | | Time since system start | +| measured_speed_body_x | `float32` | m/s [Body] | [-inf (Backwards) : inf (Forwards)] | Measured speed along the body X axis | +| adjusted_speed_body_x_setpoint | `float32` | m/s [Body] | [-inf (Backwards) : inf (Forwards)] | Speed setpoint along the body X axis that is being tracked (Applied slew rates) | +| pid_thrust_body_x_integral | `float32` | | [-1 : 1] | Integral of the PID for the closed loop controller of the speed along the body X axis | +| measured_speed_body_y | `float32` | m/s [Body] | [-inf (Left) : inf (Right)] | Omnidirectional vehicles only: Measured speed along the body Y axis (Invalid: NaN If not omnidirectional) | +| adjusted_speed_body_y_setpoint | `float32` | m/s [Body] | [-inf (Left) : inf (Right)] | Omnidirectional vehicles only: Speed setpoint along the body Y axis that is being tracked (Applied slew rates) (Invalid: NaN If not omnidirectional) | +| pid_thrust_body_y_integral | `float32` | | [-1 : 1] | Omnidirectional vehicles only: Integral of the PID for the closed loop controller of the speed along the body Y axis (Invalid: NaN If not omnidirectional) | ## Source Message @@ -29,14 +34,19 @@ Click here to see original file ```c # Surface Vehicle Speed Status +# +# Status of the speed controller of surface vehicles, on land or on water (rovers, boats). +# Published by the speed controllers of rover_ackermann, rover_differential and rover_mecanum +# while they track surface_vehicle_speed_setpoint, for logging and tuning. +# Not consumed by other modules. -uint64 timestamp # [us] Time since system start -float32 measured_speed_body_x # [m/s] [@range -inf (Backwards), inf (Forwards)] [@frame Body] Measured speed in body x direction -float32 adjusted_speed_body_x_setpoint # [m/s] [@range -inf (Backwards), inf (Forwards)] [@frame Body] Speed setpoint in body x direction that is being tracked (Applied slew rates) -float32 pid_throttle_body_x_integral # [-] [@range -1, 1] Integral of the PID for the closed loop controller of the speed in body x direction -float32 measured_speed_body_y # [m/s] [@range -inf (Left), inf (Right)] [@frame Body] [@invalid NaN If not mecanum] Mecanum only: Measured speed in body y direction -float32 adjusted_speed_body_y_setpoint # [m/s] [@range -inf (Left), inf (Right)] [@frame Body] [@invalid NaN If not mecanum] Mecanum only: Speed setpoint in body y direction that is being tracked (Applied slew rates) -float32 pid_throttle_body_y_integral # [-] [@range -1, 1] [@invalid NaN If not mecanum] Mecanum only: Integral of the PID for the closed loop controller of the speed in body y direction +uint64 timestamp # [us] Time since system start +float32 measured_speed_body_x # [m/s] [@range -inf (Backwards), inf (Forwards)] [@frame Body] Measured speed along the body X axis +float32 adjusted_speed_body_x_setpoint # [m/s] [@range -inf (Backwards), inf (Forwards)] [@frame Body] Speed setpoint along the body X axis that is being tracked (Applied slew rates) +float32 pid_thrust_body_x_integral # [-] [@range -1, 1] Integral of the PID for the closed loop controller of the speed along the body X axis +float32 measured_speed_body_y # [m/s] [@range -inf (Left), inf (Right)] [@frame Body] [@invalid NaN If not omnidirectional] Omnidirectional vehicles only: Measured speed along the body Y axis +float32 adjusted_speed_body_y_setpoint # [m/s] [@range -inf (Left), inf (Right)] [@frame Body] [@invalid NaN If not omnidirectional] Omnidirectional vehicles only: Speed setpoint along the body Y axis that is being tracked (Applied slew rates) +float32 pid_thrust_body_y_integral # [-] [@range -1, 1] [@invalid NaN If not omnidirectional] Omnidirectional vehicles only: Integral of the PID for the closed loop controller of the speed along the body Y axis ``` ::: diff --git a/docs/zh/msg_docs/SurfaceVehicleThrustSetpoint.md b/docs/zh/msg_docs/SurfaceVehicleThrustSetpoint.md new file mode 100644 index 00000000000..865c5934ff7 --- /dev/null +++ b/docs/zh/msg_docs/SurfaceVehicleThrustSetpoint.md @@ -0,0 +1,48 @@ +--- +pageClass: is-wide-page +--- + +# SurfaceVehicleThrustSetpoint (UORB message) + +Surface Vehicle Thrust Setpoint. + +Normalized thrust setpoint for surface vehicles, on land or on water (rovers, boats). +Published by the speed controllers of rover_ackermann, rover_differential and rover_mecanum, +which turn surface_vehicle_speed_setpoint into it, and by their manual, acro, stabilized and +manual parking modes directly from the sticks. Can be sent from ROS 2 over uXRCE-DDS +(/fmu/in/surface_vehicle_thrust_setpoint). +The actuator controllers of these modules turn it into motor commands (actuator_motors). + +**TOPICS:** surface_vehicle_thrust_setpoint + +## Fields + +| 参数名 | 类型 | Unit [Frame] | Range/Enum | 描述 | +| ----------------------------------- | --------- | ------------ | ------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| timestamp | `uint64` | us | | Time since system start | +| x | `float32` | [Body] | [-1 (Backwards) : 1 (Forwards)] | Normalized thrust setpoint along the body X axis | +| y | `float32` | [Body] | [-1 (Left) : 1 (Right)] | Omnidirectional vehicles only: Normalized thrust setpoint along the body Y axis (Invalid: NaN If not omnidirectional) | + +## Source Message + +[Source file (GitHub)](https://github.com/PX4/PX4-Autopilot/blob/main/msg/SurfaceVehicleThrustSetpoint.msg) + +:::details +Click here to see original file + +```c +# Surface Vehicle Thrust Setpoint +# +# Normalized thrust setpoint for surface vehicles, on land or on water (rovers, boats). +# Published by the speed controllers of rover_ackermann, rover_differential and rover_mecanum, +# which turn surface_vehicle_speed_setpoint into it, and by their manual, acro, stabilized and +# manual parking modes directly from the sticks. Can be sent from ROS 2 over uXRCE-DDS +# (/fmu/in/surface_vehicle_thrust_setpoint). +# The actuator controllers of these modules turn it into motor commands (actuator_motors). + +uint64 timestamp # [us] Time since system start +float32 x # [-] [@range -1 (Backwards), 1 (Forwards)] [@frame Body] Normalized thrust setpoint along the body X axis +float32 y # [-] [@range -1 (Left), 1 (Right)] [@frame Body] [@invalid NaN If not omnidirectional] Omnidirectional vehicles only: Normalized thrust setpoint along the body Y axis +``` + +::: diff --git a/docs/zh/msg_docs/WheelEncoders.md b/docs/zh/msg_docs/WheelEncoders.md index 84d342a7276..b5e7f118ed9 100644 --- a/docs/zh/msg_docs/WheelEncoders.md +++ b/docs/zh/msg_docs/WheelEncoders.md @@ -4,15 +4,36 @@ pageClass: is-wide-page # 滚轮编码器 (UORB 消息) +Wheel encoder readings. + +Angular speed, unwrapped angle and raw encoder counts for up to four wheels. +Published by the Roboclaw driver (one instance per controller, two encoder channels each) +and by the Gazebo bridge in simulation. +Streamed to MAVLink as WHEEL_DISTANCE, logged, and exported over uXRCE-DDS. + +Wheel order follows the PX4 motor index: entry i is the wheel driven by Motor(i+1) in the +rover's actuator configuration. + +- Mecanum: 0 = front right, 1 = front left, 2 = rear right, 3 = rear left +- Differential: 0 = right, 1 = left (2 and 3 unused) +- Ackermann: 0 = drivetrain (motor or drive shaft, reported as wheel rotation), 1-3 unused + +Unused entries have counts_per_rev = 0. + +The WHEEL_DISTANCE stream supports a single publisher: with several instances (e.g. two Roboclaw +controllers) they all fill the same slots and only the most recently updated instance is streamed. + **TOPICS:** wheel_encoders ## Fields -| 参数名 | 类型 | Unit [Frame] | Range/Enum | 描述 | -| ------------------------------------------------------------ | ------------ | ---------------------------------------------------------------- | ---------- | --------------------------------------------------------- | -| timestamp | `uint64` | | | time since system start (microseconds) | -| wheel_speed | `float32[2]` | rad/s | | | -| wheel_angle | `float32[2]` | rad | | | +| 参数名 | 类型 | Unit [Frame] | Range/Enum | 描述 | +| --------------------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| timestamp | `uint64` | us | | Time since system start | +| wheel_speed | `float32[4]` | rad/s | | Wheel angular speed. Positive is forward rotation. | +| wheel_angle | `float32[4]` | rad | | Unwrapped wheel angle since boot, 2 _ pi _ encoder_counts / counts_per_rev | +| counts_per_rev | `uint32[4]` | | | Encoder counts per wheel revolution | +| encoder_counts | `int64[4]` | | | Wheel position in encoder counts since boot. Positive is forward rotation; negative is reverse rotation. | ## Source Message @@ -22,11 +43,29 @@ pageClass: is-wide-page Click here to see original file ```c -uint64 timestamp # time since system start (microseconds) +# Wheel encoder readings +# +# Angular speed, unwrapped angle and raw encoder counts for up to four wheels. +# Published by the Roboclaw driver (one instance per controller, two encoder channels each) +# and by the Gazebo bridge in simulation. +# Streamed to MAVLink as WHEEL_DISTANCE, logged, and exported over uXRCE-DDS. +# +# Wheel order follows the PX4 motor index: entry i is the wheel driven by Motor(i+1) in the +# rover's actuator configuration. +# - Mecanum: 0 = front right, 1 = front left, 2 = rear right, 3 = rear left +# - Differential: 0 = right, 1 = left (2 and 3 unused) +# - Ackermann: 0 = drivetrain (motor or drive shaft, reported as wheel rotation), 1-3 unused +# +# Unused entries have counts_per_rev = 0. +# +# The WHEEL_DISTANCE stream supports a single publisher: with several instances (e.g. two Roboclaw +# controllers) they all fill the same slots and only the most recently updated instance is streamed. -# Two wheels: 0 right, 1 left -float32[2] wheel_speed # [rad/s] -float32[2] wheel_angle # [rad] +uint64 timestamp # [us] Time since system start +float32[4] wheel_speed # [rad/s] Wheel angular speed. Positive is forward rotation. +float32[4] wheel_angle # [rad] Unwrapped wheel angle since boot, 2 * pi * encoder_counts / counts_per_rev +uint32[4] counts_per_rev # [-] Encoder counts per wheel revolution +int64[4] encoder_counts # [-] Wheel position in encoder counts since boot. Positive is forward rotation; negative is reverse rotation. ``` ::: diff --git a/docs/zh/msg_docs/index.md b/docs/zh/msg_docs/index.md index f75f1bfdbd8..7a33decace9 100644 --- a/docs/zh/msg_docs/index.md +++ b/docs/zh/msg_docs/index.md @@ -238,7 +238,6 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m - [RateCtrlStatus](RateCtrlStatus.md) - [RcChannels](RcChannels.md) - [RcParameterMap](RcParameterMap.md) -- [RoverThrottleSetpoint](RoverThrottleSetpoint.md) — Rover Throttle setpoint. - [Rpm](Rpm.md) - [RtcmData](RtcmData.md) — RTCM3 data exchanged with GNSS receivers. - [RtlStatus](RtlStatus.md) @@ -277,6 +276,7 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m - [SurfaceVehicleSpeedSetpoint](SurfaceVehicleSpeedSetpoint.md) — Surface Vehicle Speed Setpoint. - [SurfaceVehicleSpeedStatus](SurfaceVehicleSpeedStatus.md) — Surface Vehicle Speed Status. - [SurfaceVehicleSteeringSetpoint](SurfaceVehicleSteeringSetpoint.md) — Surface Vehicle Steering Setpoint. +- [SurfaceVehicleThrustSetpoint](SurfaceVehicleThrustSetpoint.md) — Surface Vehicle Thrust Setpoint. - [SystemPower](SystemPower.md) - [TakeoffStatus](TakeoffStatus.md) — Status of the takeoff state machine currently just available for multicopters. - [TargetGnss](TargetGnss.md) — Landing target GNSS position in WGS84 coordinates, and optional NED velocity, from a target-mounted receiver. @@ -316,5 +316,5 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m - [VteOrientation](VteOrientation.md) — Vision Target Estimator orientation state, exposing the full yaw filter output with covariances for logging and tuning. - [VtePosition](VtePosition.md) — Vision Target Estimator position state, exposing the full per-axis Kalman filter state with covariances for logging and tuning. - [Vtx](Vtx.md) -- [WheelEncoders](WheelEncoders.md) +- [WheelEncoders](WheelEncoders.md) — Wheel encoder readings. - [YawEstimatorStatus](YawEstimatorStatus.md) diff --git a/docs/zh/peripherals/mavlink_peripherals.md b/docs/zh/peripherals/mavlink_peripherals.md index 8d1762d14a9..15080435eeb 100644 --- a/docs/zh/peripherals/mavlink_peripherals.md +++ b/docs/zh/peripherals/mavlink_peripherals.md @@ -81,6 +81,7 @@ On this hardware, there is a [default serial port mapping](../peripherals/serial - [MAV_2_MODE](../advanced_config/parameter_reference.md#MAV_2_MODE) = `0` (normal/GCS) - [MAV_2_RADIO_CTL](../advanced_config/parameter_reference.md#MAV_2_RADIO_CTL) = `0` - [MAV_2_RATE](../advanced_config/parameter_reference.md#MAV_2_RATE) = `100000` +- [MAV_2_REMOTE_IP](../advanced_config/parameter_reference.md#MAV_2_REMOTE_IP) = `0` (auto-discover partner, see [MAVLink Partner Address](../advanced_config/ethernet_setup.md#partner_address)) - [MAV_2_REMOTE_PRT](../advanced_config/parameter_reference.md#MAV_2_REMOTE_PRT)= `14550` (GCS) - [MAV_2_UDP_PRT](../advanced_config/parameter_reference.md#MAV_2_UDP_PRT) = `14550` (GCS) diff --git a/docs/zh/releases/main.md b/docs/zh/releases/main.md index a1c535bea74..e0446c7f840 100644 --- a/docs/zh/releases/main.md +++ b/docs/zh/releases/main.md @@ -64,8 +64,10 @@ Please continue reading for [upgrade instructions](#upgrade-guide). `COM_FLTT_LOW_ACT` is not migrated: if you use `COM_LOW_BAT_ACT` `3` or `4` and do not want distance-aware return, change it to `5` or `6`. Distance-aware return is not available together with `COM_LOW_BAT_ACT` `0` (Warning) or `2` (Land), and the warning can no longer be disabled (previously `COM_FLTT_LOW_ACT=0`). ([PX4-Autopilot#26955](https://github.com/PX4/PX4-Autopilot/pull/26955)) -- **`DO_JUMP` can only loop back and its repeat count must fit.** - A mission is now rejected if a `DO_JUMP` targets itself or a later mission item, even if its repeat count is 0, and if its repeat count is negative, above 65535 or not a number (it is no longer narrowed to a different count). +- **`DO_JUMP` can only loop back to a waypoint and its repeat count must fit.** + A mission is now rejected if a `DO_JUMP` targets itself or a later mission item, or if scanning forward from its target reaches a `DO_JUMP` before a waypoint, including the original jump. + These target rules apply even if the repeat count is 0. + A mission is also rejected if the repeat count is negative, above 65535 or not a number (it is no longer narrowed to a different count). Missions stored on the vehicle with such jumps must be edited and uploaded again. - **`MAV_CMD_MISSION_START` no longer arms the vehicle.** @@ -105,6 +107,7 @@ Please continue reading for [upgrade instructions](#upgrade-guide). - Fast mission Return modes ([RTL_TYPE](../advanced_config/parameter_reference.md#RTL_TYPE) = 2 and 4) now skip `DO_JUMP` commands (loops) while following the mission path. ([PX4-Autopilot#26993: fix(navigator): goToNextPositionItem skip loops when required](https://github.com/PX4/PX4-Autopilot/pull/26993)) - A fixed-wing vehicle landing at the end of a reverse mission Return ([RTL_TYPE](../advanced_config/parameter_reference.md#RTL_TYPE) = 2 or 4) uses the home altitude again instead of flaring at flight altitude, a regression in the v1.18 pre-releases. +- A Return to the mission landing ([RTL_TYPE](../advanced_config/parameter_reference.md#RTL_TYPE) = 1 or 3, or 0 as a last resort) uses the current return altitude for its climb, geofence detours and time estimate. It used the one from when the mission landing was first selected, often on the ground, so a multicopter could fly to the landing without climbing to [RTL_RETURN_ALT](../advanced_config/parameter_reference.md#RTL_RETURN_ALT), a regression in the v1.18 pre-releases. - A mission Return mode ([RTL_TYPE](../advanced_config/parameter_reference.md#RTL_TYPE) = 1, 2, 3 or 4) now reads the current mission on the cycle that activates it, so a mission uploaded or changed right as Return starts is used for the return type, the geofence avoidance destination and the starting item. The fast variants also discard the item index they recorded from an earlier mission when a different one is current. ([PX4-Autopilot#28748](https://github.com/PX4/PX4-Autopilot/pull/28748)) - A `DO_JUMP` whose counter cannot be written to storage, for example on a failing SD card, is now skipped with a message to the operator. Previously the jump was taken again on every pass, repeating the same mission segment until a failsafe stopped the mission. ([PX4-Autopilot#28752](https://github.com/PX4/PX4-Autopilot/pull/28752)) - Return mode now stops in the cycle it is left, not one cycle later. Before, a precision landing selected right after Return was partly reset, and Return selected again after one cycle of Hold hovered in place instead of returning. ([PX4-Autopilot#29444](https://github.com/PX4/PX4-Autopilot/pull/29444)) @@ -113,6 +116,9 @@ Please continue reading for [upgrade instructions](#upgrade-guide). - With [RTL_TYPE](../advanced_config/parameter_reference.md#RTL_TYPE) = 5 and no rally point, a fixed-wing vehicle now circles where Return started, whatever [RTL_LAND_DELAY](../advanced_config/parameter_reference.md#RTL_LAND_DELAY) is. It used to land there when `RTL_LAND_DELAY` was not -1, with the altitude it was flying at as the ground altitude. VTOLs and multicopters still follow `RTL_LAND_DELAY`. +- After its climb, a Return to a mission landing without `DO_LAND_START` ([RTL_TYPE](../advanced_config/parameter_reference.md#RTL_TYPE) = 1 or 3, or 0 as a last resort) flies to the landing at altitude before it descends, and a VTOL transitions back to multicopter there. + Since PX4 v1.15 a multicopter descended right after the climb while flying to the landing and could touch down short of it, and a VTOL in fixed-wing flight flew a fixed-wing landing. + Mission now does the same after the climb it adds when it starts or resumes below a landing item. ### Hardware Support @@ -125,6 +131,7 @@ Please continue reading for [upgrade instructions](#upgrade-guide). - [Agam FloRange](../dronecan/agam_florange.md): new DroneCAN optical flow, distance sensor and IMU module (PAA3905, AFBR-S50LV85D, ICM-42688-P). ([PX4-Autopilot#28901](https://github.com/PX4/PX4-Autopilot/pull/28901)) - [Agam Autopilot v6X-RT](../flight_controller/agam_v6xrt.md): new FMUv6X-RT flight controller (NXP i.MX RT1176) with triple-redundant IMUs and 100BASE-T1 Ethernet. ([PX4-Autopilot#28285](https://github.com/PX4/PX4-Autopilot/pull/28285)) - [NXP MR-NavQ95](../flight_controller/nxp_mr_navq95.md): new i.MX 95 flight controller with PX4 on the Cortex-M7 core and Linux on the Cortex-A55 cores. ([PX4-Autopilot#29055](https://github.com/PX4/PX4-Autopilot/pull/29055)) +- [Avian Automata 305AP](../flight_controller/avianautomata_305ap.md): new STM32H743 flight controller with two IMU slots, two CAN buses and eight DShot outputs. ([PX4-Autopilot#29689](https://github.com/PX4/PX4-Autopilot/pull/29689)) ### Common @@ -187,6 +194,8 @@ Please continue reading for [upgrade instructions](#upgrade-guide). - ESC/motor health is now reported in [SYS_STATUS](https://mavlink.io/en/messages/common.html#SYS_STATUS) using the [MAV_SYS_STATUS_SENSOR_PROPULSION](https://mavlink.io/en/messages/common.html#MAV_SYS_STATUS_SENSOR_PROPULSION) bit instead of [MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS](https://mavlink.io/en/messages/common.html#MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS). ([PX4-Autopilot#29192](https://github.com/PX4/PX4-Autopilot/pull/29192)). - [SYS_STATUS](https://mavlink.io/en/messages/common.html#SYS_STATUS) now sets the [MAV_SYS_STATUS_EXTENSION_USED](https://mavlink.io/en/messages/common.html#MAV_SYS_STATUS_EXTENSION_USED) flag in `onboard_control_sensors_present` when extended sensor fields are used. +- [TIME_ESTIMATE_TO_TARGET](https://mavlink.io/en/messages/common.html#TIME_ESTIMATE_TO_TARGET) reports `safe_return` as `-1` (landed or no estimate) when Return has no time estimate: before Home is set, on the ground unless Return would follow a mission landing, and with [RTL_TYPE](../advanced_config/parameter_reference.md#RTL_TYPE) = 2 or 4 and a valid mission. + It used to send `0`, or an undefined value with `RTL_TYPE` 2 and 4. ### RC @@ -201,7 +210,8 @@ Please continue reading for [upgrade instructions](#upgrade-guide). ### 垂直起降 -- TBD +- After a [quad-chute](../config/safety.md#quad-chute-failsafe), Mission and VTOL Takeoff mode no longer command forward transitions and continue in multicopter mode. Before, a resumed mission commanded the next transition again, which also cleared the quad-chute, and with [COM_QC_ACT](../advanced_config/parameter_reference.md#COM_QC_ACT) set to Warning a quad-chute during a mission transition left the mission waiting at that item. +- A [quad-chute](../config/safety.md#quad-chute-failsafe) commanded with `MAV_CMD_DO_VTOL_TRANSITION` (`param2` = 1) now only switches to multicopter mode, as it is not caused by a failure. It no longer executes [COM_QC_ACT](../advanced_config/parameter_reference.md#COM_QC_ACT) or requires a reboot before the next arming. ### Fixed-wing @@ -214,4 +224,6 @@ Please continue reading for [upgrade instructions](#upgrade-guide). ### ROS 2 -- TBD +- `rover_throttle_setpoint` is now `surface_vehicle_thrust_setpoint` ([SurfaceVehicleThrustSetpoint](../msg_docs/SurfaceVehicleThrustSetpoint.md)), and `SetpointConfig.TYPE_ROVER_THROTTLE_*` is now `TYPE_SURFACE_VEHICLE_THRUST_*`. + The `throttle_body_x/y` and `speed_body_x/y` fields of the thrust and speed setpoints are now `x` and `y`, and the PX4 ROS 2 Interface Library rover setpoint types are now `SurfaceVehicle*SetpointType`. + ROS 2 applications must publish to `/fmu/in/surface_vehicle_thrust_setpoint` instead of `/fmu/in/rover_throttle_setpoint`. ([PX4-Autopilot#29777](https://github.com/PX4/PX4-Autopilot/pull/29777)) diff --git a/docs/zh/ros2/px4_ros2_control_interface.md b/docs/zh/ros2/px4_ros2_control_interface.md index f547571bd72..b5927c65590 100644 --- a/docs/zh/ros2/px4_ros2_control_interface.md +++ b/docs/zh/ros2/px4_ros2_control_interface.md @@ -329,7 +329,7 @@ private: - [MulticopterGotoSetpointType](#go-to-setpoint-multicoptergotosetpointtype): 平滑的位置控制以及(可选的)航向控制 - [FwLateralLongitudinalSetpointType](#fw-lateral-longitudinal-setpoint): Direct control of lateral and longitudinal fixed wing dynamics - [DirectActuatorsSetpointType](#direct-actuator-control-setpoint-directactuatorssetpointtype):直接控制发动机和飞行地面servo setpoints -- [Rover Setpoints](#rover-setpoints): Direct access to rover control setpoints (Position, Speed, Attitude, Rate, Throttle and Steering). +- [Rover Setpoints](#rover-setpoints): Direct access to rover control setpoints (position, speed, attitude, rate, thrust and steering). :::tip 其他设置点类型目前是实验性的,可在以下网址找到:[px4_ros2/control/setpoint_types/experimental](https://github.com/Auterion/px4-ros2-interface-lib/tree/main/px4_ros2_cpp/include/px4_ros2/control/setpoint_types/experimental)。 @@ -529,27 +529,32 @@ _fw_lateral_longitudinal_setpoint->update(setpoint_s, config_s); :::info 所提供的“highest”设定值将被用于 PX4 机器人模块中,以生成低于该值的设定值(并对其进行覆盖!)。这个层次结构有提供有效控制输入的明确规则: -- 提供一个位置集点,**or** -- “左”上的设置点之一(速度 **或** 节点) **和** “右”上的设置点之一(态度、速率 **或** 节点)。所有“左”和“右”设置点的组合都是有效的。 +- Provide a position setpoint, or +- One of the setpoints on the "left" (speed or thrust) and one of the setpoints on the "right" (attitude, rate or steering). 所有“左”和“右”设置点的组合都是有效的。 为了便于使用,我们以新的 SettpointType 的形式揭示这些有效的组合。 ::: -通过控制界面暴露的 RoverSetpointTypes 是这些设置点的组合,导致有效的控制输入: +The SetpointTypes exposed through the control interface are combinations of these setpoints that lead to a valid control input: -| SetpointType | 安装位置 | Speed | Throttle | Attitude | 频率 | Steering | Control Flags | -| ------------------------------------------------------------------------------------------------------------------------------------ | --------------------------- | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------------ | -| [RoverPosition](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1SurfaceVehiclePositionSetpointType.html#details) | ✓ | (✓) | (✓) | (✓) | (✓) | (✓) | Position, Velocity, Attitude, Rate, Control Allocation | -| [RoverSpeedAttitude](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1RoverSpeedAttitudeSetpointType.html) | | ✓ | (✓) | ✓ | (✓) | (✓) | Velocity, Attitude, Rate, Control Allocation | -| [RoverSpeedRate](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1RoverSpeedRateSetpointType.html) | | ✓ | (✓) | | ✓ | (✓) | Velocity, Rate, Control Allocation | -| [RoverSpeedSteering](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1RoverSpeedSteeringSetpointType.html) | | ✓ | (✓) | | | ✓ | Velocity, Control Allocation | -| [RoverThrottleAttitude](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1RoverThrottleAttitudeSetpointType.html) | | | ✓ | ✓ | (✓) | (✓) | Attitude, Rate, Control Allocation | -| [RoverThrottleRate](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1RoverThrottleRateSetpointType.html) | | | ✓ | | ✓ | (✓) | Rate, Control Allocation | -| [RoverThrottleSteering](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1RoverThrottleSteeringSetpointType.html) | | | ✓ | | | ✓ | Control Allocation | +| SetpointType | 安装位置 | Speed | Thrust | Attitude | 频率 | Steering | Control Flags | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------------ | +| [SurfaceVehiclePosition](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1SurfaceVehiclePositionSetpointType.html#details) | ✓ | (✓) | (✓) | (✓) | (✓) | (✓) | Position, Velocity, Attitude, Rate, Control Allocation | +| [SurfaceVehicleSpeedAttitude](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1SurfaceVehicleSpeedAttitudeSetpointType.html) | | ✓ | (✓) | ✓ | (✓) | (✓) | Velocity, Attitude, Rate, Control Allocation | +| [SurfaceVehicleSpeedRate](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1SurfaceVehicleSpeedRateSetpointType.html) | | ✓ | (✓) | | ✓ | (✓) | Velocity, Rate, Control Allocation | +| [SurfaceVehicleSpeedSteering](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1SurfaceVehicleSpeedSteeringSetpointType.html) | | ✓ | (✓) | | | ✓ | Velocity, Control Allocation | +| [SurfaceVehicleThrustAttitude](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1SurfaceVehicleThrustAttitudeSetpointType.html) | | | ✓ | ✓ | (✓) | (✓) | Attitude, Rate, Control Allocation | +| [SurfaceVehicleThrustRate](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1SurfaceVehicleThrustRateSetpointType.html) | | | ✓ | | ✓ | (✓) | Rate, Control Allocation | +| [SurfaceVehicleThrustSteering](https://auterion.github.io/px4-ros2-interface-lib/classpx4__ros2_1_1SurfaceVehicleThrustSteeringSetpointType.html) | | | ✓ | | | ✓ | Control Allocation | ✓ 是我们发布的设置点,(✓) 是根据上面的层次结构由 PX4 旋转模块内部生成的。 -使用 `RoverSpeedAttitude SettpointType` 的特定驱动器模式示例为 [here](https://github.com/Auterion/px4-ros2-interface-lib/tree/main/examples/cpp/modes/rover_velocity)。 +:::info +In PX4 v1.17 and v1.18 these setpoint types are named `Rover*SetpointType` (for example `RoverSpeedRateSetpointType`). +The `SurfaceVehicle*SetpointType` names are only available in later PX4 versions, together with a matching version of the PX4 ROS 2 Interface Library. +::: + +An example of a rover-specific drive mode using the `SurfaceVehicleSpeedRateSetpointType` is provided [here](https://github.com/Auterion/px4-ros2-interface-lib/tree/main/examples/cpp/modes/rover_velocity). ### 控制VTOL diff --git a/docs/zh/sensor/optical_flow.md b/docs/zh/sensor/optical_flow.md index 92abba0e55e..f30d3bea026 100644 --- a/docs/zh/sensor/optical_flow.md +++ b/docs/zh/sensor/optical_flow.md @@ -113,3 +113,22 @@ If your optical flow sensor is offset from the vehicle centre, you can set this | [EKF2_OF_POS_Z](../advanced_config/parameter_reference.md#EKF2_OF_POS_Z) | Z position of optical flow focal point in body frame (default is 0.0m). | See [Using PX4's Navigation Filter (EKF2) > Optical flow](../advanced_config/tuning_the_ecl_ekf.md#optical-flow) for more information. + +## 仿真 + +Optical flow can be simulated with [SIH](../sim_sih/index.md), which computes the flow from the simulated vehicle motion instead of rendering a camera image. +As with real hardware, the simulated sensor reports the integrated flow only, so a downward facing [distance sensor](../sensor/rangefinders.md) has to be simulated alongside it — SIH provides one. + +Two ready-made airframes have flow enabled and the estimator configured for it: + +```sh +# Multicopter navigating on optical flow only (GNSS fusion disabled) +make px4_sitl_sih sihsim_quadx_flow + +# Standard VTOL navigating on optical flow only (GNSS fusion disabled) +make px4_sitl_sih sihsim_standard_vtol_flow +``` + +The sensor itself is configured with the [`SIH_OF_*` parameters](../sim_sih/index.md#optical-flow) (rate, noise, and maximum ground distance). + +Optical flow is also simulated by [Gazebo Classic](../sim_gazebo_classic/index.md), which renders the downward facing camera image and runs flow computation on it. diff --git a/docs/zh/sim_pterosim/index.md b/docs/zh/sim_pterosim/index.md index 1bc92d22679..4e06936ee9e 100644 --- a/docs/zh/sim_pterosim/index.md +++ b/docs/zh/sim_pterosim/index.md @@ -26,13 +26,14 @@ PteroSim demo: ## 支持的载具 -The free tier includes the **F450** multicopter, which is covered by the setup steps on this page: +The setup steps on this page use the **F450** multicopter: | Vehicle | 类型 | PX4 构建目标 | | ------- | --- | --------------------------------- | | F450 | 多旋翼 | `make px4_sitl_default none_iris` | -Paid licenses also include fixed-wing, VTOL, and helicopter templates with PX4 SITL support. +PteroSim also includes fixed-wing, VTOL, and tailsitter vehicles that fly with PX4 SITL. +All vehicles are available on every license tier, including the free tier for non-commercial use. See [pterolabs.ai](https://pterolabs.ai/#pricing) for licensing details. ## 网络设置 diff --git a/docs/zh/sim_sih/index.md b/docs/zh/sim_sih/index.md index 6c7472cf666..08480a4161d 100644 --- a/docs/zh/sim_sih/index.md +++ b/docs/zh/sim_sih/index.md @@ -14,7 +14,8 @@ See [PX4 Simulation QuickStart](../simulation/px4_simulation_quickstart.md) for ## 综述 SIH runs as a PX4 module that replaces real sensor and actuator hardware with a simulated physics model. -It provides simulated IMU, GPS, barometer, magnetometer, and airspeed sensor data via uORB, and reads actuator outputs to update the vehicle state at each timestep. +It provides simulated IMU, GPS, barometer, magnetometer, airspeed, distance sensor, and optical flow data via uORB, and reads actuator outputs to update the vehicle state at each timestep. +The distance sensor and the downward facing [optical flow sensor](#optical-flow) let you exercise flow aided navigation without a rendered camera image. The simulation runs in lockstep with PX4, ensuring deterministic and reproducible results. It also integrates seamlessly with ROS 2 with no additional configuration (see [ROS 2 Integration](#ros-2-integration) below). @@ -30,14 +31,16 @@ Two modes are supported: The following vehicle types are supported: -| Vehicle | Make Target | Status | -| ---------------------------------------------------------------------------------- | ------------------------------------------ | ------------ | -| Quadrotor X | `make px4_sitl_sih sihsim_quadx` | Stable | -| Hexarotor X | `make px4_sitl_sih sihsim_hex` | Experimental | -| Fixed-wing (airplane) | `make px4_sitl_sih sihsim_airplane` | Experimental | -| Tailsitter VTOL | `make px4_sitl_sih sihsim_xvert` | Experimental | -| Standard VTOL (QuadPlane) | `make px4_sitl_sih sihsim_standard_vtol` | Experimental | -| Ackermann Rover | `make px4_sitl_sih sihsim_rover_ackermann` | Experimental | +| Vehicle | Make Target | Status | +| ---------------------------------------------------------------------------------- | --------------------------------------------- | ------------ | +| Quadrotor X | `make px4_sitl_sih sihsim_quadx` | Stable | +| Hexarotor X | `make px4_sitl_sih sihsim_hex` | Experimental | +| Fixed-wing (airplane) | `make px4_sitl_sih sihsim_airplane` | Experimental | +| Tailsitter VTOL | `make px4_sitl_sih sihsim_xvert` | Experimental | +| Standard VTOL (QuadPlane) | `make px4_sitl_sih sihsim_standard_vtol` | Experimental | +| Ackermann Rover | `make px4_sitl_sih sihsim_rover_ackermann` | Experimental | +| Quadrotor X with optical flow | `make px4_sitl_sih sihsim_quadx_flow` | Experimental | +| Standard VTOL with optical flow | `make px4_sitl_sih sihsim_standard_vtol_flow` | Experimental | :::warning Only the quadrotor vehicle type is stable and recommended for development. All other vehicle types (hexarotor, fixed-wing, VTOL, rover) are experimental and may have aerodynamic model or controller interaction issues that produce unrealistic flight behaviour. @@ -117,6 +120,24 @@ PX4_SIM_SPEED_FACTOR=10 make px4_sitl_sih sihsim_quadx SIH supports setting a wind velocity with the PX4 parameters [`SIH_WIND_N`](../advanced_config/parameter_reference.md#SIH_WIND_E) and [`SIH_WIND_E`](../advanced_config/parameter_reference.md#SIH_WIND_E) [m/s]. The parameters can also be changed during flight to simulate changing wind. +#### 光流 + +SIH can simulate a downward facing optical flow sensor, so that flow aided navigation can be exercised without a rendered camera image. +The sensor reports the integrated flow only: the flow module completes the sample with the vehicle gyro and a downward facing distance sensor, which therefore has to be enabled as well ([`SIH_DISTSNSR_EN`](../advanced_config/parameter_reference.md#SIH_DISTSNSR_EN)). + +The flow sensor is configured with [`SIH_OF_EN`](../advanced_config/parameter_reference.md#SIH_OF_EN), [`SIH_OF_RATE`](../advanced_config/parameter_reference.md#SIH_OF_RATE), [`SIH_OF_NOISE`](../advanced_config/parameter_reference.md#SIH_OF_NOISE), and [`SIH_OF_H_MAX`](../advanced_config/parameter_reference.md#SIH_OF_H_MAX). +Quality drops to zero above `SIH_OF_H_MAX` or when the flow rate exceeds what the sensor can correlate. + +Two ready-made airframes use it: + +```sh +# Multicopter navigating on optical flow only (GNSS fusion disabled) +make px4_sitl_sih sihsim_quadx_flow + +# Standard VTOL navigating on optical flow only (GNSS fusion disabled) +make px4_sitl_sih sihsim_standard_vtol_flow +``` + #### Set Custom Takeoff Location The default takeoff location can be set using environment variables: @@ -128,6 +149,63 @@ export PX4_HOME_ALT=28.5 make px4_sitl_sih sihsim_quadx ``` +#### Sensor Calibration + +`simulator_sih orient` poses the vehicle on the ground the way accelerometer and magnetometer calibration ask for, so either calibration can be run from QGroundControl or a script. +Run it from the PX4 shell, or the [MAVLink shell](../debug/mavlink_shell.md), after starting the calibration: + +| 通信 | Pose | +| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- | +| `simulator_sih orient all` | Each side in turn: 10 s still, then 10 s rotating. Completes either calibration. | +| `simulator_sih orient ` | Still, with `` facing down: `down`, `up`, `front`, `back`, `left`, `right`. | +| `simulator_sih orient rotate` | Rotating about the vertical with `` down, with a tilt swing. | +| `simulator_sih orient off` | Level, then back to the flight dynamics. | + +`orient` is only built for SITL: sensor calibration is rejected when SIH runs on flight controller hardware. + +#### Terrain Elevation (DEM) {#terrain} + + + +By default SIH simulates flat ground at [`SIH_LOC_H0`](../advanced_config/parameter_reference.md#SIH_LOC_H0). +SIH can instead load the terrain elevation from a digital elevation model (DEM) [GeoTIFF](https://www.ogc.org/standards/geotiff/) file, set with the `PX4_SIH_TERRAIN` environment variable: + +```sh +PX4_SIH_TERRAIN=/path/to/dem.tif make px4_sitl_sih sihsim_quadx +``` + +The terrain is then used for: + +- Ground contact: the vehicle starts, lands and rests on the terrain. + It is placed at the terrain elevation below [`SIH_LOC_LAT0`](../advanced_config/parameter_reference.md#SIH_LOC_LAT0)/[`SIH_LOC_LON0`](../advanced_config/parameter_reference.md#SIH_LOC_LON0) (`PX4_HOME_LAT`/`PX4_HOME_LON`). + `SIH_LOC_H0` (`PX4_HOME_ALT`) sets the start altitude only when that point is outside the DEM. +- The downward facing distance sensor, which measures the range to the terrain along the vehicle body z axis (up to [`SIH_DISTSNSR_MAX`](../advanced_config/parameter_reference.md#SIH_DISTSNSR_MAX)). +- The `terrain_alt` field of the `vehicle_global_position_groundtruth` topic. +- The `dist_bottom` field of the `vehicle_local_position_groundtruth` topic. + +Outside the area covered by the DEM, or over cells without data, the ground is flat at `SIH_LOC_H0` and a warning is printed. +Terrain is supported for multicopters, VTOLs and fixed-wing vehicles; with any other vehicle type (such as Ackermann rovers), setting `PX4_SIH_TERRAIN` stops SIH from starting with an error. +`simulator_sih status` shows the loaded DEM and whether the vehicle is inside it. + +The DEM must be a single-band GeoTIFF whose coordinate reference system has an [EPSG code](https://epsg.io/), either geographic (such as WGS84, `EPSG:4326`) or projected (such as UTM or the Swiss `EPSG:2056`). +8, 16 and 32-bit integer and 32 and 64-bit floating point samples are supported with any TIFF compression, and the [_GDAL_](https://gdal.org/) nodata value is respected. +Elevations are used as they are, as altitude above mean sea level. +Free sources include [Copernicus GLO-30](https://registry.opendata.aws/copernicus-dem/) (near-global, 30 m, including buildings and vegetation) and national elevation models such as [swissALTI3D](https://www.swisstopo.admin.ch/en/height-model-swissalti3d) (2 m). +Crop large files to the area you fly in, for example with _GDAL_: + +```sh +gdal_translate -projwin 8.48 47.44 8.61 47.35 Copernicus_DSM_COG_10_N47_00_E008_00_DEM.tif zurich.tif +``` + +Files in other formats, with other sample types or without an EPSG code can be converted with `gdalwarp -t_srs EPSG:4326 -ot Float32 in.tif out.tif`. + +:::info +Terrain support is optional and only available in SITL, not when [running SIH on flight controller hardware](#sih-on-flight-controller-hardware). +The [prebuilt](../simulation/px4_sitl_prebuilt_packages.md) `px4` package and `px4io/px4-sitl` container are built without it, and SIH reports an error and does not start if `PX4_SIH_TERRAIN` is set. +When building from source, the [setup scripts](../dev_setup/dev_env.md) install the required libraries with the simulation tools. +The CMake output shows `SIH terrain (DEM) support enabled` when it is available. +::: + ### ROS 2 Integration SIH works with ROS 2 via the [uXRCE-DDS](../middleware/uxrce_dds.md) client, which auto-starts in SITL mode. diff --git a/docs/zh/simulation/community_supported_simulators.md b/docs/zh/simulation/community_supported_simulators.md index 1e47ce83fdb..3ebef4aeccb 100644 --- a/docs/zh/simulation/community_supported_simulators.md +++ b/docs/zh/simulation/community_supported_simulators.md @@ -17,7 +17,7 @@ Questions about these tools should be raised on the [discussion forums](../contr | [AirSim](../sim_airsim/index.md) |

A cross platform simulator that provides physically and visually realistic simulations. This simulator is resource intensive, and requires a significantly more powerful computer than the other simulators described here.

Supported Vehicles: Iris (MultiRotor model and a configuration for PX4 QuadRotor in the X configuration).

| | [FlightGear](../sim_flightgear/index.md) |

A simulator that provides physically and visually realistic simulations. In particular it can simulate many weather conditions, including thunderstorms, snow, rain and hail, and can also simulate thermals and different types of atmospheric flows. [Multi-vehicle simulation](../sim_flightgear/multi_vehicle.md) is also supported.

Supported Vehicles: Plane, Autogyro, Rover

| | [JSBSim](../sim_jsbsim/index.md) |

A simulator that provides advanced flight dynamics models. This can be used to model realistic flight dynamics based on wind tunnel data.

Supported Vehicles: Plane, Quad, Hex

| -| [PteroSim](../sim_pterosim/index.md) |

Proprietary high-fidelity UAV simulation built on Unreal Engine 5 and JSBSim. Connects to PX4 SITL over the Simulator MAVLink API with lockstep synchronization.

Supported Vehicles: Free tier: Multicopter. Paid tiers: Fixed-wing, VTOL, Helicopter.

| +| [PteroSim](../sim_pterosim/index.md) |

Proprietary high-fidelity UAV simulation built on Unreal Engine 5 and JSBSim. Connects to PX4 SITL over the Simulator MAVLink API with lockstep synchronization.

Supported Vehicles: Multicopter, Fixed-wing, VTOL, Tailsitter (all license tiers).

| | [RotorPy](../sim_rotorpy/index.md) |

A Python-based multirotor simulation environment with aerodynamic forces and moments, actuator limits, sensor noise, wind, obstacles, and a Gymnasium interface for research workflows.

Supported Vehicles: Quad

| | [X-Plane](../sim_xplane/index.md) |

A commercial flight simulator using blade element theory for flight dynamics. The PX4 integration uses the community-supported px4xplane bridge plugin.

Preconfigured PX4 targets: Plane, Multicopter, VTOL. Additional X-Plane aircraft or vehicle models can be integrated when PX4 has a matching SITL-capable control path and px4xplane can map the required actuator outputs to writable X-Plane datarefs.

|