Skip to content
LIBRARY
Universal.md

Universal

Universal joint: two revolute joints in series with perpendicular axes.

frame_a rotates around axis n_a (fixed in frame_a), then frame_b rotates around axis n_b (fixed in frame_b). The frames coincide when both angles are zero.

This component extends from PartialTwoFrames This component extends from Renderable

Usage

MultibodyComponents.Universal(render=true, color=world_default_joint_color(), specular_coefficient=1.5, n_a=[1, 0, 0], n_b=[0, 1, 0], radius=world_default_joint_width() / 2, cylinder_length=world_default_joint_length())

Parameters:

NameDescriptionUnitsDefault value
rootedMultibodyCo...me.FrameA()
statePriority10
rendertrue
colorworld_defau...int_color()
specular_coefficient1.5
n_aAxis of rotation of revolute joint a, resolved in frame_a[1, 0, 0]
n_bAxis of rotation of revolute joint b, resolved in frame_b[0, 1, 0]
radiusRadius of the revolute cylinders in animationsworld_defau...width() / 2
cylinder_lengthLength of the revolute cylinders in animationsworld_defau...nt_length()

Connectors

  • frame_a - Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or several Frame

connectors that can be connected together (Frame3D)

  • frame_b - Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or several Frame

connectors that can be connected together (Frame3D)

Variables

NameDescriptionUnits
phi_aAngle of revolute joint arad
phi_bAngle of revolute joint brad
w_aAngular velocity of revolute joint arad/s
w_bAngular velocity of revolute joint brad/s
a_aAngular acceleration of revolute joint arad/s2
a_bAngular acceleration of revolute joint brad/s2

Behavior

Source

dyad
"""
Universal joint: two revolute joints in series with perpendicular axes.

`frame_a` rotates around axis `n_a` (fixed in `frame_a`), then
`frame_b` rotates around axis `n_b` (fixed in `frame_b`).
The frames coincide when both angles are zero.
"""
component Universal
  extends PartialTwoFrames()
  extends Renderable(color = world_default_joint_color())
  revolute_a = Revolute(final n = n_a, rooted = rooted, render = render, color = color, radius = radius, cylinder_length = cylinder_length)
  revolute_b = Revolute(final n = n_b, rooted = rooted, render = render, color = color, radius = radius, cylinder_length = cylinder_length)
  structural parameter rooted::RootedFrame = MultibodyComponents.RootedFrame.FrameA()
  structural parameter statePriority::Integer = 10
  "Axis of rotation of revolute joint a, resolved in frame_a"
  parameter n_a::Real[3] = [1, 0, 0]
  "Axis of rotation of revolute joint b, resolved in frame_b"
  parameter n_b::Real[3] = [0, 1, 0]
  "Radius of the revolute cylinders in animations"
  parameter radius::Real = world_default_joint_width() / 2
  "Length of the revolute cylinders in animations"
  parameter cylinder_length::Real = world_default_joint_length()
  "Angle of revolute joint a"
  variable phi_a::Angle(statePriority = statePriority)
  "Angle of revolute joint b"
  variable phi_b::Angle(statePriority = statePriority)
  "Angular velocity of revolute joint a"
  variable w_a::AngularVelocity(statePriority = statePriority)
  "Angular velocity of revolute joint b"
  variable w_b::AngularVelocity(statePriority = statePriority)
  "Angular acceleration of revolute joint a"
  variable a_a::AngularAcceleration
  "Angular acceleration of revolute joint b"
  variable a_b::AngularAcceleration
relations
  phi_a = revolute_a.phi
  phi_b = revolute_b.phi
  w_a = der(phi_a)
  w_b = der(phi_b)
  a_a = der(w_a)
  a_b = der(w_b)
  connect(frame_a, revolute_a.frame_a)
  connect(revolute_a.frame_b, revolute_b.frame_a)
  connect(revolute_b.frame_b, frame_b)
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/Universal.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 240,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end
Flattened Source
dyad
"""
Universal joint: two revolute joints in series with perpendicular axes.

`frame_a` rotates around axis `n_a` (fixed in `frame_a`), then
`frame_b` rotates around axis `n_b` (fixed in `frame_b`).
The frames coincide when both angles are zero.
"""
component Universal
  frame_a = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_b = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  parameter render::Boolean = true
  parameter color::Real[4] = [0.5, 0.5, 0.5, 1.0]
  parameter specular_coefficient::Real = 1.5
  revolute_a = Revolute(final n = n_a, rooted = rooted, render = render, color = color, radius = radius, cylinder_length = cylinder_length)
  revolute_b = Revolute(final n = n_b, rooted = rooted, render = render, color = color, radius = radius, cylinder_length = cylinder_length)
  structural parameter rooted::RootedFrame = MultibodyComponents.RootedFrame.FrameA()
  structural parameter statePriority::Integer = 10
  "Axis of rotation of revolute joint a, resolved in frame_a"
  parameter n_a::Real[3] = [1, 0, 0]
  "Axis of rotation of revolute joint b, resolved in frame_b"
  parameter n_b::Real[3] = [0, 1, 0]
  "Radius of the revolute cylinders in animations"
  parameter radius::Real = world_default_joint_width() / 2
  "Length of the revolute cylinders in animations"
  parameter cylinder_length::Real = world_default_joint_length()
  "Angle of revolute joint a"
  variable phi_a::Angle(statePriority = statePriority)
  "Angle of revolute joint b"
  variable phi_b::Angle(statePriority = statePriority)
  "Angular velocity of revolute joint a"
  variable w_a::AngularVelocity(statePriority = statePriority)
  "Angular velocity of revolute joint b"
  variable w_b::AngularVelocity(statePriority = statePriority)
  "Angular acceleration of revolute joint a"
  variable a_a::AngularAcceleration
  "Angular acceleration of revolute joint b"
  variable a_b::AngularAcceleration
relations
  phi_a = revolute_a.phi
  phi_b = revolute_b.phi
  w_a = der(phi_a)
  w_b = der(phi_b)
  a_a = der(w_a)
  a_b = der(w_b)
  connect(frame_a, revolute_a.frame_a)
  connect(revolute_a.frame_b, revolute_b.frame_a)
  connect(revolute_b.frame_b, frame_b)
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/Universal.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 240,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses