plotTransforms

Plot 3-D transforms from translations and rotations

Description

ax = plotTransforms(translations,rotations) draws transform frames in a 3-D figure window using the specified translations and rotations. The z-axis always points upward.

ax = plotTransforms(translations,rotations,Name,Value) specifies additional options using name-value pair arguments. Specify multiple name-value pairs to set multiple options.

Input Arguments

collapse all

xyz-positions specified as a vector or matrix of [x y z] vectors. Each row represents a new frame to plot with a corresponding orientation in rotations.

Example: [1 1 1; 2 2 2]

Rotations of xyz-positions specified as a array or n-by-4 matrix of [w x y z] quaternion vectors. Each element of the array or each row of the matrix represents the rotation of the xyz-positions specified in translations.

Example: [1 1 1 0; 1 3 5 0]

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'FrameSize',5

Size of frame and attached meshes, specified as positive numeric scalar.

Direction of the positive z-axis of inertial frame, specified as either "up" or "down". In the plot, the positive z-axis always points up.

File path of mesh file attached to frames, specified as either a character vector or string scalar. The mesh is attached to each plotted frame at the specified position and orientation. Provided .stl are

  • "fixedwing.stl"

  • "multirotor.stl"

  • "groundvehicle.stl"

Example: 'fixedwing.stl'

Color of attached mesh, specified as an RGB triple or string scalar.

Example: [0 0 1] or "green"

Axes used to plot the pose graph, specified as the comma-separated pair consisting of 'Parent' and either an Axes or UIAxes object. See axes or uiaxes.

Output Arguments

collapse all

Axes used to plot the pose graph, specified as the comma-separated pair consisting of 'Parent' and either an Axes or UIAxesobject. See axes or uiaxes.

Introduced in R2018b