Skip to content
LIBRARY
PlanarMechanics.OneDOFSlippingWheelJoint.md

PlanarMechanics.OneDOFSlippingWheelJoint

Simplified 1-DOF wheel joint with slip-dependent friction, constrained to the x-axis.

Unlike SlipBasedWheelJoint which allows motion in any direction based on orientation, this joint fixes the driving direction to the global x-axis and constrains y = radius. The slip-dependent friction model uses MultibodyComponents.limit_S_triple for smooth transitions between adhesion and sliding regimes.

Suitable for simplified 1-DOF models like a planar segway.

This component extends from MultibodyComponents.Renderable

Usage

MultibodyComponents.PlanarMechanics.OneDOFSlippingWheelJoint(render=true, color=[0.1, 0.1, 0.1, 1], specular_coefficient=0.7, vAdhesion_min, vSlide_min, sAdhesion, sSlide, mu_A, mu_S, radius=0.1, rim_diameter=radius / 3, wheel_width=radius / 4, z_position=0)

Parameters:

NameDescriptionUnitsDefault value
rendertrue
color[0.1, 0.1, 0.1, 1]
specular_coefficient0.7
vAdhesion_minMinimum adhesion velocitym/s
vSlide_minMinimum sliding velocitym/s
sAdhesionAdhesion slippage
sSlideSliding slippage
mu_AFriction coefficient at adhesion
mu_SFriction coefficient at sliding
radiusRadius of the wheelm0.1
rim_diameterDiameter of the rim cylindersradius / 3
wheel_widthWidth of the wheelradius / 4
z_positionz-position of the wheel in animations0

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)

Variables

NameDescriptionUnits
phi_rollWheel rolling anglerad
w_rollWheel rolling velocityrad/s
xPosition in x directionm
vVelocity in longitudinal (x) directionm/s
v_slip_longSlip velocity in longitudinal directionm/s
v_slipSlip velocity magnitudem/s
fTotal traction force magnitudeN
f_longLongitudinal friction forceN
f_nNormal constraint force (determined by dynamics)N
vAdhesionAdhesion velocity thresholdm/s
vSlideSliding velocity thresholdm/s

Behavior

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

Source

dyad
"""
Simplified 1-DOF wheel joint with slip-dependent friction, constrained to the x-axis.

Unlike SlipBasedWheelJoint which allows motion in any direction based on orientation,
this joint fixes the driving direction to the global x-axis and constrains y = radius.
The slip-dependent friction model uses `MultibodyComponents.limit_S_triple` for smooth
transitions between adhesion and sliding regimes.

Suitable for simplified 1-DOF models like a planar segway.
"""
component OneDOFSlippingWheelJoint
  extends MultibodyComponents.Renderable(color = [0.1, 0.1, 0.1, 1])
  frame_a = Frame2D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 150, "x2": 550, "y2": 250, "rot": 0}
      },
      "tags": []
    }
  }
  "Tire shape (main cylinder)"
  tire_shape = MultibodyComponents.CylinderShape(render = render, color = color)
  "Rim shape 1 (cross cylinder showing rotation)"
  rim1_shape = MultibodyComponents.CylinderShape(render = render, color = [0.8, 0.8, 0.8, 1.0])
  "Rim shape 2 (cross cylinder at 90 degrees)"
  rim2_shape = MultibodyComponents.CylinderShape(render = render, color = [0.8, 0.8, 0.8, 1.0])
  "Minimum adhesion velocity"
  parameter vAdhesion_min::Velocity
  "Minimum sliding velocity"
  parameter vSlide_min::Velocity
  "Adhesion slippage"
  parameter sAdhesion::Real
  "Sliding slippage"
  parameter sSlide::Real
  "Friction coefficient at adhesion"
  parameter mu_A::Real
  "Friction coefficient at sliding"
  parameter mu_S::Real
  "Radius of the wheel"
  parameter radius::Length = 0.1
  "Diameter of the rim cylinders"
  parameter rim_diameter::Real = radius / 3
  "Width of the wheel"
  parameter wheel_width::Real = radius / 4
  "z-position of the wheel in animations"
  parameter z_position::Real = 0
  "Wheel rolling angle"
  variable phi_roll::Angle
  "Wheel rolling velocity"
  variable w_roll::AngularVelocity
  "Position in x direction"
  variable x::Dyad.Position
  "Velocity in longitudinal (x) direction"
  variable v::Velocity
  "Slip velocity in longitudinal direction"
  variable v_slip_long::Velocity
  "Slip velocity magnitude"
  variable v_slip::Velocity
  "Total traction force magnitude"
  variable f::Dyad.Force
  "Longitudinal friction force"
  variable f_long::Dyad.Force
  "Normal constraint force (determined by dynamics)"
  variable f_n::Dyad.Force
  "Adhesion velocity threshold"
  variable vAdhesion::Velocity
  "Sliding velocity threshold"
  variable vSlide::Velocity
