Skip to content
LIBRARY
PlanarMechanics.AbsolutePosition.md

PlanarMechanics.AbsolutePosition

Measures absolute position and orientation of the origin of a frame connector.

This is a sensor component: it reads kinematic quantities without exerting forces. Use connect to attach to a body frame (sensor forces are zero, so the force balance is unaffected).

Usage

MultibodyComponents.PlanarMechanics.AbsolutePosition()

Parameters:

NameDescriptionUnitsDefault value
resolve_in_frameMultibodyComponents.ResolveInFrame.FrameA()

Connectors

  • frame_a - Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque.

All variables are resolved in the planar world frame. (Frame2D)

  • frame_resolve - Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque.

All variables are resolved in the planar world frame. (Frame2D)

  • x - This connector represents a real signal as an output from a component (RealOutput)

  • y - This connector represents a real signal as an output from a component (RealOutput)

  • phi - This connector represents a real signal as an output from a component (RealOutput)

Behavior

[x(t)=pos.x(t)y(t)=pos.y(t)phi(t)=pos.phi(t)connect(framea,pos+framea)pos.framea.fx(t)=0pos.framea.fy(t)=0pos.framea.tau(t)=0arrayliteral([3],pos.x(t),pos.y(t),pos.phi(t))=pos.r(t)pos.rotationmatrix(t)=arrayliteral([33],cos(pos.framea.phi(t)),sin(pos.framea.phi(t)),0,sin(pos.framea.phi(t)),cos(pos.framea.phi(t)),0,0,0,1)pos.r(t)=arrayliteral([3],0,0,pos.framea.phi(t))+transpose(pos.rotationmatrix(t))arrayliteral([3],pos.framea.x(t),pos.framea.y(t),pos.framea.phi(t))]

Source

dyad
# ── Public sensors ───────────────────────────────────────────────────────────
"""
Measures absolute position and orientation of the origin of a frame connector.

This is a sensor component: it reads kinematic quantities without exerting forces.
Use `connect` to attach to a body frame (sensor forces are zero, so the force
balance is unaffected).
"""
component AbsolutePosition
  frame_a = Frame2D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_resolve = Frame2D() if resolve_in_frame == MultibodyComponents.ResolveInFrame.FrameResolve() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 0}
      },
      "tags": []
    }
  }
  # x-position
  x = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 970, "y1": 150, "x2": 1070, "y2": 250, "rot": 0}
      },
      "tags": []
    }
  }
  # y-position
  y = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 450, "x2": 1060, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  # rotation angle (counterclockwise)
  phi = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 760, "x2": 1060, "y2": 860, "rot": 0}
      },
      "tags": []
    }
  }
  pos = BasicAbsolutePosition(resolve_in_frame = resolve_in_frame)
  structural parameter resolve_in_frame::MultibodyComponents.ResolveInFrame = MultibodyComponents.ResolveInFrame.FrameA()
relations
  connect(frame_a, pos.frame_a)
  if resolve_in_frame == MultibodyComponents.ResolveInFrame.FrameResolve()
    connect(frame_resolve, pos.frame_resolve)
  end
  x = pos.x
  y = pos.y
  phi = pos.phi
metadata {
  "Dyad": {"icons": {"default": "dyad://MultibodyComponents/AbsolutePosition.svg"}}
}
end
Flattened Source
dyad
"""
Measures absolute position and orientation of the origin of a frame connector.

This is a sensor component: it reads kinematic quantities without exerting forces.
Use `connect` to attach to a body frame (sensor forces are zero, so the force
balance is unaffected).
"""
component AbsolutePosition
  frame_a = Frame2D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_resolve = Frame2D() if resolve_in_frame == MultibodyComponents.ResolveInFrame.FrameResolve() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 0}
      },
      "tags": []
    }
  }
  # x-position
  x = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 970, "y1": 150, "x2": 1070, "y2": 250, "rot": 0}
      },
      "tags": []
    }
  }
  # y-position
  y = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 450, "x2": 1060, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  # rotation angle (counterclockwise)
  phi = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 960, "y1": 760, "x2": 1060, "y2": 860, "rot": 0}
      },
      "tags": []
    }
  }
  pos = BasicAbsolutePosition(resolve_in_frame = resolve_in_frame)
  structural parameter resolve_in_frame::MultibodyComponents.ResolveInFrame = MultibodyComponents.ResolveInFrame.FrameA()
relations
  connect(frame_a, pos.frame_a)
  if resolve_in_frame == MultibodyComponents.ResolveInFrame.FrameResolve()
    connect(frame_resolve, pos.frame_resolve)
  end
  x = pos.x
  y = pos.y
  phi = pos.phi
metadata {
  "Dyad": {"icons": {"default": "dyad://MultibodyComponents/AbsolutePosition.svg"}}
}
end


Test Cases

No test cases defined.