主要内容

Path Manager

Compute and execute a UAV autonomous mission

  • 库:
  • 无人机工具箱 /算法

  • 路径管理器块

Description

路径管理器块通过在指定的任务点之间依次切换,计算无人机(UAV)的任务参数MissionDatainput port. TheMissionCmdinput port changes the execution order at runtime. The block supports both multirotor and fixed-wing UAV types.

端口

输入

expand all

Current UAV pose, specified as a four-element column vector of[x;y;z;courseAngle].x,y, 和z是无人机​​在东北(NED)坐标中的当前位置。courseAnglespecifies the heading angle in radians in the range[-pi, pi].

Data Types:single|double

无人机任务数据,指定为Uavpathmanagerbus公共汽车。TheUavpathmanagerbus巴士有三个公交元素模式,位置, 和params.

You can use the持续的(Simulink)block to specify the mission data as ann-by-1 array of structures and set the output data type to巴士:uavpathmanagerbus.n是任务点的数量。每个结构的字段是:

  • 模式- 任务点的模式,指定为1至6之间的8位未签名整数。

  • 位置- 任务点的位置,指定为[x;y;z].x,y, 和z是以米为单位指定的东北(NED)坐标的位置。

  • params- 任务点的参数,指定为四元素列向量。

The values assigned to the fields, in turn, are assigned to their corresponding bus elements in theUavpathmanagerbus公共汽车。

该表描述了模式和the corresponding values for the位置paramsfields in a mission point structure.

模式 位置 params 模式描述
uint8(1) [x;y;z] [P1;P2;P3;P4]

Takeoff— Take off from the ground and travel toward the specified position

uint8(2) [x;y;z]

[yaw;radius;P3;P4]

yaw— Yaw angle in radians in the range[-pi, pi]

radius— Transition radius in meters

航点— Navigate to waypoint

uint8(3)

[x;y;z]

x,y, 和zis the center of the circular orbit in NED coordinates specified in meters

[radius;turnDir;Numturns;P4]

radius- 轨道的半径

turnDir— Turn direction, specified as one of these:

  • 1— Clockwise turn

  • —1— Counter-clockwise turn

  • 0— Automatic selection of turn direction

Numturns- 转弯数量

Orbit— Orbit along the circumference of a circle defined by the parameters

uint8(4) [x;y;z] [P1;P2;P3;P4]

Land- 登陆指定位置

uint8(5)

[x;y;z]

发射位置在Homeinput port

[P1;P2;P3;P4]

RTL— Return to launch position

uint8(6) [x;y;z]

[P1;P2;P3;P4]

P1,P2,P3, 和P4是用户指定的参数,对应于自定义任务点

风俗— Custom mission point

不te

P1,P2,P3, 和P4是用户指定的参数。

例子:[struct('mode',uint8(1),'位置',[0; 0; 0; 100],'params',[0; 0; 0; 0; 0; 0])]]

Data Types:bus

确定是否执行任务点,指定为0(false) or1(真的).

Data Types:Boolean

Command to change mission at runtime, specified as an 8-bit unsigned integer between 0 and 3.

This table describes the possible mission commands.

任务命令 Description
uint8(0)

默认— Execute the mission from first to the last mission point in the sequence

uint8(1)

Hold- 持有当前任务点

Loiter around the current position for fixed-wing and hover at the current position for multirotor UAVs

uint8(2)

Repeat— Repeat the mission after reaching the last mission point

uint8(3)

RTL— Execute return to launch (RTL) mode

AfterRTL, the mission resumes if theMissionCmdinput is changed to默认或者Repeat

Data Types:uint8

UAV home location, specified as a three-element column vector of[x;y;z].x,y, 和z是以米为单位指定的东北(NED)坐标的位置。

Data Types:single|double

Output

expand all

无人机任务参数,返回为2 x-1类型的公共汽车阵列Uavpathmanagerbus. The first element of the bus array is the current mission point, and the second element of the bus array is the previous mission point.

This table describes the output mission parameters depending on the mission mode.

Current Mission Mode Output Mission Parameters
Mission Points 模式 位置 params

Takeoff

First bus element: Current

uint8(1) [x;y;z] [P1;P2;P3;P4]

Second bus element: Previous

模式上一个任务点

位置上一个任务点

params上一个任务点

航点

First bus element: Current

uint8(2) [x;y;z]

[yaw;radius;P3;P4]

yaw— Yaw angle in radians in the range[-pi, pi]

radius— Transition radius in meters

Second bus element: Previous

模式上一个任务点

位置上一个任务点

  • [yaw;radius;P3;P4]if the previous mission point wasTakeoff

  • [courseAngle;25;P3;P4]否则

courseAngle- 前一个位置和当前位置之间的线段的角度,在范围内指定[-pi, pi]

Orbit

First bus element: Current

uint8(3)

[x;y;z]

x,y, 和zis the center of the circular orbit in NED coordinates specified in meters

[radius;turnDir;Numturns;P4]

radius- 轨道的半径

turnDir— Turn direction, specified as one of these:

  • 1— Clockwise turn

  • —1— Counter-clockwise turn

  • 0— Automatic selection of turn direction

Numturns- 转弯数量

Second bus element: Previous

模式上一个任务点

位置上一个任务点

params上一个任务点

Land

First bus element: Current

uint8(4) [x;y;z] [P1;P2;P3;P4]

Second bus element: Previous

模式上一个任务点

位置上一个任务点

params上一个任务点

RTL

First bus element: Current

uint8(5)

[x;y;z]

发射位置在Homeinput port

[P1;P2;P3;P4]

Second bus element: Previous

模式上一个任务点

位置上一个任务点

params上一个任务点

风俗

First bus element: Current

uint8(6) [x;y;z]

[P1;P2;P3;P4]

P1,P2,P3, 和P4是用户指定的参数,对应于自定义任务点

Second bus element: Previous

模式上一个任务点

位置上一个任务点

params上一个任务点

不te

P1,P2,P3, 和P4是用户指定的参数。

At start of simulation, the previous mission point is set to theArmed模式.

模式 位置 params
uint8(0)

[x;y;z]

位置仿真开始时的无人机。

[-1; -1; -1; -1]

Set the end mission point toRTL或者Land模式,否则任务点会自动设置为Hold模式.

This table describes the output mission parameters when the input to theMissionCmdinput port is set toHold模式.

UAV Type Output Mission Parameters
Mission Points 模式 位置 params

Multirotor

First bus element: Current

uint8(7) [x;y;z] [-1; -1; -1; -1]

Second bus element: Previous

模式上一个任务点

位置上一个任务点

params上一个任务点

Fixed-Wing

First bus element: Current

uint8(7)

[x;y;z]

x,y, 和zis the center of the circular orbit in NED coordinates specified in meters

[radius;turnDir;-1;-1]

radius— Loiter radius is specified in theLoiter radius范围

turnDir- 转向方向指定为0用于自动选择转弯方向

Second bus element: Previous

模式上一个任务点

位置上一个任务点

params上一个任务点

Data Types:bus

Parameters

expand all

Type of UAV, specified as either多螺旋体或者固定翼.

可调:

固定翼无人机的叶半径,以米为正数字标量指定。

Dependencies:要启用此参数,请设置UAV type范围to固定翼.

可调:

数据类型of the input mission bus, specified as eitherdouble或者single.

可调:

Name of the input mission bus, specified as'UAVPathManagerBus'.

可调:

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2020b