relations
  # Position along x-axis
  x = frame_a.x
  v = der(x)
  # Wheel angle coupling
  phi_roll = -frame_a.phi
  w_roll = der(phi_roll)
  # Longitudinal slip
  v_slip_long = v - radius * w_roll
  v_slip = abs(v_slip_long) + 0.0001
  # Slip-dependent friction thresholds
  vAdhesion = max(vAdhesion_min, sAdhesion * abs(radius * w_roll))
  vSlide = max(vSlide_min, sSlide * abs(radius * w_roll))
  # Friction force from slip curve (f_n is normal force from constraint dynamics)
  f = f_n * MultibodyComponents.limit_S_triple(vAdhesion, vSlide, mu_A, mu_S, v_slip)
  f_long = -f * v_slip_long / v_slip
  # Frame forces from contact
  frame_a.fx = f_long
  frame_a.fy = f_n
  frame_a.tau = radius * f_long
  # Position constraint: wheel center at ground level + radius
  frame_a.y = radius
  # Tire shape: cylinder along the axle
  tire_shape.r = [frame_a.x, frame_a.y, z_position]
  tire_shape.R = MultibodyComponents.RR(MultibodyComponents.nullrotation())
  tire_shape.r_shape = [0, 0, -wheel_width / 2]
  tire_shape.length_direction = [0, 0, 1]
  tire_shape.width_direction = [0, 1, 0]
  tire_shape.length = wheel_width
  tire_shape.width = radius * 2
  tire_shape.height = radius * 2
  # Rim 1: cross cylinder that rotates with the wheel around the axle
  rim1_shape.r = [frame_a.x, frame_a.y, z_position]
  rim1_shape.R = MultibodyComponents.planar_rotation([0, 0, 1], phi_roll, w_roll)
  rim1_shape.r_shape = [-radius, 0, 0]
  rim1_shape.length_direction = [1, 0, 0]
  rim1_shape.width_direction = [0, 1, 0]
  rim1_shape.length = radius * 2
  rim1_shape.width = rim_diameter
  rim1_shape.height = rim_diameter
  # Rim 2: same but offset by 90 degrees
  rim2_shape.r = [frame_a.x, frame_a.y, z_position]
  rim2_shape.R = MultibodyComponents.planar_rotation([0, 0, 1], phi_roll + 3.14159265358979 / 2, w_roll)
  rim2_shape.r_shape = [-radius, 0, 0]
  rim2_shape.length_direction = [1, 0, 0]
  rim2_shape.width_direction = [0, 1, 0]
  rim2_shape.length = radius * 2
  rim2_shape.width = rim_diameter
  rim2_shape.height = rim_diameter
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/OneDOFSlippingWheelJoint.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 900,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end
Flattened Source
dyad
"""
Simplified 1-DOF wheel joint with slip-dependent friction, constrained to the x-axis.

Unlike SlipBasedWheelJoint which allows motion in any direction based on orientation,
this joint fixes the driving direction to the global x-axis and constrains y = radius.
The slip-dependent friction model uses `MultibodyComponents.limit_S_triple` for smooth
transitions between adhesion and sliding regimes.

Suitable for simplified 1-DOF models like a planar segway.
"""
component OneDOFSlippingWheelJoint
  parameter render::Boolean = true
  parameter color::Real[4] = [0.5, 0.5, 0.5, 1.0]
  parameter specular_coefficient::Real = 0.7
  frame_a = Frame2D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 150, "x2": 550, "y2": 250, "rot": 0}
      },
      "tags": []
    }
  }
  "Tire shape (main cylinder)"
  tire_shape = MultibodyComponents.CylinderShape(render = render, color = color)
  "Rim shape 1 (cross cylinder showing rotation)"
  rim1_shape = MultibodyComponents.CylinderShape(render = render, color = [0.8, 0.8, 0.8, 1.0])
  "Rim shape 2 (cross cylinder at 90 degrees)"
  rim2_shape = MultibodyComponents.CylinderShape(render = render, color = [0.8, 0.8, 0.8, 1.0])
  "Minimum adhesion velocity"
  parameter vAdhesion_min::Velocity
  "Minimum sliding velocity"
  parameter vSlide_min::Velocity
  "Adhesion slippage"
  parameter sAdhesion::Real
  "Sliding slippage"
  parameter sSlide::Real
  "Friction coefficient at adhesion"
  parameter mu_A::Real
  "Friction coefficient at sliding"
  parameter mu_S::Real
  "Radius of the wheel"
  parameter radius::Length = 0.1
  "Diameter of the rim cylinders"
  parameter rim_diameter::Real = radius / 3
  "Width of the wheel"
  parameter wheel_width::Real = radius / 4
  "z-position of the wheel in animations"
  parameter z_position::Real = 0
  "Wheel rolling angle"
  variable phi_roll::Angle
  "Wheel rolling velocity"
  variable w_roll::AngularVelocity
  "Position in x direction"
  variable x::Dyad.Position
  "Velocity in longitudinal (x) direction"
  variable v::Velocity
  "Slip velocity in longitudinal direction"
  variable v_slip_long::Velocity
  "Slip velocity magnitude"
  variable v_slip::Velocity
  "Total traction force magnitude"
  variable f::Dyad.Force
  "Longitudinal friction force"
  variable f_long::Dyad.Force
  "Normal constraint force (determined by dynamics)"
  variable f_n::Dyad.Force
  "Adhesion velocity threshold"
  variable vAdhesion::Velocity
  "Sliding velocity threshold"
  variable vSlide::Velocity
