Main Content

jointPrimitiveVelocity

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

Return velocity of provided joint primitive

Description

[vel,status] = jointPrimitiveVelocity(cmb,jointPrimitive,state) returns the velocity of the specified joint primitive in a simscape.multibody.CompiledMultibody object, cmb, in the state, state.

Input Arguments

expand all

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

Path of the joint primitive, specified as a string scalar or character vector. Separate the path elements by using forward slashes.

Example: 'Bottom_Right_Joint/Rz'

State of the compiled multibody system, specified as a simscape.multibody.State object. The state object includes the position and velocity of every joint primitive in the compiled multibody system.

Output Arguments

expand all

Velocity of the joint primitive, returned as a simscape.Value object. The form of the value depends on the type of the joint primitive:

Primitive TypeType of Returned Position
Revolutesimscape.Value object that represents a scalar with a unit of angular velocity
Prismaticsimscape.Value object that represents a scalar with a unit of linear velocity
Sphericalsimscape.Value object that represents a 3-by-1 vector with a unit of angular velocity. The vector is resolved in the base frame.
Lead Screwsimscape.Value object that represents a scalar with a unit of angular velocity
Constant Velocitysimscape.Value object that represents a 2-by-1 vector with a unit of angular velocity, where the first element is for the bend angle and the second element is for the azimuth

Status of the joint primitive in the given state, returned as a member of the simscape.multibody.StateStatus class that indicates whether the returned value is valid:

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

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

  • simscape.multibody.StateStatus.VelocityViolation: All position constraints of the joint primitive are satisfied, but not all velocity constraints of the joint primitive are satisfied.

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

Attributes

Accesspublic

To learn about attributes of methods, see Method Attributes.

Version History

Introduced in R2022a