Skip to content
LIBRARY
CutForceAndTorque.md

CutForceAndTorque

Combined cut-force and cut-torque sensor.

Rigidly connects frame_a/frame_b (same position, orientation), passes force/torque through unchanged, and reports both the cut force and cut torque felt at frame_a, resolved in resolve_in_frame and optionally sign-flipped. Equivalent to using CutForce and CutTorque together, but as one component.

Usage

MultibodyComponents.CutForceAndTorque(positive_sign=true)

Parameters:

NameDescriptionUnitsDefault value
resolve_in_frameResolveInFrame.FrameA()
positive_signtrue: report the force/torque as felt at frame_a; false: negate the signtrue

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)

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

connectors that can be connected together (Frame3D)

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

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

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

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

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

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

Variables

NameDescriptionUnits
csignSign-convention factor: +1 or -1
forceN
torqueN.m

Behavior

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

Source

dyad
"""
Combined cut-force and cut-torque sensor.

Rigidly connects `frame_a`/`frame_b` (same position, orientation), passes
force/torque through unchanged, and reports both the cut force and cut torque
felt at `frame_a`, resolved in `resolve_in_frame` and optionally sign-flipped.
Equivalent to using `CutForce` and `CutTorque` together, but as one component.
"""
component CutForceAndTorque
  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": []
    }
  }
  frame_resolve = Frame3D() if case(resolve_in_frame, ResolveInFrame.FrameResolve) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 0}
      },
      "tags": []
    }
  }
  force_x = RealOutput() {
    "Dyad": {
      "placement": {"diagram": {"x1": 50, "y1": 960, "x2": 150, "y2": 1060, "rot": 90}}
    }
  }
  force_y = RealOutput() {
    "Dyad": {
      "placement": {"diagram": {"x1": 210, "y1": 960, "x2": 310, "y2": 1060, "rot": 90}}
    }
  }
  force_z = RealOutput() {
    "Dyad": {
      "placement": {"diagram": {"x1": 360, "y1": 960, "x2": 460, "y2": 1060, "rot": 90}}
    }
  }
  torque_x = RealOutput() {
    "Dyad": {
      "placement": {"diagram": {"x1": 540, "y1": 960, "x2": 640, "y2": 1060, "rot": 90}}
    }
  }
  torque_y = RealOutput() {
    "Dyad": {
      "placement": {"diagram": {"x1": 710, "y1": 960, "x2": 810, "y2": 1060, "rot": 90}}
    }
  }
  torque_z = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 880, "y1": 960, "x2": 980, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
  structural parameter resolve_in_frame::ResolveInFrame = ResolveInFrame.FrameA()
  "true: report the force/torque as felt at frame_a; false: negate the sign"
  parameter positive_sign::Boolean = true
  "Sign-convention factor: +1 or -1"
  variable csign::Real
  variable force::Dyad.Force[3]
  variable torque::Dyad.Torque[3]
relations
  # Rigid connection
  frame_a.r_0 = frame_b.r_0
  frame_b.R = frame_a.R
  # Force and torque pass through
  frame_a.f + frame_b.f = [0, 0, 0]
  frame_a.tau + frame_b.tau = [0, 0, 0]
  if case(resolve_in_frame, ResolveInFrame.FrameResolve)
    frame_resolve.f = [0, 0, 0]
    frame_resolve.tau = [0, 0, 0]
  end
  csign = ifelse(positive_sign, 1, -1)
  switch resolve_in_frame
    case FrameA
      force = frame_a.f * csign
      torque = frame_a.tau * csign
    case World
      force = resolve1(frame_a.R, frame_a.f) * csign
      torque = resolve1(frame_a.R, frame_a.tau) * csign
    case FrameResolve
      force = resolve_relative(frame_a.f, frame_a.R, frame_resolve.R) * csign
      torque = resolve_relative(frame_a.tau, frame_a.R, frame_resolve.R) * csign
  end
  [force_x, force_y, force_z] = force
  [torque_x, torque_y, torque_z] = torque
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/TwoFrameSensor.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 150,
        "rot": 0,
        "attrs": {"font-size": "140"}
      },
      {"label": "cut f+t", "x": 500, "y": 680, "rot": 0}
    ]
  }
}
end
Flattened Source
dyad
"""
Combined cut-force and cut-torque sensor.

Rigidly connects `frame_a`/`frame_b` (same position, orientation), passes
force/torque through unchanged, and reports both the cut force and cut torque
felt at `frame_a`, resolved in `resolve_in_frame` and optionally sign-flipped.
Equivalent to using `CutForce` and `CutTorque` together, but as one component.
"""
component CutForceAndTorque
  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": []
    }
  }
  frame_resolve = Frame3D() if case(resolve_in_frame, ResolveInFrame.FrameResolve) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 0}
      },
      "tags": []
    }
  }
  force_x = RealOutput() {
    "Dyad": {
      "placement": {"diagram": {"x1": 50, "y1": 960, "x2": 150, "y2": 1060, "rot": 90}}
    }
  }
  force_y = RealOutput() {
    "Dyad": {
      "placement": {"diagram": {"x1": 210, "y1": 960, "x2": 310, "y2": 1060, "rot": 90}}
    }
  }
  force_z = RealOutput() {
    "Dyad": {
      "placement": {"diagram": {"x1": 360, "y1": 960, "x2": 460, "y2": 1060, "rot": 90}}
    }
  }
  torque_x = RealOutput() {
    "Dyad": {
      "placement": {"diagram": {"x1": 540, "y1": 960, "x2": 640, "y2": 1060, "rot": 90}}
    }
  }
  torque_y = RealOutput() {
    "Dyad": {
      "placement": {"diagram": {"x1": 710, "y1": 960, "x2": 810, "y2": 1060, "rot": 90}}
    }
  }
  torque_z = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 880, "y1": 960, "x2": 980, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
  structural parameter resolve_in_frame::ResolveInFrame = ResolveInFrame.FrameA()
  "true: report the force/torque as felt at frame_a; false: negate the sign"
  parameter positive_sign::Boolean = true
  "Sign-convention factor: +1 or -1"
  variable csign::Real
  variable force::Dyad.Force[3]
  variable torque::Dyad.Torque[3]
relations
  # Rigid connection
  frame_a.r_0 = frame_b.r_0
  frame_b.R = frame_a.R
  # Force and torque pass through
  frame_a.f + frame_b.f = [0, 0, 0]
  frame_a.tau + frame_b.tau = [0, 0, 0]
  if case(resolve_in_frame, ResolveInFrame.FrameResolve)
    frame_resolve.f = [0, 0, 0]
    frame_resolve.tau = [0, 0, 0]
  end
  csign = ifelse(positive_sign, 1, -1)
  switch resolve_in_frame
    case FrameA
      force = frame_a.f * csign
      torque = frame_a.tau * csign
    case World
      force = resolve1(frame_a.R, frame_a.f) * csign
      torque = resolve1(frame_a.R, frame_a.tau) * csign
    case FrameResolve
      force = resolve_relative(frame_a.f, frame_a.R, frame_resolve.R) * csign
      torque = resolve_relative(frame_a.tau, frame_a.R, frame_resolve.R) * csign
  end
  [force_x, force_y, force_z] = force
  [torque_x, torque_y, torque_z] = torque
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/TwoFrameSensor.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 150,
        "rot": 0,
        "attrs": {"font-size": "140"}
      },
      {"label": "cut f+t", "x": 500, "y": 680, "rot": 0}
    ]
  }
}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses