# UAVCAN 介绍

UAVCAN Logo 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:

以下说明提供了一个分步指南, 用于连接和设置通过uavcan连接的电调和GPS的四轮车。 选择的硬件是Pixhawk 2.1、Zubax orrel 20电调和Zubax GNSS GPS模块。

# 升级节点固件

第一步是将所有启用uavcan的设备与飞行控制器连接。 下图显示了如何连接所有组件。

The following diagram shows this for a flight controller connected to UAVCAN motor controllers (ESCs) and a UAVCAN GNSS.

UAVCAN Wiring

接下来, 按照 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:

  1. Power the vehicle using the battery (you must power the whole vehicle, not just the flight controller) and connect QGroundControl.

  2. Navigate to the Vehicle Setup > Parameters screen.

  3. UAVCAN_ENABLE must be set to one of the non-zero values.

    The values are:

    • 0: UAVCAN driver disabled.
    • 1: Sensors Manual Config.
    • 2: Sensors Automatic Config.
    • 3: Sensors and Actuators (ESCs) Automatic Config

    Use 1 if none of the connected UAVCAN devices support automatic configuration (check the manual!), 2 or 3 if some of them support automatic configuration, and 3 if 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 UAVCAN_ESC_IDLT=1.

# Developer Information

  • UAVCAN Development: Topics related to development and integration of new UAVCAN hardware into PX4.