LIBRARY
PlanarMechanics.OneDOFSlippingWheelSegwayTest
Test for OneDOFSlippingWheelJoint: planar segway model.
Two bodies connected via a FixedTranslation on a slip-based wheel. The heavy body (m=10) acts as a pendulum on the wheel, creating a segway-like motion. Translates the segway test from test_OneDOFWheelJoint.jl.
Usage
MultibodyComponents.PlanarMechanics.OneDOFSlippingWheelSegwayTest()
Behavior
Source
dyad
"""
Test for OneDOFSlippingWheelJoint: planar segway model.
Two bodies connected via a FixedTranslation on a slip-based wheel. The heavy body
(m=10) acts as a pendulum on the wheel, creating a segway-like motion.
Translates the segway test from test_OneDOFWheelJoint.jl.
"""
test component OneDOFSlippingWheelSegwayTest
world = World(g = 9.82) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 40, "y1": 710, "x2": 140, "y2": 810, "rot": 0}
},
"tags": []
}
}
body = Body(m = 0.7, I = 0.0001, radius = 0.3) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 560, "y1": 80, "x2": 760, "y2": 280, "rot": 0}
},
"tags": []
}
}
body2 = Body(I = 0.001, radius = 0.2, m = 0.4) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 560, "y1": 420, "x2": 760, "y2": 620, "rot": 0}
},
"tags": []
}
}
translation_cm = FixedTranslation(r = [2, 0], color = [0.5, 0.5, 0.5, 0.5]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 230, "y1": 260, "x2": 430, "y2": 460, "rot": 270}
},
"tags": []
}
}
wheelJoint = OneDOFSlippingWheelJoint(radius = 1, mu_A = 1, mu_S = 0.7, sAdhesion = 0.04, sSlide = 0.12, vAdhesion_min = 0.05, vSlide_min = 0.15) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 230, "y1": 620, "x2": 430, "y2": 820, "rot": 0}
},
"tags": []
}
}
relations
initial body.phi = 0.0
initial body.w = 0.0
initial wheelJoint.x = 0.0
initial wheelJoint.v = 0.0
connect(wheelJoint.frame_a, translation_cm.frame_a, body2.frame_a) {
"Dyad": {
"edges": [
{"S": 1, "M": [], "E": -1},
{"S": -1, "M": [], "E": 2},
{"S": 3, "M": [], "E": -1}
],
"junctions": [{"x": 330, "y": 520}],
"renderStyle": "standard"
}
}
connect(body.frame_a, translation_cm.frame_b) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 330, "y": 180}], "E": 2}],
"renderStyle": "standard"
}
}
metadata {"Dyad": {"tests": {"case1": {"stop": 50}}}}
endFlattened Source
dyad
"""
Test for OneDOFSlippingWheelJoint: planar segway model.
Two bodies connected via a FixedTranslation on a slip-based wheel. The heavy body
(m=10) acts as a pendulum on the wheel, creating a segway-like motion.
Translates the segway test from test_OneDOFWheelJoint.jl.
"""
test component OneDOFSlippingWheelSegwayTest
world = World(g = 9.82) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 40, "y1": 710, "x2": 140, "y2": 810, "rot": 0}
},
"tags": []
}
}
body = Body(m = 0.7, I = 0.0001, radius = 0.3) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 560, "y1": 80, "x2": 760, "y2": 280, "rot": 0}
},
"tags": []
}
}
body2 = Body(I = 0.001, radius = 0.2, m = 0.4) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 560, "y1": 420, "x2": 760, "y2": 620, "rot": 0}
},
"tags": []
}
}
translation_cm = FixedTranslation(r = [2, 0], color = [0.5, 0.5, 0.5, 0.5]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 230, "y1": 260, "x2": 430, "y2": 460, "rot": 270}
},
"tags": []
}
}
wheelJoint = OneDOFSlippingWheelJoint(radius = 1, mu_A = 1, mu_S = 0.7, sAdhesion = 0.04, sSlide = 0.12, vAdhesion_min = 0.05, vSlide_min = 0.15) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 230, "y1": 620, "x2": 430, "y2": 820, "rot": 0}
},
"tags": []
}
}
relations
initial body.phi = 0.0
initial body.w = 0.0
initial wheelJoint.x = 0.0
initial wheelJoint.v = 0.0
connect(wheelJoint.frame_a, translation_cm.frame_a, body2.frame_a) {
"Dyad": {
"edges": [
{"S": 1, "M": [], "E": -1},
{"S": -1, "M": [], "E": 2},
{"S": 3, "M": [], "E": -1}
],
"junctions": [{"x": 330, "y": 520}],
"renderStyle": "standard"
}
}
connect(body.frame_a, translation_cm.frame_b) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 330, "y": 180}], "E": 2}],
"renderStyle": "standard"
}
}
metadata {"Dyad": {"tests": {"case1": {"stop": 50}}}}
endTest Cases
Test Case case1
Related
Examples
Experiments
Analyses
Tests