MAVLink.io(4)--MAVLlink Version

2023-05-16

MAVLink Version (版本)

MAVLink发展处几个版本:

  • MAVLink 2.0:目前推荐的主要版本,2017被大部分用户接受。
  • MAVLink v1.0: 2013年被广泛接受,一直被大批设备采用。

MAVLink 2.0 C/C++ 和 Python 库兼容1.0版本。其中Version Handshaking(版本握手)以及Negotiating Versions(沟通版本)解释了如何使用版本。

Determinging Protocol/Message Version(分辨协议/消息版本)

有几种办法分辨MAVLink版本

  • AUTOPIOT_VERSION .capabilities 检查MAV_PROTOCOL_CAPABILITY_MAVLINK2的标志位。
  • PROTOCOL_VERSION .version 包含MAVLink版本号乘以100,例如v1.0是100,v2.3是203。
  • HEARTBEAT .mavlink_version 部分包含最小的版本号。域中包含消息定义(在 common.xml文件中定义)。
  • 最简单的办法是查看报文的起始字节
    • MAVLink 1: 0xFE
    • MAVLink 2: 0xFD

Version Handshaking(版本握手)

对于MAVLink 2的支持在AUTOPILOT_VERSION消息中的MAV_PROTOCOL_CAPABILITY_MAVLINK2 标志。
无人机与地面站信道的透明传输使用MAVLink是足够的。因为,大多数信道不是完全透明传输(包含路由或者帧长度限制的无线传输)。为了测试信道,MAVLink2握手协议发送一个MAVLink2帧来测试信道完整性。
为了达到上诉目标,地面站使用消息ID MAV_CMD_REQUEST_PROTOCOL_VERSION发送一个COMMAND_LONG或者一个COMMAND_INT包。
如果系统支持MAVLink2,其使用MAVLink 2组包回复PROTOCOL_VERSION,如果不支持则NACK,地面站将超时,那么命令接口将不能正确工作。

sequenceDiagram
GCS->>Drone: MAV_CMD_REQUEST_PROTOCOL_VERSION
GCS->>GCS: Start timeout
Drone->>GCS: PROTOCOL_VERSION in MAVLink 2 frameing
GCS->>Drone: If ACK: Switches to MAVLink2
Drone->>GCS: Switches to MAVLink 2 on receive

Semi-Transparent Lagacy Radios(半透明传输数传)

某些流行的数传(Sik 数传系列)使用半透明模式传输,会添加RADIO_STATUS信息到MAVLink数据包中。每一个MAVLink包会实际上发送一个固定系统ID的心跳和一个部件ID不同的包头。因此,增加的心跳可以用来部署系统。这些电台能够可选择的确认MAVLink 2 ,通过在收到第一针MAVLink v2包后发送RADIO_STATUS包格式。

Version and Signing

MAVLink库支持不同通道使用不同的协议版本, 一个通道使用特殊的输入输出MAVLink系统或者部件(例如 串口或UDP端口)。
因此,所有连接到特定同道的部件必须使用相同的MAVLink版本。如果一个系统使用签名,那么通过相同通道的所有连接也必须使用相同的密钥对消息进行签名。

Negotiating Versions(协商版本) 稍后翻译

Vehicle and GCS implementations will support both MAVLink 1 and MAVLink 2 for quite some time. We would like most users to receive the benefit of MAVLink 2, while still supporting implementations that don’t yet support MAVLink 2.

