Main Content

updateMesh

Update body mesh for UAV platform

Since R2020b

Description

updateMesh(platform,type,geometries,color,position,orientation) updates the body mesh of the UAV platform with the specified mesh type, geometry, color, position, and orientation.

updateMesh(platform,type,geometries,color,offset) specifies the relative mesh frame position and orientation as a homogeneous transformation matrix offset.

Input Arguments

collapse all

UAV platform in a scenario, specified as a uavPlatform object.

Type of mesh, specified as "fixedwing", "quadrotor", "cuboid", or "custom".

Data Types: string | char

Geometric parameters of the mesh, specified as a cell array with options that depend on the type input:

input TypeGeometry ParametersDescription
"fixedwing"{scale}Positive scalar specifying the relative size of the fixed-wing mesh. Scale is unitless.
"quadrotor"{scale}Positive scalar specifying the relative size of the multirotor mesh. Scale is unitless.
"cuboid"{[x y height]}Three-element vector of the xy-position and height of the cuboid, specified in meters.
"custom"{vertices faces}Vertices and faces that define the mesh as two three-element vectors. Each vertex is a row of [x y z] points in meters. Each face is a row of [a b c] indices of vertex IDs, where a vertex ID is the row number of a vertex in vertices.

UAV platform body mesh color, specified as an RGB triplet.

Data Types: double

Relative mesh position in the body frame, specified as a vector of the form [x y z].

Data Types: double

Relative mesh orientation, specified as a quaternion vector of the form [w x y z] or a quaternion object.

Data Types: double

Transform of mesh relative to the body frame, specified as a 4-by-4 homogeneous transformation matrix. The matrix maps points in the platform mesh frame to points in the body frame.

Data Types: double

Version History

Introduced in R2020b