安装MAVLink工具链
This topic explains how to install the MAVLink toolchain. The toolchain includes the XML message definitions as well as the the GUI/command line tools that use the definitions to Generate MAVLink Source Files.
TIP
You do not need to install or generate the source files if you are using the C programming language and a standard dialect. Just get the prebuilt libraries and then jump to Using C Libraries.
先决条件
The requirements for using the MAVLink generator are:
- Python 3.3+
- pip3 install future
- TkInter (required to use the GUI tool), included as of Python 3.7.
如果您要创建新的XML定义,您还应该安装lxml和libxml2以进行XML的验证和格式化。
安装
安装MAVLink工具链:
Install Python 3.6+:
- Windows: Download from Python for Windows
- Ubuntu Linux Make sure Python and Pip are both installed:
sudo apt install python3-tk
Clone the official mavlink repo or your fork with your custom dialect:
git clone https://github.com/mavlink/mavlink.git --recursive
Install the required packages:
sudo apt install python3-pip
Now you are ready to Generate MAVLink Libraries.