diff --git a/docs/zh/SUMMARY.md b/docs/zh/SUMMARY.md index 297e179bd0..f4ca6c0a52 100644 --- a/docs/zh/SUMMARY.md +++ b/docs/zh/SUMMARY.md @@ -176,6 +176,7 @@ - [CBUnmanned H753-SOM](flight_controller/cbunmanned_h753-som.md) - [CORVON 743v1](flight_controller/corvon_743v1.md) - [CORVON 743v2](flight_controller/corvon_743v2.md) + - [CORVON V5](flight_controller/corvon_v5.md) - [CUAV Nora](flight_controller/cuav_nora.md) - [CUAV V5+ (FMUv5)](flight_controller/cuav_v5_plus.md) - [Wiring Quickstart](assembly/quick_start_cuav_v5_plus.md) @@ -184,6 +185,7 @@ - [CUAV X25 EVO](flight_controller/cuav_x25-evo.md) - [CUAV X25 EVO Wiring Quick Start](assembly/quick_start_cuav_x25_evo.md) - [CUAV X25 SUPER](flight_controller/cuav_x25-super.md) + - [CUAV X25 MEGA](flight_controller/cuav_x25-mega.md) - [CubePilot Cube Orange+ (CubePilot)](flight_controller/cubepilot_cube_orangeplus.md) - [CubePilot Cube Orange (CubePilot)](flight_controller/cubepilot_cube_orange.md) - [CubePilot Cube Yellow (CubePilot)](flight_controller/cubepilot_cube_yellow.md) @@ -253,6 +255,7 @@ - [Lightware Lidars (SF/LW/GRF)](sensor/sfxx_lidar.md) - [Lightware SF45 Rotary Lidar](sensor/sf45_rotating_lidar.md) - [Lightware GRF250/GRF500 Gimbal Lidar](sensor/grf_lidar.md) + - [Sony AS-DT1 LiDAR](sensor/sony_asdt1.md) - [TeraRanger](sensor/teraranger.md) - [✘ Lanbao PSK-CM8JL65-CC5](sensor/cm8jl65_ir_distance_sensor.md) - [Avionics Anonymous Laser Altimeter UAVCAN Interface (CAN)](dronecan/avanon_laser_interface.md) @@ -906,14 +909,15 @@ - [Windows Cygwin 工具链维护](dev_setup/dev_env_windows_cygwin_packager_setup.md) - [Qt Creator IDE](dev_setup/qtcreator.md) - [Simulators](simulation/community_supported_simulators.md) + - [AirSim Simulation](sim_airsim/index.md) - [FlightGear 仿真](sim_flightgear/index.md) - [FlightGear 机体](sim_flightgear/vehicles.md) - [用 FlightGear 进行多机仿真](sim_flightgear/multi_vehicle.md) - [jMAVSim 模拟](sim_jmavsim/index.md) - [使用 JMAVSim 进行多飞行器仿真](sim_jmavsim/multi_vehicle.md) - [JSBSim Simulation](sim_jsbsim/index.md) - - [AirSim Simulation](sim_airsim/index.md) - [RotorPy Simulation](sim_rotorpy/index.md) + - [X-Plane Simulation](sim_xplane/index.md) - [Hardware Simulation](simulation/hardware.md) - [HITL Simulation](simulation/hitl.md) - [SIH on Hardware](sim_sih/hardware.md) diff --git a/docs/zh/advanced_config/ethernet_setup.md b/docs/zh/advanced_config/ethernet_setup.md index 6e8f8e317f..d3486953f5 100644 --- a/docs/zh/advanced_config/ethernet_setup.md +++ b/docs/zh/advanced_config/ethernet_setup.md @@ -30,6 +30,7 @@ PX4 supports Ethernet connectivity on [Pixhawk 5X-standard](https://github.com/p - [CUAV Pixhawk V6X](../flight_controller/cuav_pixhawk_v6x.md) - [CUAV X25 EVO](../flight_controller/cuav_x25-evo.md) - [CUAV X25 SUPER](../flight_controller/cuav_x25-super.md) +- [CUAV X25-MEGA](../flight_controller/cuav_x25-mega.md) - [Holybro Pixhawk 5X](../flight_controller/pixhawk5x.md) - [Holybro Pixhawk 6X](../flight_controller/pixhawk6x.md) - [RaccoonLab FMUv6X Autopilot](../flight_controller/raccoonlab_fmu6x.md) diff --git a/docs/zh/airframes/airframe_reference.md b/docs/zh/airframes/airframe_reference.md index 0fcbb9edfd..b73222968c 100644 --- a/docs/zh/airframes/airframe_reference.md +++ b/docs/zh/airframes/airframe_reference.md @@ -57,7 +57,7 @@ div.frame_variant td, div.frame_variant th { - + @@ -68,9 +68,13 @@ div.frame_variant td, div.frame_variant th { 参数名 + + Generic Airship + Maintainer: Hyunduk Shin <hyunduk@icarus-airship.com>

SYS_AUTOSTART = 2500


Specific Outputs: + Cloudship - Maintainer: John Doe <john@example.com>

SYS_AUTOSTART = 2507

+ Maintainer: John Doe <john@example.com>

SYS_AUTOSTART = 2507


Specific Outputs: diff --git a/docs/zh/assembly/quick_start_cuav_x25_evo.md b/docs/zh/assembly/quick_start_cuav_x25_evo.md index 93cdc7e55f..adc07b393d 100644 --- a/docs/zh/assembly/quick_start_cuav_x25_evo.md +++ b/docs/zh/assembly/quick_start_cuav_x25_evo.md @@ -10,6 +10,7 @@ This quick start guide shows how to power the [X25 EVO](../flight_controller/cua :::info The following flight controller models are applicable to this quick start guide. [CUAV X25 SUPER](../flight_controller/cuav_x25-super.md) +[CUAV X25 MEGA](../flight_controller/cuav_x25-mega.md) ::: ## 接线图概述 @@ -151,3 +152,4 @@ QuadPlane-specific configuration is covered here: [QuadPlane VTOL Configuration] - [CUAV Docs](https://doc.cuav.net/) (CUAV) - [X25 EVO](../flight_controller/cuav_x25-evo.md) (PX4 Doc Overview page) - [X25 SUPER](../flight_controller/cuav_x25-super.md) (PX4 Doc Overview page) +- [[X25 MEGA](../flight_controller/cuav_x25-mega.md)] (PX4 Doc Overview page) diff --git a/docs/zh/can/index.md b/docs/zh/can/index.md index 2fa541ca9e..e9292a51a1 100644 --- a/docs/zh/can/index.md +++ b/docs/zh/can/index.md @@ -85,7 +85,7 @@ Don't connect each CAN peripheral to a separate CAN port! ::: Generally you'll daisy all CAN peripherals off a single port, and if there is more than one CAN port, use the second one for [redundancy](#redundancy). -If three are three ports, you might use the remaining network for devices that support another CAN protocol. +If there are three ports, you might use the remaining network for devices that support another CAN protocol. The documentation for your flight controller should indicate which ports are supported/enabled. At runtime you can check what DroneCAN ports are enabled and their status using the following command on the [MAVLink Shell](../debug/mavlink_shell.md) (or some other console): diff --git a/docs/zh/computer_vision/collision_prevention.md b/docs/zh/computer_vision/collision_prevention.md index f1d80ebb11..b0837ad80b 100644 --- a/docs/zh/computer_vision/collision_prevention.md +++ b/docs/zh/computer_vision/collision_prevention.md @@ -41,6 +41,15 @@ At time of writing PX4 allows you to use the [Lanbao PSK-CM8JL65-CC5](../sensor/ PX4 v1.14 (and later) supports the [LightWare LiDAR SF45](../sensor/sf45_rotating_lidar.md) rotating lidar which provides 320 degree sensing. +### Sony AS-DT1 LiDAR + +PX4 supports the [Sony AS-DT1](../sensor/sony_asdt1.md) multipoint LiDAR as a directly connected UART sensor for collision prevention. +The driver publishes measurements to `obstacle_distance` with 5 degree bins, using the configured sensor yaw offset. + +The AS-DT1 covers a forward horizontal field of view of about 35 degrees. +Only the covered sectors are populated; other directions remain no-data unless covered by another sensor. +Configure the sensor as described in the [Sony AS-DT1](../sensor/sony_asdt1.md) guide, then enable collision prevention with [CP_DIST](#CP_DIST). + ### Other Rangefinders 其他传感器的使能需要修改驱动代码来设置传感器方向和视觉范围。 diff --git a/docs/zh/debug/failure_injection.md b/docs/zh/debug/failure_injection.md index f3f9988d57..e289c3e15a 100644 --- a/docs/zh/debug/failure_injection.md +++ b/docs/zh/debug/failure_injection.md @@ -5,16 +5,14 @@ This enables easier testing of [safety failsafe](../config/safety.md) behaviour, Failure injection is disabled by default, and can be enabled using the [SYS_FAILURE_EN](../advanced_config/parameter_reference.md#SYS_FAILURE_EN) parameter. -:::warning -Failure injection still in development. -At time of writing (PX4 v1.14): +Failure injection must also be be supported by the current simulator, and the set of supported failures is simulator-dependent. -- Support may vary by failure type and between simulatiors and real vehicle. -- It requires support in the simulator. - It is supported in Gazebo Classic -- Many failure types are not broadly implemented. - In those cases the command will return with an "unsupported" message. +:::info +PX4 may accept a command to set a particular failure mode even it that mode is not supported by your simulator. +All [MAV_CMD_INJECT_FAILURE](https://mavlink.io/en/messages/common.html#MAV_CMD_INJECT_FAILURE) commands are handled internally by the failure-injection module, which acknowledges each command and republishes the active failures for the sensor/actuator simulators to apply. +The failure-injection module will NACK the command with [MAV_RESULT_UNSUPPORTED](https://mavlink.io/en/messages/common.html#MAV_RESULT_UNSUPPORTED) for failure combinations that are not implemented by PX4 or any simulator. +However it the module will accept (respond with [MAV_MISSION_ACCEPTED](https://mavlink.io/en/messages/common.html#MAV_MISSION_ACCEPTED)) for any other failure-type, even if it is not supported by your _particular_ simulator. ::: ## Failure System Command @@ -72,19 +70,19 @@ It is used in [PX4 Integration Testing](../test_and_ci/integration_testing_mavsd The plugin API is a direct mapping of the failure command shown above, with a few additional error signals related to the connection. -## Example: RC signal +## Example: GPS -To simulate losing RC signal without having to turn off your RC controller: +To test the GPS failsafe by stopping GPS: 1. Enable the [SYS_FAILURE_EN](../advanced_config/parameter_reference.md#SYS_FAILURE_EN) parameter. 2. Enter the following commands on the MAVLink console or SITL _pxh shell_: ```sh - # Fail RC (turn publishing off) - failure rc_signal off + # Stop GPS publishing + failure gps off - # Restart RC publishing - failure rc_signal ok + # Restart GPS publishing + failure gps ok ``` ## Example: Motor diff --git a/docs/zh/flight_controller/autopilot_manufacturer_supported.md b/docs/zh/flight_controller/autopilot_manufacturer_supported.md index b46d9b2089..0d31172631 100644 --- a/docs/zh/flight_controller/autopilot_manufacturer_supported.md +++ b/docs/zh/flight_controller/autopilot_manufacturer_supported.md @@ -28,11 +28,13 @@ The boards in this category are: - [CBUnmanned H753-SOM](../flight_controller/cbunmanned_h753-som.md) - [CORVON 743v1](../flight_controller/corvon_743v1.md) - [CORVON 743v2](../flight_controller/corvon_743v2.md) +- [CORVON v5](../flight_controller/corvon_v5.md) - [CUAV Nora](../flight_controller/cuav_nora.md) (CUAV X7 variant) - [CUAV V5+](../flight_controller/cuav_v5_plus.md) (FMUv5) - [CUAV V5 nano](../flight_controller/cuav_v5_nano.md) (FMUv5) - [CUAV X25 EVO](../flight_controller/cuav_x25-evo.md) - [CUAV X25 SUPER](../flight_controller/cuav_x25-super.md) +- [CUAV X25 MEGA](../flight_controller/cuav_x25-mega.md) - [CubePilot Cube Orange+](../flight_controller/cubepilot_cube_orangeplus.md) - [CubePilot Cube Orange](../flight_controller/cubepilot_cube_orange.md) - [CubePilot Cube Yellow](../flight_controller/cubepilot_cube_yellow.md) diff --git a/docs/zh/flight_controller/corvon_v5.md b/docs/zh/flight_controller/corvon_v5.md new file mode 100644 index 0000000000..dd3fb678f8 --- /dev/null +++ b/docs/zh/flight_controller/corvon_v5.md @@ -0,0 +1,193 @@ +# CORVON V5 Autopilot + + + +:::warning +PX4 does not manufacture this (or any) autopilot. +Contact the [manufacturer](https://corvon.tech) for hardware support or compliance issues. +::: + +The CORVON V5 is based on the Pixhawk FMUv5 design standard and runs PX4 on NuttX. + +![CORVON V5 side view 1](../../assets/flight_controller/corvon_v5/sideview_1.png) + +:::info +This flight controller is [manufacturer supported](autopilot_manufacturer_supported.md). +::: + +## Specifications {#specifications} + +- **Main FMU Processor:** STM32F765IIK + - 32 位 Arm® Cortex®-M7,216MHz,2MB 储存,512KB RAM + +- **On-board sensors:** + - 加速度计 / 陀螺仪:ICM-20689 + - 加速度计 / 陀螺仪:ICM-20602 + - Accel/Gyro: BMI088 + - 磁力计:IST8310 + - 气压计:MS5611 + +- **Interfaces:** + - 8 PWM outputs + - FMU上有3个专用PWM/Capture输入 + - CPPM专用的RC输入 + - Dedicated R/C input for Spektrum / DSM and S.Bus + - 电平/PWM RSSI输入 + - 4个通用串行口 + - 3 个 I2C 接口 + - 4路SPI总线 + - 2 CAN Buses + - 电池电压 / 电流模拟输入口 + - 2 additional analog inputs + - Supports nARMED + +- **Power System:** + - Power Brick Input: 4.75~5.5V + - USB-C Power Input: 4.75~5.25V + +- **Weight and Dimensions:** + - Weight: 42.1g + - Dimensions: 61.2 x 40 x 15.9mm + +- **Other Characteristics:** + - Operating temperature: -20 ~ 85°C (Measured value) + +## Where to Buy {#store} + +- [CORVON Store](https://corvon.tech) + +## Connectors and Interfaces + +![Connectors and Interfaces](../../assets/flight_controller/corvon_v5/connectors_and_interfaces.png) + +## 针脚定义 + +Download Corvon V5 pinouts from here: [corvon_v5_pinout.xlsx](https://github.com/PX4/PX4-Autopilot/raw/main/docs/assets/flight_controller/corvon_v5/corvon_v5_pinout.xlsx) + +## 串口映射 + +| UART | 设备 | Port | Flow Control | +| ------ | ------------ | ---------------------------------------- | :----------: | +| USART1 | `/dev/ttyS0` | GPS | - | +| USART2 | `/dev/ttyS1` | TELEM1 | Yes | +| USART3 | `/dev/ttyS2` | TELEM2 | Yes | +| UART4 | `/dev/ttyS3` | TELEM4 | - | +| USART6 | `/dev/ttyS4` | RC | - | +| UART7 | `/dev/ttyS5` | 调试控制台 | - | +| UART8 | `/dev/ttyS6` | Reserved for optional onboard RTK module | - | + +:::info +UART8 is reserved for an optional onboard UM982 module footprint and is not intended for general external use. +::: + +## 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 (read the instructions that come with your specific transmitter/receiver). + +The ports and supported protocols are: + +- `DSM/SBUS/RSSI` (FMU): SBUS, DSM/DSMX, ST24, SUMD, CRSF, and GHST receivers +- `RC`: PPM + +For PPM and S.Bus receivers, a single signal wire carries all channels. +If your receiver outputs individual PWM signals (one wire per channel) it must be connected via a [PPM encoder](../getting_started/rc_transmitter_receiver.md). + +### GPS & Compass {#gps_compass} + +PX4 supports GPS modules connected to the GPS port(s) listed below. +The module should be [mounted on the frame](../assembly/mount_gps_compass.md) as far away from other electronics as possible, with the direction marker pointing towards the front of the vehicle. + +The GPS ports are: + +- `GPS&SAFETY` (FMU): 10-pin JST GH ([Pixhawk Connector Standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-009%20Pixhawk%20Connector%20Standard.pdf)) — GPS, compass (I2C), safety switch, buzzer, LED. + +The GPS module's integrated safety switch is enabled _by default_ (when enabled, PX4 will not let you arm the vehicle). +To disable the safety switch press and hold it for 1 second. +You can press the safety switch again to enable safety and disarm the vehicle. + +## PWM Outputs {#pwm_outputs} + +This flight controller supports up to 8 FMU PWM outputs (`MAIN`). + +[DShot](../peripherals/dshot.md) is not supported. + +The 8 outputs are in 3 groups: + +- Outputs 1-4 in group1 (Timer1) +- Outputs 5-6 in group2 (Timer4) +- Outputs 7-8 in group3 (Timer12) + +All outputs within the same group must use the same output protocol and rate. + +## Debug Port {#debug_port} + +The [PX4 System Console](../debug/system_console.md) and [SWD interface](../debug/swd_debug.md) operate on the **FMU Debug** port (`DSU7`). + +The debug port (`DSU7`) has the following pinout: + +| 针脚 | 信号 | 电压 | +| -- | ------------------------------ | --------------------- | +| 1 | GND | GND | +| 2 | FMU_SWCLK | +3.3V | +| 3 | FMU_SWDIO | +3.3V | +| 4 | DEBUG RX | +3.3V | +| 5 | DEBUG TX | +3.3V | +| 6 | 5V+ | +5V | + +:::warning +The 5V+ pin (6) provides 5V, but the CPU logic runs at 3.3V! + +Some JTAG/SWD adapters (like SEGGER J-Link) may use the Vref voltage pin to set the logic level on the SWD data lines. Connecting 5V to the adapter's `Vtref` can damage the CPU. +For a direct connection to a _Segger Jlink_, we recommend you use a 3.3V source to provide `Vtref` to the JTAG adapter (i.e. providing 3.3V and _NOT_ 5V). +::: + +## 额定电压 + +CORVON V5 must be powered from the **POWER** connector during flight, and may also be powered from **USB** for bench testing. + +- **POWER input:** 4.75~5.5V +- **USB input:** 4.75~5.25V + +The **PM2** connector **cannot power** the flight controller. +On PX4, **do not use** this interface. + +## 编译固件 + +To build PX4 for this target: + +```sh +make corvon_v5_default +``` + +## Installing PX4 Firmware + +The firmware can be installed in any of the normal ways: + +- **Build and upload the source** + + ```sh + make corvon_v5_default upload + ``` + +- **Load the firmware using _QGroundControl_.** + You can use either pre-built firmware or your own custom firmware. + +:::info +If this target is not listed in _QGroundControl_, build and upload from source or load a custom firmware file (see [Installing PX4 Main, Beta or Custom Firmware](../config/firmware.md#installing-px4-main-beta-or-custom-firmware)). +::: + +## 支持的平台/机身 + +Any multicopter / airplane / rover or boat that can be controlled with normal RC servos or Futaba S-Bus servos. +The complete set of supported configurations can be seen in the [Airframes Reference](../airframes/airframe_reference.md). + +## 内容: + +![CORVON V5 front view](../../assets/flight_controller/corvon_v5/frontview.png) +![CORVON V5 side view 1](../../assets/flight_controller/corvon_v5/sideview_1.png) +![CORVON V5 side view 2](../../assets/flight_controller/corvon_v5/sideview_2.png) + +## 更多信息 + +- [Corvon Tech](https://corvon.tech) diff --git a/docs/zh/flight_controller/cuav_x25-mega.md b/docs/zh/flight_controller/cuav_x25-mega.md new file mode 100644 index 0000000000..630683656e --- /dev/null +++ b/docs/zh/flight_controller/cuav_x25-mega.md @@ -0,0 +1,199 @@ +# CUAV X25-MEGA + + + +:::warning +PX4 does not manufacture this (or any) autopilot. +Contact the [manufacturer](https://store.cuav.net/) for hardware support or compliance issues. +::: + +The _X25-MEGA_ is an advanced autopilot manufactured by CUAV®. + +The autopilot is recommended for commercial system integration but is also suitable for academic research and any other applications. + +![X25-MEGA AutoPilot - hero image](../../assets/flight_controller/cuav_x25-mega/x25-mega.png) + +The X25-MEGA brings you ultimate performance, stability, and reliability in every aspect. + +:::info +These flight controllers are [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md). +::: + +### 特性 + +- Arm® Cortex-M7® processor (STM32H743XI) with Floating-Point Unit (FPU), operating at 480MHz, and featuring 2MB Flash memory. + Enables developers to enhance productivity and efficiency, allowing for more complex algorithms and models. +- Automotive-grade RM3100 compass. + Designed for better stability and anti-interference capability. +- Triple-redundant IMUs and dual-redundant barometers located on separate buses. + If the PX4 autopilot detects a sensor failure, the system seamlessly switches to another sensor to maintain flight control reliability. +- Independent LDO power control supplies power to each sensor group. + A vibration isolation system filters high-frequency vibrations and reduces noise to ensure accurate readings, enabling better overall flight performance for the vehicle. +- Integrated Microchip Ethernet PHY for high-speed communication with onboard devices like mission computers via Ethernet. +- Dual temperature compensation systems, located on the IMU board and FMU board respectively. + Temperature is controlled by onboard heating resistors to achieve the optimal operating temperature for the IMUs. +- PWM servo output voltage switchable between 3.3V or 5V. +- Modular design for DIY carrier boards. + +### Processors & Sensors + +- Main Processor: STM32H743XI + - 32-bit Arm® Cortex®-M7, 480MHz, 2MB Flash, 1MB RAM +- Onboard Sensors: + - Accel/Gyro: ADIS16607 + - Accel/Gyro: IIM42652 + - Accel/Gyro: IIM42653 + - Magnetometer: RM3100 + - Barometer: BMP581 + - Barometer: ICP-20100 + +### Electrical Data + +- Rated Voltage: + - Input Voltage: 10~18V + - USB 电源输入:4.75~5.25V + - Servo Rail Input: 0~9.9V +- Rated Current: + - Total Output Max Current: 10A + - `TELEM1` and `TELEM2` Output Current limiter: 4A + - `CAN1` and `CAN2` Output Current limiter: 2.4A + - Other Ports Output Current limiter: 1.5A + +### 接口 + +- 16x PWM Servo Outputs +- 1x Dedicated R/C Input (`RC IN`) for Spektrum / DSM and S.Bus +- 1x Analog/PWM RSSI Input +- 2x TELEM Ports (with full flow control) +- 1x UART4 Port +- 2x GPS Ports + - 1x Full GPS plus Safety Switch Port (GPS1) + - 1x Basic GPS Port (with I2C, GPS2) +- 1x USB Port (TYPE-C) +- 1x Ethernet Port + - Transformerless application + - 100Mbps +- 3x I2C Bus Ports +- 1x SPI Bus + - 1x Chip Select Line + - 1x Data Ready Line + - 1x SPI Reset Line +- 5x CAN Ports for CAN Peripherals + - 3x CAN1 Bus Multiplexed Ports + - 2x CAN2 Bus Multiplexed Ports +- 2x Power Input Ports + - DroneCAN/UAVCAN Power Input +- 2x AD Ports + - Analog Input (3.3V) + - Analog Input (6.6V - not supported) +- 1x Dedicated Debug Port + - FMU Debug + +### Mechanical Data + +- Dimensions: + + ![CUAV X25-MEGA](../../assets/flight_controller/cuav_x25-mega/x25-mega_size.png) + +## Purchase Channels {#store} + +Order from [CUAV](https://store.cuav.net/). + +## 组装 / 设置 + +The [X25 MEGA Wiring Quick Start](../assembly/quick_start_cuav_x25_evo.md) provides instructions on how to assemble required/important peripherals including GPS, Power Module etc. + +## 针脚定义 + +![CUAV X25-MEGA Pinout_01](../../assets/flight_controller/cuav_x25-mega/x25-mega_pinouts_01.png) +![CUAV X25-MEGA Pinout_02](../../assets/flight_controller/cuav_x25-mega/x25-mega_pinouts_02.png) + +## PWM Outputs {#pwm_outputs} + +This flight controller supports up to 16 FMU PWM outputs (MAIN). + +Outputs: + +- Outputs 1-8 support [DShot](../peripherals/dshot.md). +- Outputs 9-16 do not support DShot. +- Outputs 1-7 support [Bidirectional DShot](../peripherals/dshot.md#bidirectional-dshot-telemetry). +- Output 8 supports Bidirectional DShot output only (no eRPM capture). + +The 16 outputs are in 5 groups: + +- Outputs 1-4 in group1 (Timer5) +- Outputs 5-8 in group2 (Timer4) +- Outputs 9-11 in group3 (Timer1) +- Outputs 12-14 in group4 (Timer8) +- Outputs 15-16 in group5 (Timer12) + +All outputs within the same group must use the same output protocol and rate. + +## 串口映射 + +| UART | 设备 | Port | +| ------ | ---------- | ------ | +| USART1 | /dev/ttyS0 | GPS1 | +| USART2 | /dev/ttyS1 | GPS2 | +| USART3 | /dev/ttyS2 | 调试控制台 | +| UART4 | /dev/ttyS3 | UART4 | +| UART5 | /dev/ttyS4 | TELEM2 | +| USART6 | /dev/ttyS5 | RC IN | +| UART7 | /dev/ttyS6 | TELEM1 | + +## RC Input + +The RC input pin is directly connected to the FMU UART6 TX. + +## 额定电压 + +The _X25-MEGA_ achieves triple redundancy on power supplies if three power sources are provided. +The three power rails are `POWER C1`, `POWER C2`, and `USB`. + +- **POWER C1** and **POWER C2** are DroneCAN/UAVCAN battery interfaces. + +**Normal Operation Maximum Ratings** + +Under these conditions, all power sources will be used to power the system in the following order: + +1. **POWER C1** and **POWER C2** Inputs (10V to 18V) +2. USB Input (4.75V to 5.25V) + +**Voltage monitoring** + +Digital DroneCAN/UAVCAN battery monitoring is enabled by default. + +## 编译固件 + +:::tip +Most users will not need to build this firmware (from PX4 v1.18). +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, execute: + +```sh +make cuav_x25-mega_default +``` + +## Debug Port {#debug_port} + +The [PX4 System Console](../debug/system_console.md) and [SWD Interface](../debug/swd_debug.md) operate on the **FMU Debug** port. + +| 针脚 | 信号 | 电压 | +| ---- | --------------------------------- | --------------------- | +| 1(红) | 5V+ | +5V | +| 2 | DEBUG TX (OUT) | +3.3V | +| 3 | DEBUG RX (IN) | +3.3V | +| 4(黑) | FMU_SWDIO | +3.3V | +| 6 | FMU_SWCLK | +3.3V | +| 6 | GND | GND | + +## 支持的平台/机身 + +Any multicopter / airplane / rover or boat that can be controlled with normal RC servos or Futaba S-Bus servos. +The complete set of supported configurations can be seen in the [Airframes Reference](../airframes/airframe_reference.md). + +## 更多信息 + +- [CUAV Docs](https://doc.cuav.net/) diff --git a/docs/zh/frames_airship/index.md b/docs/zh/frames_airship/index.md index 98c274861d..ab5e8bd810 100644 --- a/docs/zh/frames_airship/index.md +++ b/docs/zh/frames_airship/index.md @@ -7,5 +7,9 @@ Support for airships is [experimental](../airframes/index.md#experimental-vehicl Maintainer volunteers, [contribution](../contribute/index.md) of new features, new frame configurations, or other improvements would all be very welcome! ::: -PX4 supports a single airship geometry with starboard, port and tail thrusters, and a thrust tilt server. -The frame configuration is shown in [Airframes Reference > Airship](../airframes/airframe_reference.md#airship). +PX4 supports two airship geometries: + +- **Generic airship:** two forward thrusters and a cruciform tail with elevators and rudders. +- **Cloudship:** starboard, port and tail thrusters with a thrust tilt servo. + +The frame configurations are shown in [Airframes Reference > Airship](../airframes/airframe_reference.md#airship). diff --git a/docs/zh/hardware/board_support_guide.md b/docs/zh/hardware/board_support_guide.md index 4db14a86cc..f852403e20 100644 --- a/docs/zh/hardware/board_support_guide.md +++ b/docs/zh/hardware/board_support_guide.md @@ -70,12 +70,20 @@ The pair must be unique to your product. Each board needs its own identity. ::: -You have two ways to get a valid pair: +There are several ways to get a valid pair, listed in order of preference: -- **Provide your own.** As the hardware manufacturer, the VID/PID identify _your_ company and product, and you are expected to obtain them yourself. -- **Use the Dronecode VID.** [Dronecode Foundation members](https://dronecode.org/membership/) can request a PID allocated under the Dronecode USB VID. - This is one of the membership benefits, alongside access to the Pixhawk FMU reference schematics. - If you would like to use the Dronecode VID, [become a member](https://dronecode.org/membership/) first. +1. **Buy your own VID from USB-IF (preferred).** As a serious hardware manufacturer, the cleanest option is to purchase your own Vendor ID directly from the [USB Implementers Forum](https://www.usb.org/getting-vendor-id). + The VID/PID then unambiguously identify _your_ company and product. +2. **Obtain a free VID/PID.** If purchasing your own is not an option, you can get a free VID/PID pair from one of several community registries or chip-vendor programs, for example [pid.codes](https://pid.codes/) (VID `0x1209`) or the [Openmoko registry](https://github.com/openmoko/openmoko-usb-oui) (VID `0x1d50`) for open-source hardware, or a sub-PID from your MCU/USB-bridge vendor (e.g. Microchip, FTDI). + PX4 takes no position on how you source a free pair and assumes no responsibility for it. + The only requirement is that your VID/PID pair is unique and does not conflict with anything already in the PX4 codebase. +3. **Use the Dronecode VID.** [Dronecode Foundation members](https://dronecode.org/membership/) can request a PID allocated under the Dronecode USB VID. + This is one of the membership benefits, alongside access to the Pixhawk FMU reference schematics. + +:::info +Membership is **not** required to get your board supported in PX4. +The Dronecode VID is a convenience for members; any unique, non-conflicting VID/PID pair from the options above is equally acceptable for a board support pull request. +::: ### 4. Fly it and Capture Logs diff --git a/docs/zh/modules/hello_sky.md b/docs/zh/modules/hello_sky.md index 48007499ea..977cf133d5 100644 --- a/docs/zh/modules/hello_sky.md +++ b/docs/zh/modules/hello_sky.md @@ -317,7 +317,7 @@ Individual message channels between applications are called [topics](../middlewa ```cpp #include .. -int sensor_sub_fd = orb_subscribe(ORB_ID(vehicle_acceleration)); +orb_sub_t sensor_sub_fd = orb_subscribe(ORB_ID(vehicle_acceleration)); ``` The `sensor_sub_fd` is a topic handle and can be used to very efficiently perform a blocking wait for new data. @@ -330,7 +330,7 @@ Adding `poll()` to the subscription looks like (_pseudocode, look for the full i #include #include .. -int sensor_sub_fd = orb_subscribe(ORB_ID(vehicle_acceleration)); +orb_sub_t sensor_sub_fd = orb_subscribe(ORB_ID(vehicle_acceleration)); /* one could wait for multiple topics with this technique, just using one here */ px4_pollfd_struct_t fds[] = { @@ -475,7 +475,7 @@ int px4_simple_app_main(int argc, char *argv[]) PX4_INFO("Hello Sky!"); /* subscribe to vehicle_acceleration topic */ - int sensor_sub_fd = orb_subscribe(ORB_ID(vehicle_acceleration)); + orb_sub_t sensor_sub_fd = orb_subscribe(ORB_ID(vehicle_acceleration)); /* limit the update rate to 5 Hz */ orb_set_interval(sensor_sub_fd, 200); diff --git a/docs/zh/modules/modules_driver_distance_sensor.md b/docs/zh/modules/modules_driver_distance_sensor.md index 7b9287a5a1..6cd88b8252 100644 --- a/docs/zh/modules/modules_driver_distance_sensor.md +++ b/docs/zh/modules/modules_driver_distance_sensor.md @@ -382,6 +382,38 @@ pga460 [arguments...] help ``` +## sony_asdt1 + +Source: [drivers/distance_sensor/sony](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/sony) + +### 描述 + +Sony AS-DT1 serial driver. The driver probes 921600 and 115200 baud, configures +the sensor for binary streaming, and publishes multipoint distance measurements. + +### 示例 + +``` +sony_asdt1 start -d /dev/ttyS4 +sony_asdt1 start -d /dev/ttyS4 -s +sony_asdt1 status +sony_asdt1 stop +``` + +### Usage {#sony_asdt1_usage} + +``` +sony_asdt1 [arguments...] + Commands: + start Start driver + -d Serial device + [-s] Send flshow and print response instead of starting measurements + + stop Stop driver + + status Print driver status +``` + ## srf02 Source: [drivers/distance_sensor/srf02](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/srf02) diff --git a/docs/zh/modules/modules_driver_ins.md b/docs/zh/modules/modules_driver_ins.md index 8e7bb95f5c..57b178bdb5 100644 --- a/docs/zh/modules/modules_driver_ins.md +++ b/docs/zh/modules/modules_driver_ins.md @@ -121,8 +121,6 @@ ilabs [arguments...] status Driver status stop Stop driver - - status Print driver status ``` ## sbgecom @@ -187,6 +185,4 @@ vectornav [arguments...] status Driver status stop Stop driver - - status Print driver status ``` diff --git a/docs/zh/modules/modules_system.md b/docs/zh/modules/modules_system.md index 019ecd0459..d27ac62dba 100644 --- a/docs/zh/modules/modules_system.md +++ b/docs/zh/modules/modules_system.md @@ -256,6 +256,33 @@ esc_battery [arguments...] status print status info ``` +## failure_injection_manager + +Source: [modules/failure_injection_manager](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/failure_injection_manager) + +### 描述 + +The failure injection manager is the single subscriber to `vehicle_command` for +`MAV_CMD_INJECT_FAILURE`. It maintains the set of currently active failures and +publishes the `failure_injection` topic, republishing only when the configuration +changes so that command spam cannot propagate to the consumers that apply the +failures. It also produces the central `vehicle_command_ack`. + +Failure injection is gated by the `SYS_FAILURE_EN` parameter, which the startup +script checks before starting this module. + +### Usage {#failure_injection_manager_usage} + +``` +failure_injection_manager [arguments...] + Commands: + start + + stop + + status print status info +``` + ## gyro_calibration Source: [modules/gyro_calibration](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/gyro_calibration) diff --git a/docs/zh/msg_docs/FailureInjection.md b/docs/zh/msg_docs/FailureInjection.md new file mode 100644 index 0000000000..c5ece8711f --- /dev/null +++ b/docs/zh/msg_docs/FailureInjection.md @@ -0,0 +1,126 @@ +--- +pageClass: is-wide-page +--- + +# FailureInjection (UORB message) + +Failure injection configuration. + +Currently active failure-injection configuration, published by the failure +injection manager (the sole subscriber to vehicle_command INJECT_FAILURE). +Republished only when the configuration changes, so command spam on +vehicle_command cannot propagate to the consumers applying the failures. + +**TOPICS:** failure_injection + +## Fields + +| 参数名 | 类型 | Unit [Frame] | Range/Enum | 描述 | +| ---------------------------------------------------------------- | ----------- | ---------------------------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------- | +| timestamp | `uint64` | us | | Time since system start | +| count | `uint8` | | | number of valid entries in the arrays below | +| unit | `uint8[4]` | | [FAILURE_UNIT](#FAILURE_UNIT) | Affected component per entry | +| instance_mask | `uint16[4]` | | | Bit i targets instance (i+1); 0xFFFF = all instances | +| failure_type | `uint8[4]` | | [FAILURE_TYPE](#FAILURE_TYPE) | failure mode per entry | + +## Enums + +### FAILURE_UNIT {#FAILURE_UNIT} + +Used in field(s): [unit](#fld_unit) + +| 参数名 | 类型 | 值 | 描述 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --- | -- | +| FAILURE_UNIT_SENSOR_GYRO | `uint8` | 0 | | +| FAILURE_UNIT_SENSOR_ACCEL | `uint8` | 1 | | +| FAILURE_UNIT_SENSOR_MAG | `uint8` | 2 | | +| FAILURE_UNIT_SENSOR_BARO | `uint8` | 3 | | +| FAILURE_UNIT_SENSOR_GPS | `uint8` | 4 | | +| FAILURE_UNIT_SENSOR_OPTICAL_FLOW | `uint8` | 5 | | +| FAILURE_UNIT_SENSOR_VIO | `uint8` | 6 | | +| FAILURE_UNIT_SENSOR_DISTANCE_SENSOR | `uint8` | 7 | | +| FAILURE_UNIT_SENSOR_AIRSPEED | `uint8` | 8 | | +| FAILURE_UNIT_SYSTEM_BATTERY | `uint8` | 100 | | +| FAILURE_UNIT_SYSTEM_MOTOR | `uint8` | 101 | | +| FAILURE_UNIT_SYSTEM_SERVO | `uint8` | 102 | | +| FAILURE_UNIT_SYSTEM_AVOIDANCE | `uint8` | 103 | | +| FAILURE_UNIT_SYSTEM_RC_SIGNAL | `uint8` | 104 | | +| FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL | `uint8` | 105 | | + +### FAILURE_TYPE {#FAILURE_TYPE} + +Used in field(s): [failure_type](#fld_failure_type) + +| 参数名 | 类型 | 值 | 描述 | +| ----------------------------------------------------------------------------------------------------------- | ------- | - | -- | +| FAILURE_TYPE_OK | `uint8` | 0 | | +| FAILURE_TYPE_OFF | `uint8` | 1 | | +| FAILURE_TYPE_STUCK | `uint8` | 2 | | +| FAILURE_TYPE_GARBAGE | `uint8` | 3 | | +| FAILURE_TYPE_WRONG | `uint8` | 4 | | +| FAILURE_TYPE_SLOW | `uint8` | 5 | | +| FAILURE_TYPE_DELAYED | `uint8` | 6 | | +| FAILURE_TYPE_INTERMITTENT | `uint8` | 7 | | + +## Constants + +| 参数名 | 类型 | 值 | 描述 | +| ------------------------------------------------------------ | ------- | - | --------------------------------------- | +| MAX_FAILURES | `uint8` | 4 | maximum number of simultaneous failures | + +## Source Message + +[Source file (GitHub)](https://github.com/PX4/PX4-Autopilot/blob/main/msg/FailureInjection.msg) + +:::details +Click here to see original file + +```c +#Failure injection configuration. +# +# Currently active failure-injection configuration, published by the failure +# injection manager (the sole subscriber to vehicle_command INJECT_FAILURE). +# Republished only when the configuration changes, so command spam on +# vehicle_command cannot propagate to the consumers applying the failures. + +uint64 timestamp # [us] Time since system start + +uint8 MAX_FAILURES = 4 # maximum number of simultaneous failures + +uint8 count # number of valid entries in the arrays below + +uint8[4] unit # [@enum FAILURE_UNIT] Affected component per entry +# Failure unit (affected component). Mirrors MAVLink FAILURE_UNIT and the +# FAILURE_UNIT_* values in vehicle_command. +uint8 FAILURE_UNIT_SENSOR_GYRO = 0 +uint8 FAILURE_UNIT_SENSOR_ACCEL = 1 +uint8 FAILURE_UNIT_SENSOR_MAG = 2 +uint8 FAILURE_UNIT_SENSOR_BARO = 3 +uint8 FAILURE_UNIT_SENSOR_GPS = 4 +uint8 FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5 +uint8 FAILURE_UNIT_SENSOR_VIO = 6 +uint8 FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7 +uint8 FAILURE_UNIT_SENSOR_AIRSPEED = 8 +uint8 FAILURE_UNIT_SYSTEM_BATTERY = 100 +uint8 FAILURE_UNIT_SYSTEM_MOTOR = 101 +uint8 FAILURE_UNIT_SYSTEM_SERVO = 102 +uint8 FAILURE_UNIT_SYSTEM_AVOIDANCE = 103 +uint8 FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104 +uint8 FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105 + +uint16[4] instance_mask # Bit i targets instance (i+1); 0xFFFF = all instances + +uint8[4] failure_type # [@enum FAILURE_TYPE] failure mode per entry +# Failure mode. +# Mirrors MAVLink FAILURE_TYPE and the FAILURE_TYPE_* values in vehicle_command. +uint8 FAILURE_TYPE_OK = 0 +uint8 FAILURE_TYPE_OFF = 1 +uint8 FAILURE_TYPE_STUCK = 2 +uint8 FAILURE_TYPE_GARBAGE = 3 +uint8 FAILURE_TYPE_WRONG = 4 +uint8 FAILURE_TYPE_SLOW = 5 +uint8 FAILURE_TYPE_DELAYED = 6 +uint8 FAILURE_TYPE_INTERMITTENT = 7 +``` + +::: diff --git a/docs/zh/sensor/rangefinders.md b/docs/zh/sensor/rangefinders.md index 9abb86c800..6cc5a6ed2c 100644 --- a/docs/zh/sensor/rangefinders.md +++ b/docs/zh/sensor/rangefinders.md @@ -29,6 +29,7 @@ There may also be other DroneCAN rangefinders than those listed here. | [LightWare SF45/B] | ToF (IR laser) | ~50 m | UART | ~ | Rotary lidar (collision prevention) | | [MaxBotix I2CXL-MaxSonar-EZ] | Ultrasonic | | I2C | ~ | | | [RaccoonLab Cyphal & DroneCAN µRANGEFINDER] | ToF (IR) | ~0.1 m – ~8 m | DroneCAN, Cyphal | ~ | | +| [Sony AS-DT1] | ToF | up to 40 m | UART | ~ | Multipoint distance sensor | | [TeraRanger Evo 60 m] | ToF (IR) | 0.5 m – 60 m | I2C | ~ | | | [TeraRanger Evo 600Hz] | ToF (IR) | 0.75 m – 8 m | I2C | ~ | High update rate (600 Hz) | | [LightWare SF02] _(disc.)_ | ToF (IR laser) | ~50 m | UART | ~ | Discontinued | @@ -55,6 +56,7 @@ There may also be other DroneCAN rangefinders than those listed here. [LightWare SF10/B]: ../sensor/sfxx_lidar.md [LightWare SF10/C]: ../sensor/sfxx_lidar.md [MaxBotix I2CXL-MaxSonar-EZ]: #maxbotix-i2cxl-maxsonar-ez +[Sony AS-DT1]: ../sensor/sony_asdt1.md [TeraRanger Evo 60 m]: ../sensor/teraranger.md [TeraRanger Evo 600Hz]: ../sensor/teraranger.md [TeraRanger One]: ../sensor/teraranger.md @@ -109,6 +111,11 @@ Others may be supported via the [RaccoonLab Cyphal and DroneCAN Rangefinder Adap PX4 also supports the [LightWare LiDAR SF45 Rotating Lidar](../sensor/sf45_rotating_lidar.md) for [collision prevention](../computer_vision/collision_prevention.md) applications. +### Sony AS-DT1 + +[Sony AS-DT1](../sensor/sony_asdt1.md) is a multipoint distance sensor that connects to PX4 over a UART/serial port. +PX4 configures the sensor baud rate and measurement output from the driver. + ### TeraRanger 测距仪 [TeraRanger](../sensor/teraranger.md) provide a number of lightweight distance measurement sensors based on infrared Time-of-Flight (ToF) technology. diff --git a/docs/zh/sensor/sony_asdt1.md b/docs/zh/sensor/sony_asdt1.md new file mode 100644 index 0000000000..c5c66fd4f3 --- /dev/null +++ b/docs/zh/sensor/sony_asdt1.md @@ -0,0 +1,111 @@ +# Sony AS-DT1 LiDAR + +The _Sony AS-DT1 LiDAR_ is a multipoint distance sensor that connects to PX4 over a UART/serial port. + +PX4 configures the sensor for binary output and publishes the measurements to the [`obstacle_distance`](../msg_docs/ObstacleDistance.md) uORB topic. + +## Supported Modes + +The driver supports the AS-DT1 distance measurement range modes listed below. + +| 模式 | Maximum Measurement Distance | Minimum Frame Interval | Distance Measurement Points | +| ------ | ---------------------------- | ------------------------ | --------------------------- | +| 30MSTD | 30 m | 33.33 ms | 576 | +| 30M15F | 30 m | 66.66 ms | 576 | +| 30M30F | 30 m | 33.33 ms | 288 | +| 20M | 20 m | 33.33 ms | 576 | +| 40M | 40 m | 66.66 ms | 576 | + +The mode is selected using [SENS_ASDT1_MODE](../advanced_config/parameter_reference.md#SENS_ASDT1_MODE). + +## Collision Prevention Output + +The driver publishes the AS-DT1 data to the [`obstacle_distance`](../msg_docs/ObstacleDistance.md) uORB topic used by [Collision Prevention](../computer_vision/collision_prevention.md). +The message uses 72 bins at 5 degree increments around the vehicle. + +The AS-DT1 horizontal field of view is about 35 degrees. +The driver maps the sensor's horizontal band into the matching `obstacle_distance` bins and leaves uncovered directions as no-data. +[SENS_ASDT1_ROT](../advanced_config/parameter_reference.md#SENS_ASDT1_ROT) sets the yaw offset of this field of view relative to vehicle forward. + +## 硬件安装 + +The sensor can be connected to any unused _serial port_ (UART), such as `TELEM2`, `TELEM3`, or `GPS2`. + +The AS-DT1 uses the 8-pin JST-GH connector for external power and UART. +Connect the sensor TX/RX pins to the flight controller UART and share ground between the sensor power supply and flight controller. + +![Sony AS-DT1 UART wiring](../../assets/hardware/sensors/sony_asdt1/asdt1_uart_wiring.svg) + +| AS-DT1 8-pin Connector | 功能 | Connect To | +| ---------------------- | ------- | ------------------------------------------------------ | +| Pin 1 | GND | External power ground and flight controller serial GND | +| Pin 2 | VCC | External 12 V to 24 V power supply | +| Pin 5 | UART TX | Flight controller serial RX | +| Pin 6 | UART RX | Flight controller serial TX | + +The ground from AS-DT1 pin 1 must be common to both the external power supply and the flight controller serial port. +For example, splice or split the AS-DT1 ground wire so it connects to the power supply negative terminal and to the flight controller UART `GND` pin. + +Do not connect the AS-DT1 UART pins directly to RS-232 or RS-422 interfaces. +The AS-DT1 UART RX input is 5 V tolerant, and the sensor should be powered from the external 12 V to 24 V supply described in the Sony hardware documentation. + +## Firmware Setup + +The `sony_asdt1` driver must be included in the PX4 firmware for the target board. +If the Sony AS-DT1 parameters are not available, add the following line to the target board's `default.px4board` configuration, or enable the driver using [`boardconfig`](../hardware/porting_guide_config.md#px4-menuconfig-setup): + +```plain +CONFIG_DRIVERS_DISTANCE_SENSOR_SONY_ASDT1=y +``` + +Then rebuild and flash the firmware. + +## Parameter Setup + +Use the Sony application to set the sensor to **Measurement (UART)** mode before connecting it to PX4. + +The driver uses the following parameters: + +| Parameter | 描述 | +| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [SENS_ASDT1_CFG](../advanced_config/parameter_reference.md#SENS_ASDT1_CFG) | Selects the serial port and enables driver autostart on boot. | +| [SENS_ASDT1_MODE](../advanced_config/parameter_reference.md#SENS_ASDT1_MODE) | Selects the AS-DT1 measurement range mode. The driver configures the sensor mode and publishes matching `obstacle_distance` metadata. | +| [SENS_ASDT1_ROT](../advanced_config/parameter_reference.md#SENS_ASDT1_ROT) | Sets the sensor yaw offset, in degrees, relative to vehicle forward. This is published as `obstacle_distance.angle_offset`; positive values are clockwise. | + +`SENS_ASDT1_MODE` and `SENS_ASDT1_ROT` may not appear until `SENS_ASDT1_CFG` is enabled and the flight controller has rebooted once. + +Reboot the flight controller, or restart the driver manually, after changing these parameters. + +[Configure the serial port](../peripherals/serial_configuration.md) on which the sensor will run using [SENS_ASDT1_CFG](../advanced_config/parameter_reference.md#SENS_ASDT1_CFG). +There is no need to set the baud rate for the port, as this is configured by the driver. + +Set [SENS_ASDT1_MODE](../advanced_config/parameter_reference.md#SENS_ASDT1_MODE) to the required measurement mode and reboot the flight controller. + +If the sensor is mounted with a yaw offset from vehicle forward, set [SENS_ASDT1_ROT](../advanced_config/parameter_reference.md#SENS_ASDT1_ROT) to the offset in degrees. +Positive values are clockwise. + +## 测试 + +You can check the driver state in the _QGroundControl MAVLink Console_: + +```sh +sony_asdt1 status +``` + +You can observe the published measurements with: + +```sh +listener obstacle_distance +``` + +To print the sensor's saved configuration without starting measurements, run: + +```sh +sony_asdt1 start -d /dev/ttyS2 -s +``` + +Replace `/dev/ttyS2` with the serial device for your board and port. + +## 更多信息 + +- [Modules Reference: Distance Sensor (Driver): sony_asdt1](../modules/modules_driver_distance_sensor.md#sony-asdt1) diff --git a/docs/zh/sim_xplane/index.md b/docs/zh/sim_xplane/index.md new file mode 100644 index 0000000000..ed8c2eb0a9 --- /dev/null +++ b/docs/zh/sim_xplane/index.md @@ -0,0 +1,100 @@ +# X-Plane Simulation + +:::warning +This simulator is [community supported and maintained](../simulation/community_supported_simulators.md). +It may or may not work with current versions of PX4 and may be removed in future releases. +See [Toolchain Installation](../dev_setup/dev_env.md) for information about the environments and tools supported by the core development team. +::: + +[X-Plane](https://www.x-plane.com/) can be used with PX4 for [Software-In-The-Loop (SITL)](../simulation/index.md#sitl-simulation-environment) simulation through the community-supported [px4xplane](https://github.com/alireza787b/px4xplane) bridge plugin. +PX4 runs as the flight controller, while X-Plane provides the vehicle dynamics, visual scene, and simulated sensor inputs. +The px4xplane bridge is an X-Plane plugin: it runs inside X-Plane, accepts PX4's simulator MAVLink connection, publishes simulated sensors to PX4, and writes PX4 actuator outputs to X-Plane datarefs. + +## 支持的载具 + +PX4 includes X-Plane SITL airframes for the following vehicles: + +| Vehicle | 类型 | PX4 target | +| -------------- | --------------- | ------------------------------------------ | +| Cessna 172 | Plane | `make px4_sitl_default xplane_cessna172` | +| TB2 | Plane | `make px4_sitl_default xplane_tb2` | +| Ehang 184 | 多旋翼 | `make px4_sitl_default xplane_ehang184` | +| Alia-250 | VTOL quadplane | `make px4_sitl_default xplane_alia250` | +| QuadTailsitter | VTOL tailsitter | `make px4_sitl_default xplane_qtailsitter` | + +The matching X-Plane aircraft files and bridge configuration are distributed by the px4xplane project. +Additional X-Plane aircraft or vehicle models can also be integrated when PX4 has a matching SITL-capable control path and px4xplane can map the required actuator outputs to writable X-Plane datarefs. + +## 安装 + +1. Install the [PX4 development environment](../dev_setup/dev_env.md) on the machine, container, or WSL2 environment that will run PX4 SITL. + +2. Install X-Plane 11 or X-Plane 12. + +3. Download the latest OS-specific px4xplane release package from the [px4xplane releases page](https://github.com/alireza787b/px4xplane/releases). + +4. The release package is an archive, not an installer. + Extract it and copy the complete `px4xplane` plugin folder into: + + ```sh + X-Plane/Resources/plugins/px4xplane + ``` + +5. Copy the matching X-Plane aircraft folders from the same extracted package into an X-Plane aircraft directory. + Keep the packaged `64/config.ini` with the `px4xplane` plugin unless the release notes say otherwise. + +The [px4xplane build and installation guide](https://github.com/alireza787b/px4xplane/blob/master/docs/BUILD.md#installation) has more detail on the plugin folder layout. + +## Network Setup + +PX4 connects to the X-Plane bridge on TCP port `4560`. +The default host is `localhost`, which is suitable when PX4 and X-Plane run on the same Linux or macOS machine. + +For Windows, the usual setup is X-Plane running natively on Windows and PX4 running in WSL2. +In that case, set `PX4_SIM_HOSTNAME` in the WSL2 shell to the Windows host IP before starting PX4. +This variable is set on the PX4/SITL side and points to the host where X-Plane and the px4xplane plugin are running: + +```sh +export PX4_SIM_HOSTNAME=$(ip route | awk '/default/ {print $3; exit}') +``` + +Then start the desired PX4 target from the same shell. +If PX4 runs in Docker or on another computer, set `PX4_SIM_HOSTNAME` to the reachable IP address or hostname of the X-Plane machine instead. +Make sure inbound TCP port `4560` is allowed by the firewall on the X-Plane host. + +## Running SITL + +1. Start X-Plane and load the aircraft that matches the PX4 target. + +2. Confirm the px4xplane plugin is loaded in the X-Plane plugin menu. + +3. Start PX4 SITL. 例如: + + ```sh + cd PX4-Autopilot + make px4_sitl_default xplane_alia250 + ``` + +4. Connect QGroundControl to PX4 as usual. + +PX4 prints `Simulator connected on TCP port 4560` when the bridge is connected. + +## Custom Aircraft + +To add another X-Plane aircraft: + +1. Create a PX4 airframe file in `ROMFS/px4fmu_common/init.d-posix/airframes`. +2. Add a matching SITL target in `src/modules/simulation/simulator_mavlink/sitl_targets_xplane.cmake`. +3. Configure the px4xplane bridge to map PX4 actuator outputs to the aircraft datarefs. +4. Tune the PX4 parameters from ULog data and X-Plane truth logs. + +See the [px4xplane custom airframe guide](https://github.com/alireza787b/px4xplane/blob/master/docs/custom-airframe-config.md) for bridge configuration details. +For X-Plane-side aircraft design and dataref mapping, see the official [Plane Maker manual](https://developer.x-plane.com/manuals/planemaker/index.html) and [X-Plane datarefs reference](https://developer.x-plane.com/datarefs/). + +## 故障处理 + +If PX4 waits for the simulator, verify that X-Plane is running, the px4xplane plugin is loaded, `PX4_SIM_HOSTNAME` points to the X-Plane host, and TCP port `4560` is not blocked. + +If the aircraft loads but does not respond correctly, verify that the X-Plane aircraft, PX4 target, and px4xplane configuration all refer to the same vehicle. + +If estimator warnings appear, keep the simulator frame rate stable, check that the intended airframe parameters were loaded, and inspect the ULog sensor and estimator topics before changing bridge or airframe parameters. diff --git a/docs/zh/simulation/community_supported_simulators.md b/docs/zh/simulation/community_supported_simulators.md index 18a96dcf89..6fdd9f48bc 100644 --- a/docs/zh/simulation/community_supported_simulators.md +++ b/docs/zh/simulation/community_supported_simulators.md @@ -12,13 +12,14 @@ See [Toolchain Installation](../dev_setup/dev_env.md) for information about the 这些工具有来自其社区的不同程度的支持 (有些得到很好的支持,有些则没有) 。 Questions about these tools should be raised on the [discussion forums](../contribute/support.md#forums-and-chat) -| 仿真器 | 描述 | -| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [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

| -| [JMAVSim](../sim_jmavsim/index.md) |

A simple multirotor/quad simulator. This was previously part of the PX4 development toolchain but was removed in favour of [Gazebo](../sim_gazebo_gz/index.md).

Supported Vehicles: Quad

| -| [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

| -| [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).

| -| [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

| +| 仿真器 | 描述 | +| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [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

| +| [JMAVSim](../sim_jmavsim/index.md) |

A simple multirotor/quad simulator. This was previously part of the PX4 development toolchain but was removed in favour of [Gazebo](../sim_gazebo_gz/index.md).

Supported Vehicles: Quad

| +| [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

| +| [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).

| +| [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.

| :::tip [Gazebo](../sim_gazebo_gz/index.md) and [SIH](../sim_sih/index.md) are the officially supported simulators. See the [Simulation](index.md) page for more information.