pymavlink

python MAVLink接口和实用程序。MAVLink 是一种串行协议,最常用于在飞行器和地面站之间发送数据和命令。「python MAVLink interface and utilities. MAVLink is a serial protocol most commonly used to send data and commands between vehicles and ground stations.」

  • 所有者: ArduPilot/pymavlink
  • 平台: Linux,Mac,Windows
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Build Status

Pymavlink

This is a python implementation of the MAVLink protocol.
It includes a source code generator (generator/mavgen.py) to create MAVLink protocol implementations for other programming languages as well.
Also contains tools for analizing flight logs.

Documentation

Please see http://ardupilot.org/dev/docs/mavlink-commands.html for mavlink command reference.

For realtime discussion please see the pymavlink gitter channel

Examples can be found in the repository or in the ArduSub book

Installation

Pymavlink supports both python2 and python3.

The following instructions assume you are using Python 2 and a Debian-based (like Ubuntu) installation.

Dependencies

Pymavlink has several dependencies :

- [future](http://python-future.org/) : for python 2 and python 3 interoperability 
- [lxml](http://lxml.de/installation.html) : for checking and parsing xml file 
- python-dev : for mavnative
- a C compiler : for mavnative

Optional :

- numpy : for FFT
- pytest : for tests

On linux

lxml has some additional dependencies that can be installed with your package manager (here with apt-get) :

sudo apt-get install gcc python-dev libxml2-dev libxslt-dev

Optional for FFT scripts and tests:

sudo apt-get install python-numpy python-pytest

Using pip you can install the required dependencies for pymavlink :

sudo pip2 install -U future lxml

The -U parameter allows updating future and lxml version if it is already installed.

On Windows

Use pip to install future as for linux.
Lxml can be installed with a windows installer from here : https://pypi.python.org/pypi/lxml/3.6.0

Installation

For users

It is recommended to install pymavlink from PyPi with pip, that way dependencies should be auto install by pip.

sudo pip2 install -U pymavlink

The -U parameter allow to update pymavlink version if it is already installed.

Mavnative

By default, pymavlink will try to compile and install mavnative which is a C extension for parsing mavlink. Mavnative only supports mavlink1.
To skip mavnative installation and reduce dependencies like gcc and python-dev, you can pass DISABLE_MAVNATIVE=True environment variable to the installation command:

sudo DISABLE_MAVNATIVE=True pip2 install -U pymavlink

For developers

From the pymavlink directory, you can use :

sudo MDEF=PATH_TO_message_definitions pip2 install . -v

Since pip installation is executed from /tmp, it is necessary to point to the directory containing message definitions with MDEF. MDEF should not be set to any particular message version directory but the parent folder instead. If you have cloned from mavlink/mavlink then this is /mavlink/message_definitions . Using pip should auto install dependencies and allow you to keep them up-to-date.

Or:

sudo python2 setup.py install

License


pymavlink is released under the GNU Lesser General Public License v3 or later.

The source code generated by generator/mavgen.py is available under the permissive MIT License.

主要指標

概覽
名稱與所有者ArduPilot/pymavlink
主編程語言Python
編程語言Python (語言數: 12)
平台
許可證Other
所有者活动
創建於2016-09-03 16:54:27
推送於2025-07-26 00:56:33
最后一次提交2025-07-13 10:14:20
發布數24
最新版本名稱v2.4.48 (發布於 )
第一版名稱2.4.22 (發布於 )
用户参与
星數599
關注者數53
派生數657
提交數3.2k
已啟用問題?
問題數297
打開的問題數129
拉請求數558
打開的拉請求數90
關閉的拉請求數155
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?