Main Content


Class: simscape.multibody.CompiledMultibody
Package: simscape.multibody

Compute state of compiled multibody system


state = computeState(cmb,op) computes the state of the simscape.multibody.CompiledMultibody object, cmb, based on the joint targets specified by the simscape.op.OperatingPoint object, op.

The computeState method attempts to satisfy the targeted joint primitives specified by the OperatingPoint object as much as possible. However, in some cases, to find a complete state that satisfies all of the kinematic constraints, some targets may not be met.

Input Arguments

expand all

Compiled multibody system, specified as a simscape.multibody.CompiledMultibody object.

Targeted joint primitives, specified as a simscape.op.OperatingPoint object. Use an OperatingPoint object to target the positions and velocities of desired joint primitives in the compiled multibody system.

You can specify the priority for each individual target. The computeState method searches for a solution that is compatible with all the high-priority targets. However, in some cases, some targets may not be met. When multiple solutions exist, low-priority targets can help bias the method to converge on the desired one.

Output Arguments

expand all

State of the compiled multibody system with specified targets, returned as a simscape.multibody.State object. The State object includes the position and velocity of each joint primitive in the compiled multibody system.



To learn about attributes of methods, see Method Attributes.

Version History

Introduced in R2022a