Plot set of orientations in orientation plotter
specifies the orientations of M objects to show for the orientation
orientations argument can
be either an M-by-1 array of quaternions, or a
3-by-3-by-M array of rotation matrices.
Show Random Orientation
Create a theater plot object and a trajectory plotter.
tp = theaterPlot('XLimit',[-2 2],'YLimit',[-2 2],'ZLimit',[-2 2]); op = orientationPlotter(tp,'DisplayName','Orientation',... 'LocalAxesLength',2);
Create some random rotations.
pose = randrot(20,1);
Loop through the pose information to animate the orientations.
for i=1:numel(pose) plotOrientation(op,pose(i)) drawnow end
oPlotter — Orientation plotter
Orientation plotter, specified as an
orientations — Orientations
quaternion array | real-valued array
Orientations of M objects, specified as either an M-by-1 array of quaternions, or a 3-by-3-by-M array of rotation matrices.
yaw — Roll, pitch, yaw
Roll, pitch, and yaw angles defining the orientations of M objects, specified as M-by-1 vectors. Angles are measured in degrees.
positions — Object positions
[0 0 0] (default) | real-valued matrix
Object positions, specified as an M-by-3 real-valued matrix,
where M is the number of objects. Each column of the matrix
corresponds to the x-, y-, and
z-coordinates of the objects locations in meters. The default value
positions is at the origin.
labels — Object labels
Object labels, specified as a M-by-1 cell array of character
vectors, where M is the number of objects.
labels contains the text labels corresponding to the
M objects specified in
labels is omitted, no labels are plotted.
Introduced in R2021a