Plot kinematic graph of compiled multibody system
plots the kinematic graph of a
h = plotKinematicGraph(
cmb, in a tree
layout graph. The dots in the plot indicate the component objects, such as
simscape.multibody.WorldFrame, in the
cmb object. The lines
between the dots indicate joint objects between component objects, and the arrow on each
line points toward the follower frame of each joint object. For example, the image shows the
kinematic graph of a four bar system.
The blue dots indicate the
Solid objects that represent the four bars,
the green lines indicate the
simscape.multibody.RevoluteJoint objects that represent the joints between each
pair of bars, and the arrow on each line points toward the follower frame of each
RevoluteJoint object. See the Creating a Four Bar Multibody Mechanism in MATLAB example for more information
about the four bar system.
cmb — Compiled multibody system
Compiled multibody system, specified as a
Specify optional pairs of arguments as
the argument name and
Value is 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 enclose
Name in quotes.
layout — Layout of kinematic graph
"tree" (default) |
Layout of the kinematic graph, specified as
tree— A layout that emphasizes the spanning tree of the graph. The distinguished inertial body attached to the world frame is the root of the tree, and other bodies are in rows below the world frame:
circle— A layout that arranges the distinguished inertial body at the center and other bodies in concentric circles. This is a good option for mechanisms with radial symmetry, such as a Stewart platform.
snake— A layout that arranges the bodies in a snake-like pattern that tends to use all of the available 2-D area of the plot. This layout is a good choice for kinematic trees that are long and chain-like, such as a hanging chain with many links.
layered— A layout that arranges the bodies into a set of layers, which emphasizes hierarchical structures. By default, the layers progress downwards.
The best layout option depends on the details of a
CompiledMultibody object. Different layout options may preferable for
To learn about attributes of methods, see Method Attributes.
Introduced in R2022a