Skip to content
LIBRARY
FixedRotation.md

FixedRotation

Fixed translation and rotation of frame_b with respect to frame_a.

The rooted structural parameter determines which frame is closest to the base of the kinematic tree (same convention as Revolute).

Usage

MultibodyComponents.FixedRotation(r=[0, 0, 0], n=[1, 0, 0], angle=0, render=true)

Parameters:

NameDescriptionUnitsDefault value
rootedRootedFrame.FrameA()
rPosition vector from frame_a to frame_b, resolved in frame_am[0, 0, 0]
nAxis of rotation resolved in frame_a (must be unit vector)[1, 0, 0]
angleAngle of rotation around n [rad]rad0
renderRender the component in animationstrue

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
R_rel

Behavior

Dict{MIME{Symbol("text/plain")}, String} with 1 entry: MIME type text/plain => "Error displaying result"

Source

dyad
"""
Fixed translation and rotation of `frame_b` with respect to `frame_a`.

The `rooted` structural parameter determines which frame is closest to the
base of the kinematic tree (same convention as `Revolute`).
"""
component FixedRotation
  frame_a = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 50, "y1": 450, "x2": 150, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_b = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 850, "y1": 450, "x2": 950, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  structural parameter rooted::RootedFrame = RootedFrame.FrameA()
  "Position vector from frame_a to frame_b, resolved in frame_a"
  parameter r::Length[3] = [0, 0, 0]
  "Axis of rotation resolved in frame_a (must be unit vector)"
  parameter n::Real[3] = [1, 0, 0]
  "Angle of rotation around n [rad]"
  parameter angle::Angle = 0
  "Render the component in animations"
  parameter render::Boolean = true
  variable R_rel::Real[3, 3]
relations
  R_rel = MultibodyComponents.RR(planar_rotation(n, angle, 0))
  # Position: frame_b offset from frame_a by r resolved to world
  frame_b.r_0 = frame_a.r_0 + transpose(frame_a.R) * r
  switch rooted
    case FrameA
      frame_b.R = R_rel * frame_a.R
      frame_a.f + transpose(R_rel) * frame_b.f = [0, 0, 0]
      frame_a.tau + transpose(R_rel) * frame_b.tau - cross(r, frame_a.f) = [0, 0, 0]
    case FrameB
      frame_a.R = transpose(R_rel) * frame_b.R
      frame_b.f + R_rel * frame_a.f = [0, 0, 0]
      frame_b.tau + R_rel * frame_a.tau + cross(R_rel * r, frame_b.f) = [0, 0, 0]
  end
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/FixedRotation.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 240,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end
Flattened Source
dyad
"""
Fixed translation and rotation of `frame_b` with respect to `frame_a`.

The `rooted` structural parameter determines which frame is closest to the
base of the kinematic tree (same convention as `Revolute`).
"""
component FixedRotation
  frame_a = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 50, "y1": 450, "x2": 150, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_b = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 850, "y1": 450, "x2": 950, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  structural parameter rooted::RootedFrame = RootedFrame.FrameA()
  "Position vector from frame_a to frame_b, resolved in frame_a"
  parameter r::Length[3] = [0, 0, 0]
  "Axis of rotation resolved in frame_a (must be unit vector)"
  parameter n::Real[3] = [1, 0, 0]
  "Angle of rotation around n [rad]"
  parameter angle::Angle = 0
  "Render the component in animations"
  parameter render::Boolean = true
  variable R_rel::Real[3, 3]
relations
  R_rel = MultibodyComponents.RR(planar_rotation(n, angle, 0))
  # Position: frame_b offset from frame_a by r resolved to world
  frame_b.r_0 = frame_a.r_0 + transpose(frame_a.R) * r
  switch rooted
    case FrameA
      frame_b.R = R_rel * frame_a.R
      frame_a.f + transpose(R_rel) * frame_b.f = [0, 0, 0]
      frame_a.tau + transpose(R_rel) * frame_b.tau - cross(r, frame_a.f) = [0, 0, 0]
    case FrameB
      frame_a.R = transpose(R_rel) * frame_b.R
      frame_b.f + R_rel * frame_a.f = [0, 0, 0]
      frame_b.tau + R_rel * frame_a.tau + cross(R_rel * r, frame_b.f) = [0, 0, 0]
  end
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/FixedRotation.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 240,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses