Main Content

simscape.multibody.State class

Package: simscape.multibody

State of compiled multibody system

Description

Use an object of the simscape.multibody.State class to include the position and velocity of every joint primitive in a compiled multibody system. You use the State object in may analyses, such as computing the position or velocity of a joint primitive in the system.

To compute the state of a compiled multibody system, use the computeState method. The Status property shows whether the state is valid. If the state is not valid, the Status property shows what type of problem occurred.

You can only use a State object with the simscape.multibody.CompiledMultibody object that was used to create the State object. Attempting to pass a State object to a method of a different CompiledMultibody object generates an error.

Class Attributes

Sealed
true
ConstructOnLoad
true
RestrictsSubclassing
true

For information on class attributes, see Class Attributes.

Creation

To create the simscape.multibody.State object of a compiled multibody system, use the computeState method.

Properties

expand all

State status, returned as a member of the simscape.multibody.StateStatus class. The status indicates the high-level result of attempt at computing the state of a compiled multibody system:

  • simscape.multibody.StateStatus.Valid: All kinematic constraints of the multibody system are satisfied. Note that a valid status does not indicate that all the specified targets have been met.

  • simscape.multibody.StateStatus.PositionViolation: Not all position constraints of the multibody system are satisfied.

  • simscape.multibody.StateStatus.VelocityViolation: All position constraints are satisfied, but at least one velocity constraint is not satisfied.

  • simscape.multibody.StateStatus.SingularityViolation: All kinematic constraints of the multibody system are satisfied, but at least one joint primitive is in kinematic singularity.

To see the status of individual targets, enter the state object at the command line without a trailing semicolon.

Attributes:

GetAccess
public
SetAccess
Restricts access
NonCopyable
true
Transient
true

Version History

Introduced in R2022a