Skip to content
LIBRARY
PlanarMechanics.OneDOFSlippingWheelSpinningTest.md

PlanarMechanics.OneDOFSlippingWheelSpinningTest

Test for OneDOFSlippingWheelJoint: a wheel spinning in place.

A body (m=0.1, I=0.1) with initial angular velocity w=30 rad/s on a slip-based wheel of radius 1. The wheel starts spinning and eventually the rotational speed matches the linear speed. Translates the spinning wheel test from test_OneDOFWheelJoint.jl.

Usage

MultibodyComponents.PlanarMechanics.OneDOFSlippingWheelSpinningTest()

Behavior

[connect(wheelJoint+framea,body+framea)world.frameb.x(t)=0world.frameb.y(t)=0world.frameb.phi(t)=0connect(frameb,framevis+frame_a)world.framevis.phi(t)=world.framevis.frame_a.phi(t)world.framevis.x_shape.r(t)=arrayliteral([3],world.framevis.frame_a.x(t),world.framevis.frame_a.y(t),world.framevis.z_position)world.framevis.x_shape.R(t)=arrayliteral([33],cos(world.framevis.phi(t)),sin(world.framevis.phi(t)),0,sin(world.framevis.phi(t)),cos(world.framevis.phi(t)),0,0,0,1)world.framevis.x_shape.r_shape(t)=[000]world.framevis.x_shape.length_direction(t)=[100]world.framevis.x_shape.width_direction(t)=[001]world.framevis.x_shape.length(t)=world.framevis.axis_lengthworld.framevis.x_shape.width(t)=2world.framevis.axis_radiusworld.framevis.x_shape.height(t)=2world.framevis.axis_radiusworld.framevis.y_shape.r(t)=arrayliteral([3],world.framevis.frame_a.x(t),world.framevis.frame_a.y(t),world.framevis.z_position)world.framevis.y_shape.R(t)=arrayliteral([33],cos(world.framevis.phi(t)),sin(world.framevis.phi(t)),0,sin(world.framevis.phi(t)),cos(world.framevis.phi(t)),0,0,0,1)world.framevis.y_shape.r_shape(t)=[000]world.framevis.y_shape.length_direction(t)=[010]world.framevis.y_shape.width_direction(t)=[001]world.framevis.y_shape.length(t)=world.framevis.axis_lengthworld.framevis.y_shape.width(t)=2world.framevis.axis_radiusworld.framevis.y_shape.height(t)=2world.framevis.axis_radiusworld.framevis.z_shape.r(t)=arrayliteral([3],world.framevis.frame_a.x(t),world.framevis.frame_a.y(t),world.framevis.z_position)world.framevis.z_shape.R(t)=arrayliteral([33],cos(world.framevis.phi(t)),sin(world.framevis.phi(t)),0,sin(world.framevis.phi(t)),cos(world.framevis.phi(t)),0,0,0,1)world.framevis.z_shape.r_shape(t)=[000]world.framevis.z_shape.length_direction(t)=[001]world.framevis.z_shape.width_direction(t)=[100]world.framevis.z_shape.length(t)=world.framevis.axis_lengthworld.framevis.z_shape.width(t)=2world.framevis.axis_radiusworld.framevis.z_shape.height(t)=2world.framevis.axis_radiusbody.r(t)=arrayliteral([2],body.framea.x(t),body.framea.y(t))body.v(t)=dbody.r(t)dtbody.phi(t)=body.framea.phi(t)body.w(t)=dbody.phi(t)dtbody.a(t)=dbody.v(t)dtbody.alpha(t)=dbody.w(t)dtbody.f(t)=arrayliteral([2],body.framea.fx(t),body.framea.fy(t))body.f(t)+arrayliteral([2],body.mgn2d1,body.mgn2d2)=body.mbody.a(t)body.Ibody.alpha(t)=body.framea.tau(t)body.shape.r(t)=arrayliteral([3],body.framea.x(t),body.framea.y(t),body.zposition)body.shape.R(t)=arrayliteral([33],cos(body.phi(t)),sin(body.phi(t)),0,sin(body.phi(t)),cos(body.phi(t)),0,0,0,1)body.shape.rshape(t)=[000]body.shape.lengthdirection(t)=[001]body.shape.widthdirection(t)=[100]body.shape.length(t)=2body.radiusbody.shape.width(t)=2body.radiusbody.shape.height(t)=2body.radiuswheelJoint.x(t)=wheelJoint.framea.x(t)wheelJoint.v(t)=dwheelJoint.x(t)dtwheelJoint.phiroll(t)=wheelJoint.framea.phi(t)wheelJoint.wroll(t)=dwheelJoint.phiroll(t)dtwheelJoint.vslip_long(t)=wheelJoint.v(t)wheelJoint.radiuswheelJoint.wroll(t)wheelJoint.vslip(t)=0.0001+|wheelJoint.vslip_long(t)|wheelJoint.vAdhesion(t)=max(wheelJoint.vAdhesionmin,wheelJoint.sAdhesion|wheelJoint.radiuswheelJoint.wroll(t)|)wheelJoint.vSlide(t)=max(wheelJoint.vSlidemin,wheelJoint.sSlide|wheelJoint.radiuswheelJoint.wroll(t)|)wheelJoint.f(t)=limitS_triple(wheelJoint.vAdhesion(t),wheelJoint.vSlide(t),wheelJoint.muA,wheelJoint.muS,wheelJoint.vslip(t))wheelJoint.fn(t)wheelJoint.flong(t)=wheelJoint.f(t)wheelJoint.vslip_long(t)wheelJoint.vslip(t)wheelJoint.framea.fx(t)=wheelJoint.flong(t)wheelJoint.framea.fy(t)=wheelJoint.fn(t)wheelJoint.framea.tau(t)=wheelJoint.radiuswheelJoint.flong(t)wheelJoint.framea.y(t)=wheelJoint.radiuswheelJoint.tireshape.r(t)=arrayliteral([3],wheelJoint.framea.x(t),wheelJoint.framea.y(t),wheelJoint.zposition)wheelJoint.tireshape.R(t)=arrayliteral([33],1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0)wheelJoint.tireshape.r_shape(t)=arrayliteral([3],0,0,12wheelJoint.wheelwidth)wheelJoint.tireshape.length_direction(t)=[001]wheelJoint.tireshape.width_direction(t)=[010]wheelJoint.tireshape.length(t)=wheelJoint.wheelwidthwheelJoint.tireshape.width(t)=2wheelJoint.radiuswheelJoint.tireshape.height(t)=2wheelJoint.radiuswheelJoint.rim1shape.r(t)=arrayliteral([3],wheelJoint.framea.x(t),wheelJoint.framea.y(t),wheelJoint.zposition)wheelJoint.rim1shape.R(t)=arrayliteral([33],cos(wheelJoint.phiroll(t)),sin(wheelJoint.phiroll(t)),0,sin(wheelJoint.phiroll(t)),cos(wheelJoint.phiroll(t)),0,0,0,1)wheelJoint.rim1shape.r_shape(t)=arrayliteral([3],wheelJoint.radius,0,0)wheelJoint.rim1shape.length_direction(t)=[100]wheelJoint.rim1shape.width_direction(t)=[010]wheelJoint.rim1shape.length(t)=2wheelJoint.radiuswheelJoint.rim1shape.width(t)=wheelJoint.rimdiameterwheelJoint.rim1shape.height(t)=wheelJoint.rimdiameterwheelJoint.rim2shape.r(t)=arrayliteral([3],wheelJoint.framea.x(t),wheelJoint.framea.y(t),wheelJoint.zposition)wheelJoint.rim2shape.R(t)=arrayliteral([33],cos(1.570796326794895+wheelJoint.phiroll(t)),sin(1.570796326794895+wheelJoint.phiroll(t)),0,sin(1.570796326794895+wheelJoint.phiroll(t)),cos(1.570796326794895+wheelJoint.phiroll(t)),0,0,0,1)wheelJoint.rim2shape.r_shape(t)=arrayliteral([3],wheelJoint.radius,0,0)wheelJoint.rim2shape.length_direction(t)=[100]wheelJoint.rim2shape.width_direction(t)=[010]wheelJoint.rim2shape.length(t)=2wheelJoint.radiuswheelJoint.rim2shape.width(t)=wheelJoint.rimdiameterwheelJoint.rim2shape.height(t)=wheelJoint.rimdiameter]

