mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
New Crowdin translations - zh-CN (#25629)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
This commit is contained in:
parent
9b83c9ba30
commit
becca14991
@ -184,6 +184,7 @@
|
||||
- [Wiring Quickstart](assembly/quick_start_holybro_pix32_v5.md)
|
||||
- [ModalAI VOXL 2](flight_controller/modalai_voxl_2.md)
|
||||
- [mRo Control Zero F7](flight_controller/mro_control_zero_f7.md)
|
||||
- [Radiolink PIX6](flight_controller/radiolink_pix6.md)
|
||||
- [Sky-Drones AIRLink](flight_controller/airlink.md)
|
||||
- [SPRacing SPRacingH7EXTREME](flight_controller/spracingh7extreme.md)
|
||||
- [ThePeach FCC-K1](flight_controller/thepeach_k1.md)
|
||||
|
||||
@ -491,6 +491,7 @@ Since the Definitions and Data Sections use the same message header format, they
|
||||
- [replay module](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/replay)
|
||||
- [hardfault_log module](https://github.com/PX4/PX4-Autopilot/tree/main/src/systemcmds/hardfault_log): append hardfault crash data.
|
||||
- [pyulog](https://github.com/PX4/pyulog): python, ULog reader and writer library with CLI scripts.
|
||||
The project also has tools to convert ULog to rosbag and other formats.
|
||||
- [ulog_cpp](https://github.com/PX4/ulog_cpp): C++, ULog reader and writer library.
|
||||
- [FlightPlot](https://github.com/PX4/FlightPlot): Java, log plotter.
|
||||
- [MAVLink](https://github.com/mavlink/mavlink): Messages for ULog streaming via MAVLink (note that appending data is not supported, at least not for cut off messages).
|
||||
|
||||
@ -32,6 +32,7 @@ The boards in this category are:
|
||||
- [Holybro Pix32 v5](../flight_controller/holybro_pix32_v5.md)
|
||||
- [ModalAI VOXL 2](../flight_controller/modalai_voxl_2.md)
|
||||
- [mRo Control Zero](../flight_controller/mro_control_zero_f7.md)
|
||||
- [Radiolink PIX6](../flight_controller/radiolink_pix6.md)
|
||||
- [Sky-Drones AIRLink](../flight_controller/airlink.md)
|
||||
- [SPRacing SPRacingH7EXTREME](../flight_controller/spracingh7extreme.md)
|
||||
- [ThePeach FCC-K1](../flight_controller/thepeach_k1.md)
|
||||
|
||||
347
docs/zh/flight_controller/radiolink_pix6.md
Normal file
347
docs/zh/flight_controller/radiolink_pix6.md
Normal file
@ -0,0 +1,347 @@
|
||||
# RadiolinkPIX6 Flight Controller
|
||||
|
||||
<Badge type="tip" text="main (planned for: PX4 v1.17)" />
|
||||
|
||||
:::warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://radiolink.com.cn/) for hardware support or compliance issues.
|
||||
:::
|
||||
|
||||
The autopilot is recommended for commercial systems integration, but is also suitable for academic research and any other use.
|
||||
|
||||

|
||||
|
||||
The Radiolink PIX6 is a high-performance flight controller.
|
||||
Featuring STM32F7 CPU, vibration isolation of IMUs, redundant IMUs, integrated OSD chip, IMU heating, and DShot.
|
||||
|
||||
:::info
|
||||
This flight controller is [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md).
|
||||
:::
|
||||
|
||||
## 总览
|
||||
|
||||
- 处理器
|
||||
- 32-bit ARM Cortex M7 core with DPFPU - STM32F765VIT6
|
||||
- 216 MHz/512 KB RAM/2 MB Flash
|
||||
- 32-bit IOMCU co-processor - STM32F100
|
||||
- 32KB FRAM - FM25V02A
|
||||
- AT7456E OSD
|
||||
- 传感器
|
||||
- Bosh BMI088 IMU (accel, gyro)
|
||||
- InvenSense ICM-42688 IMU (accel, gyro)
|
||||
- SPA06 barometer
|
||||
- IST8310 magnetometer
|
||||
- 电源
|
||||
- SMBUS/I2C Power Module Inputs (I2C)
|
||||
- voltage and current monitor inputs (Analog)
|
||||
- 接口
|
||||
- 16 PWM Outputs with independent power rail for external power source
|
||||
- 5x UART serial ports, 2 with HW flow control
|
||||
- Camera Input and Video Output
|
||||
- PPM/SBUS input, DSM/SBUS input
|
||||
- RSSI (PWM or voltage) input
|
||||
- I2C, SPI, 2x CAN, USB
|
||||
- 3.3V and 6.6V ADC inputs
|
||||
- 蜂鸣器与安全开关
|
||||
- microSD card
|
||||
- 重量和尺寸:
|
||||
- Weight 80g
|
||||
- Size 94mm x 51.5mm x 14.5mm
|
||||
|
||||
## 购买渠道
|
||||
|
||||
[Radiolink Amazon](https://www.radiolink.com.cn/pix6_where_to_buy)(International users)
|
||||
|
||||
[Radiolink Taobao](https://item.taobao.com/item.htm?spm=a21dvs.23580594.0.0.1d292c1bNMdSqV&ft=t&id=815993357068&skuId=5515756705284)(China Mainland user)
|
||||
|
||||
## Connector assignments
|
||||
|
||||
### Top View
|
||||
|
||||

|
||||
|
||||
### Left View
|
||||
|
||||

|
||||
|
||||
### Right View
|
||||
|
||||

|
||||
|
||||
### Rear View
|
||||
|
||||

|
||||
|
||||
## 针脚定义
|
||||
|
||||
Unless noted otherwise all connectors are JST GH.
|
||||
|
||||
### TELEM1,TELEM2 接口
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | -------------------------- | --------------------- |
|
||||
| 1 | VCC | +5V |
|
||||
| 2 | TX(OUT) | +3.3V |
|
||||
| 3 | RX(IN) | +3.3V |
|
||||
| 4 | CTS | +3.3V |
|
||||
| 5 | RTS: | +3.3V |
|
||||
| 6 | GND | GND |
|
||||
|
||||
### OSD
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | ---- | --------------------- |
|
||||
| 1 | GND | GND |
|
||||
| 2 | VOUT | +3.3V |
|
||||
| 3 | VCC | +5V |
|
||||
| 4 | GND | GND |
|
||||
| 5 | VCC | +5V |
|
||||
| 6 | VIN | +3.3V |
|
||||
|
||||
### I2C port
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | --- | -------------------------------------------------- |
|
||||
| 1 | VCC | +5V |
|
||||
| 2 | SCL | +3.3V (pullups) |
|
||||
| 3 | SDA | +3.3V (pullups) |
|
||||
| 4 | GND | GND |
|
||||
|
||||
### CAN1, CAN2 ports
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | -------------------------- | ---- |
|
||||
| 1 | VCC | +5V |
|
||||
| 2 | CAN_H | +12V |
|
||||
| 3 | CAN_L | +12V |
|
||||
| 4 | GND | GND |
|
||||
|
||||
### GPS1 port
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | -------------------------- | --------------------- |
|
||||
| 1 | VCC | +5V |
|
||||
| 2 | TX(OUT) | +3.3V |
|
||||
| 3 | RX(IN) | +3.3V |
|
||||
| 4 | SCL | +3.3V |
|
||||
| 5 | SDA | +3.3V |
|
||||
| 6 | GND | GND |
|
||||
|
||||
### GPS2 Port
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | -------------------------- | --------------------- |
|
||||
| 1 | VCC | +5V |
|
||||
| 2 | TX(OUT) | +3.3V |
|
||||
| 3 | RX(IN) | +3.3V |
|
||||
| 4 | SCL | +3.3V |
|
||||
| 5 | SDA | +3.3V |
|
||||
| 6 | GND | GND |
|
||||
|
||||
### SPI
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | ------------------------------ | --------------------- |
|
||||
| 1 | VCC | +5V |
|
||||
| 2 | SPI_SCK | +3.3V |
|
||||
| 3 | SPI_MISO | +3.3V |
|
||||
| 4 | SPI_MOSI | +3.3V |
|
||||
| 5 | !SPI_NSS1 | +3.3V |
|
||||
| 6 | !SPI_NSS2 | +3.3V |
|
||||
| 7 | DRDY | +3.3V |
|
||||
| 8 | GND | GND |
|
||||
|
||||
### POWER1 (HY2.0-6P)
|
||||
|
||||
Port for analog power monitors.
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | --- | --------------------------- |
|
||||
| 1 | VCC | +5V |
|
||||
| 2 | VCC | +5V |
|
||||
| 3 | 电流 | up to +3.3V |
|
||||
| 4 | 电压 | up to +3.3V |
|
||||
| 5 | GND | GND |
|
||||
| 6 | GND | GND |
|
||||
|
||||
### POWER2 (HY2.0-6P)
|
||||
|
||||
Port for digital (I2C) power monitor.
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | --- | --------------------- |
|
||||
| 1 | VCC | +5V |
|
||||
| 2 | VCC | +5V |
|
||||
| 3 | SCL | +3.3V |
|
||||
| 4 | SDA | +3.3V |
|
||||
| 5 | GND | GND |
|
||||
| 6 | GND | GND |
|
||||
|
||||
### ADC 3.3V
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | ------- | --------------------------- |
|
||||
| 1 | VCC | +5V |
|
||||
| 2 | ADC IN1 | up to +3.3V |
|
||||
| 3 | GND | GND |
|
||||
| 4 | ADC IN2 | up to +3.3v |
|
||||
| 5 | GND | GND |
|
||||
|
||||
### ADC 6.6V
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | ------ | -------------------------- |
|
||||
| 1 | VCC | +5V |
|
||||
| 2 | ADC IN | up to 6.6V |
|
||||
| 3 | GND | GND |
|
||||
|
||||
### USB remote port
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | ------- | --------------------- |
|
||||
| 1 | USB VDD | +5V |
|
||||
| 2 | DM | +3.3V |
|
||||
| 3 | DP | +3.3V |
|
||||
| 4 | GND | GND |
|
||||
|
||||
### SWITCH
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | -------------------------------------------------------- | --------------------- |
|
||||
| 1 | VCC | +3.3V |
|
||||
| 2 | !IO_LED_SAFETY | GND |
|
||||
| 3 | SAFETY | GND |
|
||||
|
||||
### Buzzer port
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | ------- | --- |
|
||||
| 1 | VCC | +5V |
|
||||
| 2 | BUZZER- | +5V |
|
||||
|
||||
### Spektrum/DSM Port (PH1.25-3P)
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | --- | --------------------- |
|
||||
| 1 | VCC | +3.3V |
|
||||
| 2 | GND | GND |
|
||||
| 3 | 信号 | +3.3V |
|
||||
|
||||
### Debug port (SH1.0-8P)
|
||||
|
||||
| 针脚 | 信号 | 电压 |
|
||||
| -- | ------------------------------ | --------------------- |
|
||||
| 1 | VCC | +5V |
|
||||
| 2 | FMU_SWCLK | +3.3V |
|
||||
| 3 | FMU_SWDIO | +3.3V |
|
||||
| 4 | TX(UART7) | +3.3V |
|
||||
| 5 | RX(UART7) | +3.3V |
|
||||
| 6 | IO_SWCLK | +3.3V |
|
||||
| 7 | IO_SWDIO | +3.3V |
|
||||
| 8 | GND | GND |
|
||||
|
||||
## 编译固件
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```sh
|
||||
make radiolink_PIX6_default
|
||||
```
|
||||
|
||||
## Installing PX4 Firmware
|
||||
|
||||
The firmware can be installed in any of the normal ways:
|
||||
|
||||
- Build and upload the source
|
||||
|
||||
```sh
|
||||
make radiolink_PIX6_default upload
|
||||
```
|
||||
|
||||
- [Load the firmware](../config/firmware.md) using _QGroundControl_.
|
||||
You can use either pre-built firmware or your own custom firmware.
|
||||
|
||||
::: info
|
||||
At time of writing the only pre-built software is `PX4 main` (see [Installing PX4 Main, Beta or Custom Firmware](../config/firmware.md#installing-px4-main-beta-or-custom-firmware)).
|
||||
Release builds will be supported for PX4 v1.17 and later.
|
||||
|
||||
:::
|
||||
|
||||
## PX4 配置
|
||||
|
||||
In addition to the [basic configuration](../config/index.md), the following parameters are important:
|
||||
|
||||
| 参数 | 设置 |
|
||||
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [SYS_HAS_MAG](../advanced_config/parameter_reference.md#SYS_HAS_MAG) | This should be disabled since the board does not have an internal mag. You can enable it if you attach an external mag. |
|
||||
|
||||
### Powering the PIX6
|
||||
|
||||
The PIX6 has 2 dedicated power monitor ports, each with a 6 pin connector.
|
||||
One is the Analog power monitor (`POWER1`), and the others is the I2C power monitor (`POWER2`).
|
||||
|
||||
The power module that comes with the flight controller with a wide voltage input range of 2-12S (7.4-50.4V), a maximum detection current of 90A (single ESC maximum detection current is 22.5A), a BEC output voltage of 5.3±0.2V, and a BEC output current of 2A.
|
||||
|
||||

|
||||
|
||||
The PIX6 also supports power modules from other manufacturers, such as [holybro_pm02d](../power_module/holybro_pm02d.md).
|
||||
|
||||
## Recommended Accessories
|
||||
|
||||
### GPS Modules
|
||||
|
||||
Radiolink manufactures a variety of high-performance GPS,Dual Anti-interference Technology Worry-free of UAV High-power Image Transmission, High-Voltage Lines, or Other Strong Signal Interference.
|
||||
|
||||
The PIX6 has 2 dedicated GPS ports, `GPS1` and `GPS2`, each with a 6 pin connector.
|
||||
|
||||
Recommended modules include:
|
||||
|
||||
- [Radiolink SE100](https://radiolink.com.cn/se100)
|
||||
- [Radiolink TS100](https://radiolink.com.cn/ts100v2)
|
||||
- [Radiolink RTK F9P](https://radiolink.com.cn/rtk_f9p)
|
||||
|
||||
## 串口映射
|
||||
|
||||
| UART | 设备 | Port |
|
||||
| ------ | ---------- | ---------------------------------------- |
|
||||
| UART1 | /dev/ttyS0 | GPS1 |
|
||||
| USART2 | /dev/ttyS1 | TELEM1 (flow control) |
|
||||
| USART3 | /dev/ttyS2 | TELEM2 (flow control) |
|
||||
| UART4 | /dev/ttyS3 | GPS2 |
|
||||
| UART7 | /dev/ttyS4 | Debug Console |
|
||||
| UART8 | /dev/ttyS5 | PX4IO |
|
||||
|
||||
## Analog inputs
|
||||
|
||||
The Radiolink PIX6 has 3 analog inputs, one 6V tolerant and two 3.3V tolerant.
|
||||
|
||||
- ADC Pin12 -> ADC 6.6V Sense
|
||||
- ADC Pin4 -> ADC IN1 3.3V Sense
|
||||
- ADC Pin13 -> ADC IN2 3.3V Sense
|
||||
|
||||
## 遥控器
|
||||
|
||||
A [Radio Control (RC)](../getting_started/rc_transmitter_receiver.md) 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).
|
||||
|
||||
- Spektrum/DSM receivers connect to the **DSM/SBUS RC** input.
|
||||
- PPM or SBUS receivers connect to the **RC IN** input port.
|
||||
- CRSF receiver must be wired to a spare port (UART) on the Flight Controller.
|
||||
Then you can bind the transmitter and receiver together.
|
||||
|
||||
#### CRSF Parameter Configuration
|
||||
|
||||
[Find and set](../advanced_config/parameters.md) the following parameters:
|
||||
|
||||
1. Set [RC_CRSF_PRT_CFG](../advanced_config/parameter_reference.md#RC_CRSF_PRT_CFG) to the port that is connected to the CRSF receiver (such as `TELEM1`).
|
||||
|
||||
This [configures the serial port](../peripherals/serial_configuration.md) to use the CRSF protocol.
|
||||
Note that some serial ports may already have a [default serial port mapping](../peripherals/serial_configuration.md#default-serial-port-configuration) or [default MAVLink serial port mapping](../peripherals/mavlink_peripherals.md#default-mavlink-ports) that you will have to un-map before you can assign the port to CRSF.
|
||||
For example, if you want to use `TELEM1` or `TELEM2` you first need to modify [MAV_0_CONFIG](../advanced_config/parameter_reference.md#MAV_0_CONFIG) or [MAV_1_CONFIG](../advanced_config/parameter_reference.md#MAV_1_CONFIG) to stop setting those ports.
|
||||
|
||||
There is no need to set the baud rate for the port, as this is configured by the driver.
|
||||
|
||||
2. Enable [RC_CRSF_TEL_EN](../advanced_config/parameter_reference.md#RC_CRSF_TEL_EN) to activate Crossfire telemetry.
|
||||
|
||||
For more information about selecting a radio system, receiver compatibility, and binding your transmitter/receiver pair, see: [Remote Control Transmitters & Receivers](../getting_started/rc_transmitter_receiver.md).
|
||||
@ -25,6 +25,11 @@ The default type is recommended.
|
||||
|
||||
:::
|
||||
|
||||
:::warning
|
||||
There is a known issue ([PX4-Autopilot#25436](https://github.com/PX4/PX4-Autopilot/issues/25436)) with fixed-wing approaches and landings while in RTL mode.
|
||||
Please review the issue and verify in simulation that the behavior you get is safe in an RTL landing scenario (if not, consider using rally points).
|
||||
:::
|
||||
|
||||
## 技术总结
|
||||
|
||||
Fixed-wing vehicles use the _mission landing/rally point_ return type by default.
|
||||
|
||||
@ -106,12 +106,19 @@ The development version, fetched using `--edge` above, does work.
|
||||
|
||||
### Build/Run within ROS 2 Workspace
|
||||
|
||||
The agent can be built and launched within a ROS 2 workspace (or build standalone and launched from a workspace.
|
||||
The agent can be built and launched within a ROS 2 workspace (or build standalone and launched from a workspace).
|
||||
You must already have installed ROS 2 following the instructions in: [ROS 2 User Guide > Install ROS 2](../ros2/user_guide.md#install-ros-2).
|
||||
|
||||
:::warning
|
||||
This approach will use the existing ROS 2 versions of the Agent dependencies, such as `fastcdr` and `fastdds`.
|
||||
This considerably speeds up the build process but requires that the Agent dependency versions match the ROS 2 ones.
|
||||
This considerably speeds up the build process but requires that the Agent dependency versions match the ROS 2 ones:
|
||||
|
||||
| ROS 2 version | Micro-XRCE-DDS-Agent version |
|
||||
| ------------- | -------------------------------------- |
|
||||
| Foxy | v2.4.2 |
|
||||
| Humble | v2.4.2 |
|
||||
| Jazzy | v2.4.3 |
|
||||
|
||||
:::
|
||||
|
||||
To build the agent within ROS:
|
||||
@ -124,15 +131,54 @@ To build the agent within ROS:
|
||||
|
||||
2. Clone the source code for the eProsima [Micro-XRCE-DDS-Agent](https://github.com/eProsima/Micro-XRCE-DDS-Agent) to the `/src` directory (the `main` branch is cloned by default):
|
||||
|
||||
::::tabs
|
||||
|
||||
::: tab jazzy
|
||||
|
||||
```sh
|
||||
cd ~/px4_ros_uxrce_dds_ws/src
|
||||
git clone -b v2.4.3 https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
|
||||
```
|
||||
|
||||
|
||||
:::
|
||||
|
||||
::: tab humble
|
||||
|
||||
```sh
|
||||
cd ~/px4_ros_uxrce_dds_ws/src
|
||||
git clone -b v2.4.2 https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
|
||||
```
|
||||
|
||||
|
||||
:::
|
||||
|
||||
::: tab foxy
|
||||
|
||||
```sh
|
||||
cd ~/px4_ros_uxrce_dds_ws/src
|
||||
git clone -b v2.4.2 https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
|
||||
```
|
||||
|
||||
|
||||
:::
|
||||
|
||||
::::
|
||||
|
||||
3. Source the ROS 2 development environment, and compile the workspace using `colcon`:
|
||||
|
||||
:::: tabs
|
||||
|
||||
::: tab jazzy
|
||||
|
||||
```sh
|
||||
source /opt/ros/jazzy/setup.bash
|
||||
colcon build
|
||||
```
|
||||
|
||||
|
||||
:::
|
||||
|
||||
::: tab humble
|
||||
|
||||
```sh
|
||||
@ -155,7 +201,7 @@ To build the agent within ROS:
|
||||
|
||||
::::
|
||||
|
||||
This builds all the folders under `/src` using the sourced toolchain.
|
||||
该操作会使用已加载的工具链对 /src 目录下的所有文件夹进行构建。
|
||||
|
||||
To run the micro XRCE-DDS agent in the workspace:
|
||||
|
||||
@ -163,6 +209,16 @@ To run the micro XRCE-DDS agent in the workspace:
|
||||
|
||||
:::: tabs
|
||||
|
||||
::: tab jazzy
|
||||
|
||||
```sh
|
||||
source /opt/ros/jazzy/setup.bash
|
||||
source install/local_setup.bash
|
||||
```
|
||||
|
||||
|
||||
:::
|
||||
|
||||
::: tab humble
|
||||
|
||||
```sh
|
||||
@ -235,7 +291,6 @@ The configuration can be done using the [UXRCE-DDS parameters](../advanced_confi
|
||||
- [UXRCE_DDS_CFG](../advanced_config/parameter_reference.md#UXRCE_DDS_CFG): Set the port to connect on, such as `TELEM2`, `Ethernet`, or `Wifi`.
|
||||
|
||||
- If using an Ethernet connection:
|
||||
|
||||
- [UXRCE_DDS_PRT](../advanced_config/parameter_reference.md#UXRCE_DDS_PRT):
|
||||
Use this to specify the agent UDP listening port.
|
||||
The default value is `8888`.
|
||||
@ -259,14 +314,12 @@ The configuration can be done using the [UXRCE-DDS parameters](../advanced_confi
|
||||
```
|
||||
|
||||
- If using a serial connection:
|
||||
|
||||
- [SER_TEL2_BAUD](../advanced_config/parameter_reference.md#SER_TEL2_BAUD), [SER_URT6_BAUD](../advanced_config/parameter_reference.md#SER_URT6_BAUD) (and so on):
|
||||
Use the `_BAUD` parameter associated with the serial port to set the baud rate.
|
||||
For example, you'd set a value for `SER_TEL2_BAUD` if you are connecting to the companion using `TELEM2`.
|
||||
For more information see [Serial port configuration](../peripherals/serial_configuration.md#serial-port-configuration).
|
||||
|
||||
- Some setups might also need these parameters to be set:
|
||||
|
||||
- [UXRCE_DDS_KEY](../advanced_config/parameter_reference.md#UXRCE_DDS_KEY): The uXRCE-DDS key.
|
||||
If you're working in a multi-client, single agent configuration, each client should have a unique non-zero key.
|
||||
This is primarily important for multi-vehicle simulations, where all clients are connected in UDP to the same agent.
|
||||
|
||||
@ -1,32 +1,32 @@
|
||||
# ROS 2
|
||||
|
||||
ROS 2 是ROS (机器人操作系统)最新版本 , 一个通用的机器人库,可以与 PX4 自驾仪一起创建强大的无人机应用。
|
||||
[ROS 2](https://docs.ros.org/en/humble/#)是一款功能强大的通用机器人开发库,可与 PX4 自动驾驶仪搭配使用,以开发功能丰富的无人机应用程序。
|
||||
|
||||
:::warning
|
||||
小提示
|
||||
PX4开发团队强烈建议您使用/迁移到此版本的 ROS!
|
||||
PX4 开发团队强烈建议您使用此 ROS 版本,或将现有系统迁移至此 ROS 版本!
|
||||
|
||||
这是最新版本的 [ROS](https://www.ros.org/) (机器人操作系统)。
|
||||
它大大改进了ROS1,特别是允许与PX4更深、更低的延迟结合。
|
||||
它在 ROS “1” 的基础上进行了显著改进,尤其能够实现与 PX4 更深度、更低延迟的集成。
|
||||
:::
|
||||
|
||||
ROS得益于一个活跃的生态系统,在这个生态系统里,开发者会解决常见的机器人问题,他们也为Linux编写软件库。
|
||||
例如,它可以用于[计算机视觉](../computer_vision/index.md)解决方案。
|
||||
ROS的优势在于拥有活跃的开发者生态系统 —— 该生态系统致力于解决各类常见的机器人技术问题,同时还能调用其他为 Linux 系统编写的软件库。
|
||||
例如,它可以用于 [computer vision](../computer_vision/index.md)解决问题。
|
||||
|
||||
ROS 2深度与 PX4 集成, 在某种程度上,您能够在 ROS 2 中创建与内部 PX4 模式无法区分的飞行模式, 并高效率的直接订阅uORB内部的话题。
|
||||
建议(尤其是)从同伴计算机进行控制和通信,因为这种计算机的延迟率很低。 当利用来自Linux的现有库时,或在编写新的高层飞行模式时。
|
||||
ROS 2 能够实现与 PX4 极深度的集成,你可以在 ROS 2 中创建飞行模式,这些模式与 PX4 内部原生飞行模式毫无区别;同时还能以高速率直接读取和写入 PX4 内部的 uORB 主题。
|
||||
(尤其)建议在以下场景中使用:从伴飞计算机进行控制与通信(且低延迟至关重要时)、需借助 Linux 系统的现有库时,或编写新的高级飞行模式时。
|
||||
|
||||
ROS 2 和 PX4 之间的通信使用中间件实现[XRCE-DDS] (../middleware/uxrce_dds.md)。
|
||||
这个中间件将以 ROS 2 消息和类型显示 PX4 [uORB 消息](../msg_docs/index.md), 有效地允许从 ROS 2 工作流和节点直接访问 PX4。
|
||||
ROS 2 与 PX4 之间的通信使用的中间件需实现 [XRCE-DDS protocol](../middleware/uxrce_dds.md).
|
||||
这个中间件将以 ROS 2 消息和类型显示 PX4 [uORB messages](../msg_docs/index.md) 会转换为 ROS 2 消息和数据类型,从而切实支持从 ROS 2 工作流与节点直接访问 PX4。
|
||||
中间件使用 uORB 消息定义生成代码来序列化和反序列化来处理PX4 的收发消息。
|
||||
在ROS 2 应用中使用相同的消息定义可直接进行解析。
|
||||
这些相同的消息定义也用于 ROS 2 应用程序中以便能够解析这些消息。
|
||||
|
||||
:::info
|
||||
ROS 2 也可以使用 [MAVROS](https://github.com/mavlink/mavros/tree/ros2/mavros而不是 XRCE-DDS连接到 PX4。
|
||||
这一备选办法得到了MAVROS项目的支持(此处没有记录)。
|
||||
该选项受 MAVROS 项目支持(本文档未对此进行说明)。
|
||||
:::
|
||||
|
||||
在XRCE-DDS上有效使用[ROS2](../ros2/user_guide.md)。 (撰写本文时)你必须对PX4内部结构和公约有合理的理解,这些结构和公约不同于交战规则所用的内部结构和公约。
|
||||
要通过 XRCE-DDS 有效使用 [ROS 2](../ros2/user_guide.md) ,(在撰写本文时)你必须对 PX4 的内部架构及约定有一定了解,而这些架构与约定和 ROS 所使用的存在差异。
|
||||
我们计划近期提供ROS 2 API 以对 PX4 的特性进行封装,并举例说明它们的用途。
|
||||
|
||||
## Topics
|
||||
|
||||
@ -33,7 +33,7 @@ ROS 与 PX4 存在若干不同的预设(假设),尤其是在坐标系约
|
||||
|
||||
构建并运行示例:
|
||||
|
||||
1. Open a new terminal.
|
||||
1. 打开一个新的终端。
|
||||
|
||||
2. 使用以下方法创建并切换至新的 colcon工作目录:
|
||||
|
||||
@ -55,7 +55,7 @@ ROS 与 PX4 存在若干不同的预设(假设),尤其是在坐标系约
|
||||
git clone https://github.com/PX4/px4_ros_com.git
|
||||
```
|
||||
|
||||
5. Source the ROS 2 development environment into the current terminal and compile the workspace using `colcon`:
|
||||
5. 在当前终端中加载 ROS 2 开发环境,并使用 colcon 工具编译工作空间:
|
||||
|
||||
:::: tabs
|
||||
|
||||
|
||||
@ -474,7 +474,7 @@ _fw_lateral_longitudinal_setpoint->updateWithAltitude(altitude_msl,
|
||||
lateral_acceleration);
|
||||
```
|
||||
|
||||
等效的空速和横向加速参数定义为 `std::opulatory<float>`, 所以你可以通过 `std::nullopt` 省略其中任何一个。
|
||||
等效的空速和横向加速参数定义为 `std::optional<float>`, 所以你可以通过 `std::nullopt` 省略其中任何一个。
|
||||
|
||||
:::tip
|
||||
若同时提供了横向加速度设定值和航线角设定值,横向加速度设定值将被用作前馈(feedforward)
|
||||
@ -483,7 +483,7 @@ _fw_lateral_longitudinal_setpoint->updateWithAltitude(altitude_msl,
|
||||
##### 使用设定值结构体实现完全控制
|
||||
|
||||
为实现充分的灵活性,你可以创建并传递一个[`FwLateralLongitudinalSetpoint` ](https://auterion.github.io/px4-ros2-interface-lib/structpx4__ros2_1_1FwLateralLongitudinalSetpoint.html) 结构体。
|
||||
每个字段都使用 "std::opulatory<float> "模板。
|
||||
每个字段都使用 `std::optional<float>` 模板。
|
||||
|
||||
:::tip
|
||||
若同时设置了航线角(course)和空速方向(airspeed direction),则空速方向优先,航线角不进行控制。
|
||||
@ -530,7 +530,7 @@ config_s.withThrottleLimits(0.4F, 0.6F);
|
||||
_fw_lateral_longitudinal_setpoint->update(setpoint_s, config_s);
|
||||
```
|
||||
|
||||
所有配置字段都定义为 "std::opulatory<float>"。
|
||||
所有配置字段都定义为 `std::optional<float>`。
|
||||
未设置的值将默认采用 PX4 的配置。
|
||||
更多关于配置选项的信息,请参阅 [LateralControlConfiguration](../msg_docs/LateralControlConfiguration.md) 和 [FixedWingLongitudinalConfiguration](../msg_docs/LongitudinalControlConfiguration.md)。
|
||||
|
||||
|
||||
@ -147,9 +147,9 @@ make px4_sitl
|
||||
#### 设置代理(Agent)
|
||||
|
||||
代理可以安装在机载计算机上 [number of ways](../middleware/uxrce_dds.md#micro-xrce-dds-agent-installation)。
|
||||
Below we show how to build the agent "standalone" from source and connect to a client running on the PX4 simulator.
|
||||
下文将介绍如何从源代码 “独立” 构建代理,并连接到运行在 PX4 仿真器上的客户端。
|
||||
|
||||
To setup and start the agent:
|
||||
设置并启动代理:
|
||||
|
||||
1. 打开一个终端。
|
||||
|
||||
@ -172,26 +172,26 @@ To setup and start the agent:
|
||||
MicroXRCEAgent udp4 -p 8888
|
||||
```
|
||||
|
||||
The agent is now running, but you won't see much until we start PX4 (in the next step).
|
||||
代理现已启动,但在我们启动 PX4(下一步) 之前,你不会看到太多。
|
||||
|
||||
:::info
|
||||
You can leave the agent running in this terminal!
|
||||
Note that only one agent is allowed per connection channel.
|
||||
你可以让代理在这个终端中保持运行状态!
|
||||
需注意,每个连接通道仅允许运行一个代理
|
||||
:::
|
||||
|
||||
#### 启动客户端(Client)
|
||||
|
||||
The PX4 simulator starts the uXRCE-DDS client automatically, connecting to UDP port 8888 on the local host.
|
||||
PX4 仿真器会自动启动 uXRCE-DDS 客户端,并连接到本地主机上的 UDP 8888 端口。
|
||||
|
||||
To start the simulator (and client):
|
||||
启动模拟器(和客户端):
|
||||
|
||||
1. Open a new terminal in the root of the **PX4 Autopilot** repo that was installed above.
|
||||
1. 在之前安装好的 PX4 自动驾驶仪 代码仓库的根目录下,打开一个新的终端。
|
||||
|
||||
:::: tabs
|
||||
|
||||
::: tab humble
|
||||
|
||||
- Start a PX4 [Gazebo](../sim_gazebo_gz/index.md) simulation using:
|
||||
- 使用 PX4 [Gazebo](../sim_gazebo_gz/index.md) 模拟:
|
||||
|
||||
```sh
|
||||
make px4_sitl gz_x500
|
||||
@ -202,7 +202,7 @@ To start the simulator (and client):
|
||||
|
||||
::: tab foxy
|
||||
|
||||
- Start a PX4 [Gazebo Classic](../sim_gazebo_classic/index.md) simulation using:
|
||||
- 使用 PX4 [Gazebo Classic](../sim_gazebo_classic/index.md) 模拟:
|
||||
|
||||
```sh
|
||||
make px4_sitl gazebo-classic
|
||||
@ -213,10 +213,10 @@ To start the simulator (and client):
|
||||
|
||||
::::
|
||||
|
||||
The agent and client are now running they should connect.
|
||||
代理和客户端现已运行并二者应已建立连接。
|
||||
|
||||
The PX4 terminal displays the [NuttShell/PX4 System Console](../debug/system_console.md) output as PX4 boots and runs.
|
||||
As soon as the agent connects the output should include `INFO` messages showing creation of data writers:
|
||||
PX4 终端会显示 [NuttShell/PX4 System Console](../debug/system_console.md) 系统控制台 的输出内容,该输出会在 PX4 启动和运行过程中实时呈现。
|
||||
代理一建立连接,输出内容中就应包含 INFO 级别的消息,这些消息会显示数据撰写器的创建情况:
|
||||
|
||||
```sh
|
||||
...
|
||||
@ -226,7 +226,7 @@ INFO [uxrce_dds_client] successfully created rt/fmu/out/sensor_combined data wr
|
||||
INFO [uxrce_dds_client] successfully created rt/fmu/out/timesync_status data writer, topic id: 188
|
||||
```
|
||||
|
||||
The micro XRCE-DDS agent terminal should also start to show output, as equivalent topics are created in the DDS network:
|
||||
微型 XRCE-DDS 代理终端也应开始显示输出内容,因为在 DDS 网络中会创建对应的主题:
|
||||
|
||||
```sh
|
||||
...
|
||||
@ -235,29 +235,29 @@ The micro XRCE-DDS agent terminal should also start to show output, as equivalen
|
||||
[1675929445.270412] info | ProxyClient.cpp | create_topic | topic created | client_key: 0x00000001, topic_id: 0x0DF(2), participant_id: 0x001(1)
|
||||
```
|
||||
|
||||
### Build ROS 2 Workspace
|
||||
### 构建ROS 2 工作空间
|
||||
|
||||
This section shows how to create a ROS 2 workspace hosted in your home directory (modify the commands as needed to put the source code elsewhere).
|
||||
本节介绍如何在你的主目录中创建一个 ROS 2 工作空间(可根据需要修改命令,将源代码放置到其他位置)。
|
||||
|
||||
The [px4_ros_com](https://github.com/PX4/px4_ros_com) and [px4_msgs](https://github.com/PX4/px4_msgs) packages are cloned to a workspace folder, and then the `colcon` tool is used to build the workspace.
|
||||
The example is run using `ros2 launch`.
|
||||
[px4_ros_com](https://github.com/PX4/px4_ros_com) 和 [px4_msgs](https://github.com/PX4/px4_msgs) 这两个功能包会被克隆到工作空间文件夹中,之后使用 colcon 工具对该工作空间进行构建
|
||||
此示例使用 "ros2 launch" 运行。
|
||||
|
||||
You should use a version of the px4_msgs package with the \_same_ message definitions as the PX4 firmware you have installed in the step above.
|
||||
Branches in the px4_msgs repo are named to correspond to the message definitions for different PX4 releases.
|
||||
If for any reason you cannot ensure the same message definitions between your PX4 firmware and ROS 2 px4_msgs package, you will additionally need to [start the message translation node](#optional-starting-the-translation-node) as part of your setup process.
|
||||
您应该使用一个 px4_msgs 包的版本与 \_same_ 消息定义作为您已经安装在上面步骤中的 PX4 固件。
|
||||
px4_msgs 代码仓库中的分支均以特定名称命名,这些名称与不同 PX4 版本的消息定义一一对应。
|
||||
如果出于任何原因,您不能确保您的 PX4 固件和 ROS 2 px4_msgs 包之间具有相同的消息定义。 您还需要 [start the message translation node](#optional-starting-the-translation-node),作为您设置过程的一部分。
|
||||
|
||||
:::info
|
||||
The example builds the [ROS 2 Listener](#ros-2-listener) example application, located in [px4_ros_com](https://github.com/PX4/px4_ros_com).
|
||||
[px4_msgs](https://github.com/PX4/px4_msgs) is needed too so that the example can interpret PX4 ROS 2 topics.
|
||||
该示例会构建 [ROS 2 Listener](#ros-2-listener) 示例应用程序,该程序位于 [px4_ros_com](https://github.com/PX4/px4_ros_com)中。
|
||||
[px4_msgs](https://github.com/PX4/px4_msgs) 也是需要的,以便示例能够解释PX4 ROS 2 主题。
|
||||
:::
|
||||
|
||||
#### Building the Workspace
|
||||
#### 构建工作空间
|
||||
|
||||
To create and build the workspace:
|
||||
要创建和构建工作空间:
|
||||
|
||||
1. Open a new terminal.
|
||||
1. 打开一个新的终端。
|
||||
|
||||
2. Create and navigate into a new workspace directory using:
|
||||
2. 使用以下方式创建并进入一个新的工作空间目录:
|
||||
|
||||
```sh
|
||||
mkdir -p ~/ws_sensor_combined/src/
|
||||
@ -265,18 +265,18 @@ To create and build the workspace:
|
||||
```
|
||||
|
||||
::: info
|
||||
A naming convention for workspace folders can make it easier to manage workspaces.
|
||||
一个为工作空间文件夹制定命名规范,有助于更轻松地管理工作空间。
|
||||
|
||||
:::
|
||||
|
||||
3. Clone the example repository and [px4_msgs](https://github.com/PX4/px4_msgs) to the `/src` directory (the `main` branch is cloned by default, which corresponds to the version of PX4 we are running):
|
||||
3. 将示例代码仓库和 [px4_msgs](https://github.com/PX4/px4_msgs) 克隆到 /src 目录下(默认克隆 main 分支,该分支与我们当前运行的 PX4 版本相对应):
|
||||
|
||||
```sh
|
||||
git clone https://github.com/PX4/px4_msgs.git
|
||||
git clone https://github.com/PX4/px4_ros_com.git
|
||||
```
|
||||
|
||||
4. Source the ROS 2 development environment into the current terminal and compile the workspace using `colcon`:
|
||||
4. 在当前终端中加载 ROS 2 开发环境,并使用 colcon 工具编译工作空间:
|
||||
|
||||
:::: tabs
|
||||
|
||||
@ -304,21 +304,21 @@ To create and build the workspace:
|
||||
|
||||
::::
|
||||
|
||||
This builds all the folders under `/src` using the sourced toolchain.
|
||||
该操作会使用已加载的工具链对 /src 目录下的所有文件夹进行构建。
|
||||
|
||||
#### Running the Example
|
||||
#### 运行示例
|
||||
|
||||
To run the executables that you just built, you need to source `local_setup.bash`.
|
||||
This provides access to the "environment hooks" for the current workspace.
|
||||
In other words, it makes the executables that were just built available in the current terminal.
|
||||
要运行你刚刚构建好的可执行文件,需加载local_setup.bash 。
|
||||
这提供了当前工作空间的 "environment hooks"访问权限。
|
||||
换句话说,它会让刚刚构建好的可执行文件在当前终端中可用。
|
||||
|
||||
:::info
|
||||
The [ROS2 beginner tutorials](https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html#source-the-overlay) recommend that you _open a new terminal_ for running your executables.
|
||||
[ROS2 beginner tutorials](https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html#source-the-overlay)建议您 _open a new terminal_来运行您的可执行文件。
|
||||
:::
|
||||
|
||||
In a new terminal:
|
||||
在新终端中:
|
||||
|
||||
1. Navigate into the top level of your workspace directory and source the ROS 2 environment (in this case "Humble"):
|
||||
1. 进入工作空间目录的顶层,并加载 ROS 2 环境(本例中为 “Humble” 版本):
|
||||
|
||||
:::: tabs
|
||||
|
||||
@ -344,20 +344,20 @@ In a new terminal:
|
||||
|
||||
::::
|
||||
|
||||
2. Source the `local_setup.bash`.
|
||||
2. 加载 local_setup.bash
|
||||
|
||||
```sh
|
||||
source install/local_setup.bash
|
||||
```
|
||||
|
||||
3. Now launch the example.
|
||||
Note here that we use `ros2 launch`, which is described below.
|
||||
3. 现在启动示例。
|
||||
请注意,此处我们使用的是 ros2 launch,其相关说明如下。
|
||||
|
||||
```sh
|
||||
ros2 launch px4_ros_com sensor_combined_listener.launch.py
|
||||
```
|
||||
|
||||
If this is working you should see data being printed on the terminal/console where you launched the ROS listener:
|
||||
若此功能正常运行,你应能在启动 ROS 监听器的终端 / 控制台上看到数据正在打印输出
|
||||
|
||||
```sh
|
||||
RECEIVED DATA FROM SENSOR COMBINED
|
||||
@ -374,21 +374,21 @@ accelerometer_m_s2[2]: -9.76044
|
||||
accelerometer_integral_dt: 4739
|
||||
```
|
||||
|
||||
#### (Optional) Starting the Translation Node
|
||||
#### (可选) 启动转化节点
|
||||
|
||||
<0/> <1/>
|
||||
|
||||
This example is built with PX4 and ROS2 versions that use the same message definitions.
|
||||
If you were to use incompatible [message versions](../middleware/uorb.md#message-versioning) you would need to install and run the [Message Translation Node](./px4_ros2_msg_translation_node.md) as well, before running the example:
|
||||
此示例由 PX4 和ROS 2 版本构建,它们使用相同的消息定义。
|
||||
若你要使用不兼容的 [message versions](../middleware/uorb.md#message-versioning),则在运行示例之前,还需要安装并运行[Message Translation Node](./px4_ros2_msg_translation_node.md):
|
||||
|
||||
1. Include the [Message Translation Node](../ros2/px4_ros2_msg_translation_node.md) into the example workspace or a separate workspace by running the following script:
|
||||
1. 通过运行以下脚本,将 [Message Translation Node](../ros2/px4_ros2_msg_translation_node.md) 纳入示例工作空间或单独的工作空间中
|
||||
|
||||
```sh
|
||||
cd /path/to/ros_ws
|
||||
/path/to/PX4-Autopilot/Tools/copy_to_ros_ws.sh .
|
||||
```
|
||||
|
||||
2. Build and run the translation node:
|
||||
2. 构建并运行转化节点:
|
||||
|
||||
```sh
|
||||
colcon build
|
||||
@ -396,50 +396,49 @@ If you were to use incompatible [message versions](../middleware/uorb.md#message
|
||||
ros2 run translation_node translation_node_bin
|
||||
```
|
||||
|
||||
## Controlling a Vehicle
|
||||
## 控制机体
|
||||
|
||||
To control applications, ROS 2 applications:
|
||||
要控制应用,ROS 2 应用程序:
|
||||
|
||||
- subscribe to (listen to) telemetry topics published by PX4
|
||||
- publish to topics that cause PX4 to perform some action.
|
||||
- 订阅 (聆听) PX4 发布的数传主题
|
||||
- 发布到导致PX4执行某些操作的主题。
|
||||
|
||||
The topics that you can use are defined in [dds_topics.yaml](../middleware/dds_topics.md), and you can get more information about their data in the [uORB Message Reference](../msg_docs/index.md).
|
||||
For example, [VehicleGlobalPosition](../msg_docs/VehicleGlobalPosition.md) can be used to get the vehicle global position, while [VehicleCommand](../msg_docs/VehicleCommand.md) can be used to command actions such as takeoff and land.
|
||||
您可以使用的主题定义在[dds_topics.yaml](../middleware/dds_topics.md), 并且您可以在 [uORB Message Reference](../msg_docs/index.md)获取更多关于他们数据的信息。
|
||||
例如,[VehicleGlobalPosition](../msg_docs/VehicleGlobalPosition.md) 可以用来获得机体的全局位置。 [VehicleCommand](../msg_docs/VehicleCommand.md) 可以用于命令诸如起飞和降落等操作。
|
||||
|
||||
The [ROS 2 Example applications](#ros-2-example-applications) examples below provide concrete examples of how to use these topics.
|
||||
下面的 [ROS 2 Example applications](#ros-2-example-applications) 示例提供了如何使用这些主题的具体例子。
|
||||
|
||||
## Compatibility Issues
|
||||
## 兼容性问题
|
||||
|
||||
This section contains information that may affect how you write your ROS code.
|
||||
本节包含的信息可能会影响你编写 ROS 代码的方式。
|
||||
|
||||
### ROS 2 Subscriber QoS Settings
|
||||
### ROS 2 订阅者QoS 设置
|
||||
|
||||
ROS 2 code that subscribes to topics published by PX4 _must_ specify a appropriate (compatible) QoS setting in order to listen to topics.
|
||||
Specifically, nodes should subscribe using the ROS 2 predefined QoS sensor data (from the [listener example source code](#ros-2-listener)):
|
||||
用于订阅 PX4 发布的话题的 ROS 2 代码,必须指定合适(兼容)的 QoS(服务质量)设置,才能监听这些话题。
|
||||
具体而言,节点应使用 ROS 2 预定义的 QoS 传感器数据(可参考[listener example source code](#ros-2-listener))进行订阅:
|
||||
|
||||
```cpp
|
||||
...
|
||||
rmw_qos_profile_t qos_profile = rmw_qos_profile_sensor_data;
|
||||
auto qos = rclcpp::QoS(rclcpp::QoSInitialization(qos_profile.history, 5), qos_profile);
|
||||
|
||||
subscription_ = this->create_subscription<px4_msgs::msg::SensorCombined>("/fmu/out/sensor_combined", qos,
|
||||
subscription_ = this->create_subscription<0>("/fmu/out/sensor_combined", qos,
|
||||
...
|
||||
```
|
||||
|
||||
This is needed because the ROS 2 default [Quality of Service (QoS) settings](https://docs.ros.org/en/humble/Concepts/About-Quality-of-Service-Settings.html#qos-profiles) are different from the settings used by PX4.
|
||||
Not all combinations of publisher-subscriber [Qos settings are possible](https://docs.ros.org/en/humble/Concepts/About-Quality-of-Service-Settings.html#qos-compatibilities), and it turns out that the default ROS 2 settings for subscribing are not!
|
||||
Note that ROS code does not have to set QoS settings when publishing (the PX4 settings are compatible with ROS defaults in this case).
|
||||
需要这样做的原因是,ROS 2 的默认 [Quality of Service (QoS) settings](https://docs.ros.org/en/humble/Concepts/About-Quality-of-Service-Settings.html#qos-profiles)与 PX4 所使用的设置不同。
|
||||
并非所有发布者 - 订阅者的 [Qos settings are possible](https://docs.ros.org/en/humble/Concepts/About-Quality-of-Service-Settings.html#qos-compatibilities),而事实证明,ROS 2 默认的订阅者设置就属于不可行的情况!需注意,ROS 代码在发布时无需设置 QoS参数(在此场景下,PX4 的 QoS 设置与 ROS 的默认 QoS 设置是兼容的)。
|
||||
|
||||
<!-- From https://github.com/PX4/PX4-user_guide/pull/2259#discussion_r1099788316 -->
|
||||
|
||||
### ROS 2 & PX4 Frame Conventions
|
||||
### ROS 2 & PX4 坐标系公约
|
||||
|
||||
The local/world and body frames used by ROS and PX4 are different.
|
||||
ROS与 PX4所使用的本地 / 世界坐标系和机体坐标系存在差异。
|
||||
|
||||
| 框架 | ROS | ROS |
|
||||
| ----- | ------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| 机体 | FRD (X **F**orward, Y **R**ight, Z **D**own) | FLU (X **F**orward, Y **L**eft, Z **U**p) |
|
||||
| 世界坐标系 | FRD or NED (X **N**orth, Y **E**ast, Z **D**own) | FLU or ENU (X **E**ast, Y **N**orth, Z **U**p) |
|
||||
| 框架 | ROS | ROS |
|
||||
| ----- | ------------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| 机体 | FRD (X **F**orward, Y **R**ight, Z **D**own) | FLU (X **F**orward, Y **L**eft, Z **U**p) |
|
||||
| 世界坐标系 | FRD or NED (X **N**orth, Y **E**ast, Z **D**own) | FLU 或 ENU (X **E**ast, Y **N**orth, Z **U**p) |
|
||||
|
||||
:::tip
|
||||
See [REP105: Coordinate Frames for Mobile Platforms](https://www.ros.org/reps/rep-0105.html) for more information about ROS frames.
|
||||
|
||||
@ -9,11 +9,12 @@ These are useful for applications including terrain following, precision hoverin
|
||||
|
||||
The following models are supported by PX4, and can be connected to either the I2C or Serial bus (the tables below indicates what bus can be used for each model).
|
||||
|
||||
| Model | Range (m) | Bus | 描述 |
|
||||
| ---------------------------------------------------------- | ---------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| [SF11/C](https://lightwarelidar.com/products/sf11-c-100-m) | 100 | Serial or I2C bus | |
|
||||
| [LW20/C](https://lightware.co.za/products/lw20-c-100-m) | 100 | I2C bus | Waterproofed (IP67) with servo for sense-and-avoid applications |
|
||||
| [SF45/B](../sensor/sf45_rotating_lidar.md) | 50 | Serial | Rotary Lidar (Used for [Collision Prevention](../computer_vision/collision_prevention.md)) |
|
||||
| Model | Range (m) | Bus | 描述 |
|
||||
| ------------------------------------------------------- | ---------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| [SF11/C](https://lightwarelidar.com/shop/sf11-c-100-m/) | 100 | Serial or I2C bus | |
|
||||
| [LW20/C](https://lightware.co.za/products/lw20-c-100-m) | 100 | I2C bus | Waterproofed (IP67) with servo for sense-and-avoid applications |
|
||||
| [SF30/D](https://lightwarelidar.com/shop/sf30-d-200-m/) | 200 | I2C bus | Waterproofed (IP67) |
|
||||
| [SF45/B](../sensor/sf45_rotating_lidar.md) | 50 | Serial | Rotary Lidar (Used for [Collision Prevention](../computer_vision/collision_prevention.md)) |
|
||||
|
||||
:::details
|
||||
Discontinued
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user