relations
  # Position along x-axis
  x = frame_a.x
  v = der(x)
  # Wheel angle coupling
  phi_roll = -frame_a.phi
  w_roll = der(phi_roll)
  # Longitudinal slip
  v_slip_long = v - radius * w_roll
  v_slip = abs(v_slip_long) + 0.0001
  # Slip-dependent friction thresholds
  vAdhesion = max(vAdhesion_min, sAdhesion * abs(radius * w_roll))
  vSlide = max(vSlide_min, sSlide * abs(radius * w_roll))
  # Friction force from slip curve (f_n is normal force from constraint dynamics)
  f = f_n * MultibodyComponents.limit_S_triple(vAdhesion, vSlide, mu_A, mu_S, v_slip)
  f_long = -f * v_slip_long / v_slip
  # Frame forces from contact
  frame_a.fx = f_long
  frame_a.fy = f_n
  frame_a.tau = radius * f_long
  # Position constraint: wheel center at ground level + radius
  frame_a.y = radius
  # Tire shape: cylinder along the axle
  tire_shape.r = [frame_a.x, frame_a.y, z_position]
  tire_shape.R = MultibodyComponents.RR(MultibodyComponents.nullrotation())
  tire_shape.r_shape = [0, 0, -wheel_width / 2]
  tire_shape.length_direction = [0, 0, 1]
  tire_shape.width_direction = [0, 1, 0]
  tire_shape.length = wheel_width
  tire_shape.width = radius * 2
  tire_shape.height = radius * 2
  # Rim 1: cross cylinder that rotates with the wheel around the axle
  rim1_shape.r = [frame_a.x, frame_a.y, z_position]
  rim1_shape.R = MultibodyComponents.planar_rotation([0, 0, 1], phi_roll, w_roll)
  rim1_shape.r_shape = [-radius, 0, 0]
  rim1_shape.length_direction = [1, 0, 0]
  rim1_shape.width_direction = [0, 1, 0]
  rim1_shape.length = radius * 2
  rim1_shape.width = rim_diameter
  rim1_shape.height = rim_diameter
  # Rim 2: same but offset by 90 degrees
  rim2_shape.r = [frame_a.x, frame_a.y, z_position]
  rim2_shape.R = MultibodyComponents.planar_rotation([0, 0, 1], phi_roll + 3.14159265358979 / 2, w_roll)
  rim2_shape.r_shape = [-radius, 0, 0]
  rim2_shape.length_direction = [1, 0, 0]
  rim2_shape.width_direction = [0, 1, 0]
  rim2_shape.length = radius * 2
  rim2_shape.width = rim_diameter
  rim2_shape.height = rim_diameter
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/OneDOFSlippingWheelJoint.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 900,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end


Test Cases

No test cases defined.