The following is meant to capture best practice for vehicle firmware and GCS authors:

  • Vehicle implementations should have a way to enable/disable the sending of MAVLink 2 messages. This should preferably be on a per-link (channel) basis to allow for some peripherals to be MAVLink 1 while others are MAVLink 2. It is acceptable for this option to require a reboot of the flight controller to take effect.
  • If signing is enabled then the vehicle should immediately start sending signed MAVLink 2 on startup.
  • If signing is not enabled and MAVLink 2 is enabled then the vehicle may choose to start by sending MAVLink 1 and switch to MAVLink 2 on a link when it first receives a MAVLink 2 message on the link.
  • Vehicles should set the MAV_PROTOCOL_CAPABILITY_MAVLINK2 capability flag in the AUTOPILOT_VERSION message if MAVLink 2 is available on a link. This should be set in the case where the link is currently sending MAVLink 1 packets but MAVLink 2 packets will be accepted and will cause a switch to MAVLink 2.
  • GCS implementations can choose to either automatically switch to MAVLink 2 where available or to have a configuration option for MAVLink 2.
  • If the GCS chooses to use a configuration option then when the option is enabled it should send MAVLink 2 on starting the link.
  • If the GCS chooses to use automatic switching then it should switch to sending MAVLink 2 if either it receives a MAVLink 2 message on the link or by asking for the AUTOPILOT_VERSION message to be sent and seeing the MAV_PROTOCOL_CAPABILITY_MAVLINK2 flag is set.

MAVLink 2

MAVLink 2 反向兼容MAVLink 协议,协议设计提高通讯灵活性和安全性。MAVLink2 绑定使用C、C++11和Python。
本话题说明MAVLink2的新特性和如何使用。

Features(特性)

关键的新特性如下:

  • 24bit 消息ID —支持多达16 milion种的消息定义(MAVLink 1支持256种)
  • 数据包包签名 —确认消息发自于被信任的系统
  • 消息扩展 —增加了消息定义的新域,不影响接收的兼容性
  • 空字节截断 —串行包中尾部空字节(填0)在发送前被删除(MAVLink1中会全部发送)
  • 兼容标志/不兼容标志 —支持反向兼容的协议改造,可利用自定义非标准包。

Upgrading to MAVLink 2(升级到MAVLink 2)

Version HandShaking/Negotiation

C Implementation

MAVLink 2 C 库反向兼容MAVLink 1。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

MAVLink.io(4)--MAVLlink Version 的相关文章