Source

dyad
"""
Test for OneDOFSlippingWheelJoint: a wheel spinning in place.

A body (m=0.1, I=0.1) with initial angular velocity w=30 rad/s on a slip-based
wheel of radius 1. The wheel starts spinning and eventually the rotational speed
matches the linear speed.
Translates the spinning wheel test from test_OneDOFWheelJoint.jl.
"""
test component OneDOFSlippingWheelSpinningTest
  world = World(g = 9.82)
  body = Body(m = 0.1, I = 0.1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 260, "y1": 20, "x2": 460, "y2": 220, "rot": 0}
      },
      "tags": []
    }
  }
  wheelJoint = OneDOFSlippingWheelJoint(radius = 1, mu_A = 0.95, mu_S = 0.7, sAdhesion = 0.04, sSlide = 0.12, vAdhesion_min = 0.05, vSlide_min = 0.15) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 20, "y1": 190, "x2": 220, "y2": 390, "rot": 0}
      },
      "tags": []
    }
  }
relations
  initial body.phi = 0.0
  initial body.w = 30.0
  initial wheelJoint.x = 0.0
  initial wheelJoint.v = 0.0
  connect(wheelJoint.frame_a, body.frame_a) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 120, "y": 120}], "E": 2}],
      "renderStyle": "standard"
    }
  }
metadata {"Dyad": {"tests": {"case1": {"stop": 3}}}}
end
Flattened Source
dyad
"""
Test for OneDOFSlippingWheelJoint: a wheel spinning in place.

A body (m=0.1, I=0.1) with initial angular velocity w=30 rad/s on a slip-based
wheel of radius 1. The wheel starts spinning and eventually the rotational speed
matches the linear speed.
Translates the spinning wheel test from test_OneDOFWheelJoint.jl.
"""
test component OneDOFSlippingWheelSpinningTest
  world = World(g = 9.82)
  body = Body(m = 0.1, I = 0.1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 260, "y1": 20, "x2": 460, "y2": 220, "rot": 0}
      },
      "tags": []
    }
  }
  wheelJoint = OneDOFSlippingWheelJoint(radius = 1, mu_A = 0.95, mu_S = 0.7, sAdhesion = 0.04, sSlide = 0.12, vAdhesion_min = 0.05, vSlide_min = 0.15) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 20, "y1": 190, "x2": 220, "y2": 390, "rot": 0}
      },
      "tags": []
    }
  }
relations
  initial body.phi = 0.0
  initial body.w = 30.0
  initial wheelJoint.x = 0.0
  initial wheelJoint.v = 0.0
  connect(wheelJoint.frame_a, body.frame_a) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 120, "y": 120}], "E": 2}],
      "renderStyle": "standard"
    }
  }
metadata {"Dyad": {"tests": {"case1": {"stop": 3}}}}
end


Test Cases

Test Case case1