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:
| Name | Description | Units | Default value |
|---|---|---|---|
render | – | true | |
color | – | [0.1, 0.1, 0.1, 1] | |
specular_coefficient | – | 0.7 | |
vAdhesion_min | Minimum adhesion velocity | m/s | |
vSlide_min | Minimum sliding velocity | m/s | |
sAdhesion | Adhesion slippage | – | |
sSlide | Sliding slippage | – | |
mu_A | Friction coefficient at adhesion | – | |
mu_S | Friction coefficient at sliding | – | |
radius | Radius of the wheel | m | 0.1 |
rim_diameter | Diameter of the rim cylinders | – | radius / 3 |
wheel_width | Width of the wheel | – | radius / 4 |
z_position | z-position of the wheel in animations | – | 0 |
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
| Name | Description | Units |
|---|---|---|
phi_roll | Wheel rolling angle | rad |
w_roll | Wheel rolling velocity | rad/s |
x | Position in x direction | m |
v | Velocity in longitudinal (x) direction | m/s |
v_slip_long | Slip velocity in longitudinal direction | m/s |
v_slip | Slip velocity magnitude | m/s |
f | Total traction force magnitude | N |
f_long | Longitudinal friction force | N |
f_n | Normal constraint force (determined by dynamics) | N |
vAdhesion | Adhesion velocity threshold | m/s |
vSlide | Sliding velocity threshold | m/s |
Behavior
Dict{MIME{Symbol("text/plain")}, String} with 1 entry: MIME type text/plain => "Error displaying result"
Source
"""
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"}
}
]
}
}
endFlattened Source
"""
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"}
}
]
}
}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses
Tests