# UAVCAN 介绍
UAVCAN (opens new window) is an onboard network which allows the autopilot to connect to avionics/peripherals. It uses rugged, differential signalling, and supports firmware upgrades over the bus and status feedback from peripherals.
UAVCAN (opens new window)是一个板载网络, 它允许自动驾驶仪连接到航空电子设备。 它支持如下硬件: :::
It supports hardware like:
- ESC/Motor controllers
- Airspeed sensors
- Power monitors
- Distance sensors
- Optical Flow
以下说明提供了一个分步指南, 用于连接和设置通过uavcan连接的电调和GPS的四轮车。 选择的硬件是Pixhawk 2.1、Zubax orrel 20电调和Zubax GNSS GPS模块。
The following diagram shows this for a flight controller connected to UAVCAN motor controllers (ESCs) and a UAVCAN GNSS.
接下来, 按照 UAVCAN配置中的说明激活固件中的uavcan功能。 断电重连。
For more information about proper bus connections see UAVCAN Device Interconnection (opens new window) (Zubax KB).
- While the connections are the same, the connectors may differ across devices.
- An second/redundant" CAN interface may be used, as shown above (CAN2). This is optional, but can increase the robustness of the connection.
In order to use UAVCAN components with PX4 you will first need to enable the UAVCAN driver:
Power the vehicle using the battery (you must power the whole vehicle, not just the flight controller) and connect QGroundControl.
Navigate to the Vehicle Setup > Parameters screen.
The values are:
0: UAVCAN driver disabled.
1: Sensors Manual Config.
2: Sensors Automatic Config.
3: Sensors and Actuators (ESCs) Automatic Config
1if none of the connected UAVCAN devices support automatic configuration (check the manual!),
3if some of them support automatic configuration, and
3if you're using UAVCAN ESCs (this assigns motor controls to the UAVCAN bus rather than PWM).
You will need to manually allocate static ids for any nodes that don't support automatic configuration. When using dynamic configuration, any manually allocated ids should be given a value greater than the number of UAVCAN devices (to avoid clashes).
Most UAVCAN sensors require no further setup (they are plug'n'play, unless specifically noted in their documentation).
UAVCAN motor controllers (ESCs) additionally require the motor order be set, and may require a few other parameters be set. Whether this can be done using the simple QGroundControl setup UI depends on the type of ESC (see link for information).
PX4 requires an SD card for UAVCAN node allocation and during firmware update (which happen during boot). Check that there is a (working) SD card present and reboot.
If the PX4 Firmware arms but the motors do not start to rotate, check that parameter
UAVCAN_ENABLE=3 to use UAVCAN ESCs. If the motors do not start spinning before thrust is increased, check
# Developer Information
- UAVCAN Development: Topics related to development and integration of new UAVCAN hardware into PX4.