MAVSDK中offboard一些API

Value

其中是offboard需要用到的一些参数定义。

offboard.PositionNedYaw

class mavsdk.offboard.PositionNedYaw(north_m, east_m, down_m, yaw_deg)

Bases: object

Type for position commands in NED (North East Down) coordinates and yaw.

**参数是NED坐标和偏航下的位置命令。**单位是m

  • Parameters:

    north_m (float) – Position North (in metres),单位是米

    east_m (float) – Position East (in metres)

    down_m (float) – Position Down (in metres)

    yaw_deg (float) – Yaw in degrees (0 North, positive is clock-wise looking from above)

offboard.VelocityBodyYawspeed

class mavsdk.offboard.VelocityBodyYawspeed(forward_m_s, right_m_s, down_m_s, yawspeed_deg_s)

Bases: object

Type for velocity commands in body coordinates.

参数是前右下以及偏航的速度命令,单位是m/s。

  • Parameters:

    forward_m_s (float) – Velocity forward (in metres/second)

    right_m_s (float) – Velocity right (in metres/second)

    down_m_s (float) – Velocity down (in metres/second)

    yawspeed_deg_s (float) – Yaw angular rate (in degrees/second, positive for clock-wise looking from above)

offboard.VelocityNedYaw

class mavsdk.offboard.VelocityNedYaw(north_m_s, east_m_s, down_m_s, yaw_deg)

Bases: object

Type for velocity commands in NED (North East Down) coordinates and yaw.

北东地坐标系以及偏航角下的速度命令,单位是m/s。

  • Parameters:

    north_m_s (float) – Velocity North (in metres/second)

    east_m_s (float) – Velocity East (in metres/second)

    down_m_s (float) – Velocity Down (in metres/second)

    yaw_deg (float) – Yaw in degrees (0 North, positive is clock-wise looking from above)

一些offboard的控制API

set_position_ned

async set_position_ned(position_ned_yaw)

Set the position in NED coordinates and yaw.

在NED和偏航中设置位置,参数是position_ned_yaw。

  • Parameters:

    position_ned_yaw (PositionNedYaw) – Position and yaw

  • Raises:OffboardError – If the request fails. The error contains the reason for the failure.

set_position_velocity_ned

async set_position_velocity_ned(position_ned_yaw, velocity_ned_yaw)

Set the position in NED coordinates, with the velocity to be used as feed-forward.

在NED坐标中设置位置,并设置要用作前馈的速度。参数是position_ned_yaw和velocity_ned_yaw

  • Parameters:

    position_ned_yaw (PositionNedYaw) – Position and yaw

    velocity_ned_yaw (VelocityNedYaw) – Velocity and yaw

  • Raises:

    OffboardError – If the request fails. The error contains the reason for the failure.

set_velocity_body

async set_velocity_body(velocity_body_yawspeed)

Set the velocity in body coordinates and yaw angular rate. Not available for fixed-wing aircraft.

**在身体坐标和偏航角速率中设置速度。不适用于固定翼飞机。**参数是velocity_body_yawspeed

  • Parameters:

    velocity_body_yawspeed (VelocityBodyYawspeed) – Velocity and yaw angular rate

  • Raises:

    OffboardError – If the request fails. The error contains the reason for the failure.

set_velocity_ned

async set_velocity_ned(velocity_ned_yaw)

Set the velocity in NED coordinates and yaw. Not available for fixed-wing aircraft.

**在 NED 坐标和偏航中设置速度。不适用于固定翼飞机。**参数是velocity_ned_yaw。

  • Parameters:

    velocity_ned_yaw (VelocityNedYaw) – Velocity and yaw

  • Raises:

    OffboardError – If the request fails. The error contains the reason for the failure.

Offboard基础控制

在使用offboard函数之前,首先要启动offboard,最后使用完后要记得关闭,后面两个函数用来返回信息。

start

async start()

Start offboard control.

启动offboard模式

  • Raises:

    OffboardError – If the request fails. The error contains the reason for the failure.

stop

async stop()

Stop offboard control.

停止offboard模式

The vehicle will be put into Hold mode: https://docs.px4.io/en/flight_modes/hold.html

  • Raises:

    OffboardError – If the request fails. The error contains the reason for the failure.

OffboardError

exception mavsdk.offboard.OffboardError(result, origin, *params)

Bases: Exception

Raised when a OffboardResult is a fail code

当“板外结果”为失败代码时引发

OffboardResult

class mavsdk.offboard.OffboardResult(result, result_str)

Bases: object

Result type.结果类型

  • Parameters:

    result (Result) – Result enum valueresult_str (std::string) – Human-readable English string describing the result

Action API

顺序:arm–>takeoff–>land–>disarm

解锁和上锁

arm

async arm()

disarm

async disarm()

起飞降落

takeoff

async takeoff()

设置起飞高度

async set_takeoff_altitude(altitude)

  • Parameters:

    altitude (float) – Takeoff altitude relative to ground/takeoff location (in meters)

land

async* land()

mavsdk_api相关推荐

最新文章

  1. VMtools的安装与卸载
  2. 利用arcgis对斜坡单元批量后处理
  3. input和output哪个是充电_input是什么接口?告诉大家这个小常识,以后音箱接线更容易...
  4. Applying a Color Wash to Images
  5. Pairs Forming LCM(素因子分解)
  6. 计算机 图论基础知识,计算机基础知识
  7. 专业网站设计的实施步骤及有关疑难问题汇编
  8. Maple 教程(一)---初认识
  9. 64qam调制解调MATLAB,16QAM调制解调MATLAB).doc
  10. vmware workstation server 服务无法启动
  11. 原来把300页Word转成PPT,只需要一个键!别再复制粘贴了
  12. ubuntu upgrade problem
  13. 【推理引擎】ONNXRuntime 的架构设计
  14. python有道字典翻译_使用Python从有道词典网页获取单词翻译
  15. 帝国CMS Table '***.phome_ecms_news_data_' doesn't exist
  16. Hive alter column
  17. PHP开发环境的搭建
  18. UML测试题(用例图基础a)
  19. 优漫动游平面设计培训包含什么,平面设计培训内容有哪些?
  20. Html 层级 透明度 背景图片

热门文章

  1. 安徽省2017c语言笔试,2017安徽省公务员考试笔试大纲
  2. 计算机英语统考免考条件,统考可以申请免考吗?符合什么条件可以申请免考?...
  3. maven 嵌入式tomcat-修改端口的方法
  4. 计算机等级考试高低,等级考试分数的高低,最终还是要回归到“选科”问题
  5. 【软件测试】黑盒测试、白盒测试、静态测试
  6. 大疆无人机 从Mavic Pro 兼容 Mavic 2 zoom (解决方案)
  7. 云计算技术与应用课后答案第二章
  8. 从Telnet到TCP,从HTTP2 0到QUIC
  9. ES6 箭头函数大起底:熟知这几个特点让你少踩很多坑
  10. Disappeared