随机推荐

  • 无人机调试记录(一)

    无人机调试记录 xff08 一 xff09 固件 xff1a PX4 地面站 xff1a QGC APM xff08 pixhawk xff09 飞控疑难杂症解决方法汇总 校准 1 确保陀螺仪 水平线校准正确 如果校准完成后 xff0c Q
  • VsCode中使用git

    你是否厌倦了每天早上到公司都要打开git 小黑框 执行git clone 地址去拉取代码 而强大的VsCode只需要点一下即可解决 1 添加到暂存区 xff0c 更改文件以后可以发现 点进去上图这个标志 如果没有 xff0c 右击左侧菜单栏
  • 虚拟机上无法运行ubuntu自带的gazebo仿真器报VMware: vmw_ioctl_command error 无效的参数

    问题说明 xff1a 虚拟机版本 xff1a VMware Workstation 16 Pro Ubuntu版本 xff1a Ubuntu 18 04 现象 xff1a gazebo闪退 xff0c 并报 VMware vmw ioctl
  • NVIDIA JETSON TX2镜像制作以及刷机流程

    一 安装环境准备 xff1a Ubuntu宿主主机一台 xff0c TX2新老板子各一个 xff08 老的用来镜像备份 xff0c 用这个镜像给新的刷机 xff09 xff0c USB Micro USB线一根 1 下载TX2驱动 直接在百
  • 各种排序混合---冒泡排序、选择排序、插入排序

    冒泡排序 不多说 xff0c 看代码 xff0c 就是把最大的数字或者最小的数字沉到最右边 xff0c 最后输出数组 include lt iostream gt include lt stdlib h gt include lt math
  • 【PyQt5】串口数据实时绘图

    常见的串口调试助手一般只有简单的文本界面 xff0c 偶然看到 Arduino IDE 自带的串口绘图工具 xff0c 觉得用户设计挺友好 想着利用一下周末空闲时间 xff0c 用 PyQt5 实现一个串口数据实时绘图小工具 xff0c 在
  • HTTPS、HTTPS、SSH、MSTSC等常用网络服务的端口号

    前言 今天在 powershell下使用curl命令访问 一个网址 返回 443 port 相关的错误信息 xff0c 我第一眼看 xff0c 还以为是HTTP STATUS CODE 于是去查了一会儿才发现 xff0c 是端口号的问题 下
  • vue服务端渲染——基础

    文章目录 vue服务端渲染 xff08 基础 xff09 Nuxt框架文件目录结构项目启动 打包生命周期SSRnuxtserverInitmiddleware 中间件全局中间件页面级中间件 validate 校验参数asynData校验参数
  • 变压变频调速的原理(VVVF)——基础补充

    1 变压变频调速系统的基本原则 xff1a 维持气隙磁通不变 根据电磁感应原理 xff0c 气隙磁通在定子绕组每相绕组中的感应电动势为 xff1a Fs 为定子频率 xff0c Ns 为定子每相绕组串联匝数 xff0c Kns为基波绕组系数
  • RIA迷你书序言

    RIA Minibook Prologue RIA迷你书序言 Rich Internet Applications or RIAs have truly revolutionized user experiences online When
  • Tensorflow版本和python对应关系,以及tensorflow下载路径

    A few installation mechanisms require the URL of the TensorFlow Python package The value you specify depends on your Pyt
  • 串口的应用层操作

    一 设备中一般会用第二串口与外设通信 需要可以配置波特率 xff0c 实现应用层面的串口读写 二 代码实现 span class token macro property span class token directive hash sp
  • 委托与事件

    委托与事件 一 委托 xff08 delegate xff09 1 委托是一种可以把引用存储为函数的类型 2 在定义了委托后 xff0c 就可以声明该委托类型的变量 xff0c 接着把这个变量初始化为与委托有相同返回类型和参数类别的函数引用
  • 类域

    class String public 错误 名字 index type 还没有被声明 char amp operator index type typedef int index type 在类定义中用到的名字必须在使用前首先被声明这个规
  • 怎样把自己写的组件、库推到npm服务上面,并给别人使用?

    1 创建npm账号 2 cmd命令行到某个文件夹下 xff0c 然后登录 span class nx npm span span class nx login span 3 npm init填写包名 xff0c 以及一些信息 4 通过npm
  • 浅析 耦合 紧耦合 松耦合 解耦

    耦合 指模块之间的依赖关系 xff0c 包括控制关系 调用关系 数据传递关系 模块间联系越多 xff0c 其耦合性越强 xff0c 同时表明其独立性越差 软件设计中通常用耦合度和内聚度作为衡量模块独立程度的标准 划分模块的一个准则就是高内聚
  • 机器人视觉项目:视觉检测识别+机器人跟随(1)

    更新一波暑假做的机器人视觉检测跟随的项目 xff0c 有一些笔记都放在博客中 xff0c 有需要的可以交流 项目的目的是在机器人上搭建视觉检测系统 xff0c Kinect 43 ros 43 深度学习目标检测 43 行人识别 xff08
  • 机器人视觉项目:视觉检测识别+机器人跟随(17)

    参考一个实例行人检测 在ubuntu 43 ros环境下 xff0c 利用RGBD采集数据给小车 xff0c 实现行人跟随 原作者开源的例子是出现一个窗口 xff0c 用鼠标选择一个区域做kcf跟随 xff0c 选择的物体不受限制 xff0
  • UNIX系统中进程由哪三部分组成

    在UNIX系统中进程由以下三部分组成 xff1a 进程控制块PCB xff1b 数据段 xff1b 正文段 UNIX系统为了节省进程控制块所占的内存空间 xff0c 把每个进程控制块分成两部分 一部分常驻内存 xff0c 不管进程是否正占有
  • MAVLink.io(4)--MAVLlink Version

    MAVLink Version 版本 MAVLink发展处几个版本 xff1a MAVLink 2 0 目前推荐的主要版本 xff0c 2017被大部分用户接受 MAVLink v1 0 2013年被广泛接受 xff0c 一直被大批设备采用