Main Content

simscape.multibody.JointActuationDictionary Class

Namespace: simscape.multibody

Dictionary to store joint primitive actuations

Since R2024a

Description

Use an object of the simscape.multibody.JointActuationDictionary class to store joint actuations to apply to a compiled multibody model. The object is a dictionary in that you can store joint actuations and their corresponding joint primitives as key-value pairs. The keys are the paths of the joint primitive with the letter f or t, which indicates force or torque, respectively. The values are the actuation force or torque created by using these classes:

Class Attributes

Sealed
true
ConstructOnLoad
true
RestrictsSubclassing
true

For information on class attributes, see Class Attributes.

Creation

Description

dict = simscape.multibody.JointActuationDictionary creates a default joint actuation dictionary to store joint primitive actuations and the paths of the corresponding joint primitives.

Examples

collapse all

  1. Create a joint actuation dictionary to store joint actuations and their corresponding joint primitives.

    dict = simscape.multibody.JointActuationDictionary
    
    dict = 
    
      JointActuationDictionary with no actuations.
  2. Construct actuations for the desired joint primitives. Create a force of 5 N for a prismatic joint primitive, a torque of 10 N*m for the revolute joint primitive, and a torque of [3 4 5] N*m for a spherical joint primitive.

    force = simscape.multibody.PrismaticPrimitiveActuationForce(...
                         simscape.Value(5,"N"));
    torque_r = simscape.multibody.RevolutePrimitiveActuationTorque(...
                         simscape.Value(10,"N*m"));
    torque_s = simscape.multibody.SphericalPrimitiveActuationTorque(...
                         simscape.Value([3 4 5],"N*m"));
    
  3. Use the dict dictionary to store the created actuations with desired joint primitive as key-value pairs. The keys are the paths of the joint primitive with a letter f or t.

    dict("Pg/Pz/f") = force;
    dict("Ri/Rz/t") = torque_r;
    dict("Ro/S/t") = torque_s
    
    dict = 
    
      JointActuationDictionary with actuations:
    
      PrismaticPrimitiveActuationForce:
    
      Primitive Path  Value  Unit
      ______________  _____  ____
    
      "Pg/Pz/f"       5      N   
    
      SphericalPrimitiveActuationTorque:
    
      Primitive Path  Value    Unit
      ______________  _______  ____
    
      "Ro/S/t"        [3 4 5]  N*m 
    
      RevolutePrimitiveActuationTorque:
    
      Primitive Path  Value  Unit
      ______________  _____  ____
    
      "Ri/Rz/t"       10     N*m 

    After you create a dictionary, you can change the actuation for a joint primitive path. For example, to replace the actuation torque for the Ri joint primitive with a new torque, enter:

    torque_r_new = simscape.multibody.RevolutePrimitiveActuationTorque(...
                         simscape.Value(-5,"N*m"));
    dict("Ri/Rz/t") = torque_r_new
    
    dict = 
    
      JointActuationDictionary with actuations:
    
      RevolutePrimitiveActuationTorque:
    
      Primitive Path  Value  Unit
      ______________  _____  ____
    
      "Ri/Rz/t"       -5     N*m 
    
      SphericalPrimitiveActuationTorque:
    
      Primitive Path  Value    Unit
      ______________  _______  ____
    
      "Ro/S/t"        [3 4 5]  N*m 
    
      PrismaticPrimitiveActuationForce:
    
      Primitive Path  Value  Unit
      ______________  _____  ____
    
      "Pg/Pz/f"       5      N   

More About

expand all

Version History

Introduced in R2024a