Linux 的外部控制

离板控制背后的想法是能够使用在自动驾驶仪外运行的软件来控制 PX4 飞控。 这是通过 Mavlink 协议完成的, 特别是 SET_POSITION_TARGET_LOCAL_NEDSET_ATTITUDE_TARGET 消息。 :::

The idea behind off-board control is to be able to control the PX4 flight stack using software running outside of the autopilot. This is done through the MAVLink protocol, specifically the SET_POSITION_TARGET_LOCAL_NED and the SET_ATTITUDE_TARGET messages.

离板控制固件设置

There are two things you want to setup on the firmware side before starting offboard development.

1. 将遥控开关映射到离板模式激活

虽然此步骤不是强制性的,因为您可以使用 Mavlink 消息激活非板载模式。 我们认为这种方法安全多了。

Although this step isn't mandatory since you can activate offboard mode using a MAVLink message. We consider this method much safer.

2. 启用配套的计算机接口

通常,有三种方式设置离板模式的通信。

硬件安装

参考电台包括:

1. 串口电台

  1. 一端连接飞控的 UART

  2. 一端连接地面站电脑

Example radios include:

Mermaid graph: mavlink channel

2. 板载处理器

A small computer mounted onto the vehicle connected to the autopilot through a UART to USB adapter. There are many possibilities here and it will depend on what kind of additional on-board processing you want to do in addition to sending commands to the autopilot.

graph TD; comp[Companion Computer] --MAVLink--> uart[UART Adapter]; uart --MAVLink--> Autopilot;* [Odroid C1+](http://www.hardkernel.com/main/products/prdt_info.php?g_code=G143703355573) 或 [Odroid XU4](http://www.hardkernel.com/main/products/prdt_info.php?g_code=G143452239825) * [Raspberry Pi](https://www.raspberrypi.org/) * [Intel Edison](http://www.intel.com/content/www/us/en/do-it-yourself/edison.html)

Larger high power examples:

Mermaid diagram: Companion mavlink

3. 板载处理器和 WIFI 链接到 ROS(推荐

A small computer mounted onto the vehicle connected to the autopilot through a UART to USB adapter while also having a WiFi link to a ground station running ROS. This can be any of the computers from the above section coupled with a WiFi adapter. For example, the Intel NUC D34010WYB has a PCI Express Half-Mini connector which can accommodate an Intel Wifi Link 5000 adapter.

Mermaid graph: ROS

Last updated