Main Content

plotTransforms

从tran绘制3 d变换slations and rotations

Description

ax= plotTransforms(translations,rotations)draws transform frames in a 3-D figure window using the specified translations and rotations. Thez-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 inrotations.

Example:[1 1 1; 2 2 2]

Rotations ofxyz-positions specified as aquaternionarray orn-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 thexyz-positions specified intranslations.

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

Name-Value Arguments

Specify optional pairs of arguments asName1=Value1,...,NameN=ValueN, whereNameis the argument name andValueis the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and encloseNamein quotes.

Example:'FrameSize',5

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

Direction of the positivez-axis of inertial frame, specified as either"up"or"down". In the plot, the positivez-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.stlare

  • "fixedwing.stl"

  • "multirotor.stl"

  • "groundvehicle.stl"

Example:'fixedwing.stl'

Color of attached mesh, specified as an RGB triplet 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 anAxesorUIAxesobject. Seeaxesoruiaxes.

Output Arguments

collapse all

Axes used to plot the pose graph, specified as the comma-separated pair consisting of'Parent'and either anAxesorUIAxesobject. Seeaxesoruiaxes.

Version History

Introduced in R2018b