RollingWheelSet
Ideal two-wheel rolling axle with masses and inertia per wheel.
Wraps RollingWheelSetJoint and adds two Body instances at the wheel centers. Connect driving torques between axis1/axis2 and support.
This component extends from Renderable
Usage
MultibodyComponents.RollingWheelSet(render=true, color=[0.118, 0.118, 0.118, 1], specular_coefficient=1.5, radius=0.3, m_wheel=1.0, I_axis=1.0, I_long=1.0, track=1.0, width_wheel=0.01)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
render | – | true | |
color | – | [0.118, 0.118, 0.118, 1] | |
specular_coefficient | – | 1.5 | |
radius | m | 0.3 | |
m_wheel | kg | 1.0 | |
I_axis | kg.m2 | 1.0 | |
I_long | kg.m2 | 1.0 | |
track | m | 1.0 | |
width_wheel | m | 0.01 |
Connectors
frame_middle- Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or severalFrame
connectors that can be connected together (Frame3D)
frame1- Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or severalFrame
connectors that can be connected together (Frame3D)
frame2- Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or severalFrame
connectors that can be connected together (Frame3D)
axis1- This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline)axis2- This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline)support- This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline)
Variables
| Name | Description | Units |
|---|---|---|
x | m | |
z | m | |
phi | rad | |
theta1 | rad | |
theta2 | rad | |
der_theta1 | rad/s | |
der_theta2 | rad/s |
Behavior
Source
"""
Ideal two-wheel rolling axle with masses and inertia per wheel.
Wraps `RollingWheelSetJoint` and adds two `Body` instances at the wheel
centers. Connect driving torques between `axis1`/`axis2` and `support`.
"""
component RollingWheelSet
extends Renderable(color = [0.118, 0.118, 0.118, 1])
frame_middle = Frame3D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 450, "x2": 550, "y2": 550, "rot": 0}
},
"tags": []
}
}
frame1 = Frame3D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
},
"tags": []
}
}
frame2 = Frame3D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
},
"tags": []
}
}
axis1 = Spline() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": -50, "y1": -50, "x2": 50, "y2": 50, "rot": 0}
},
"tags": []
}
}
axis2 = Spline() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 950, "y1": -50, "x2": 1050, "y2": 50, "rot": 0}
},
"tags": []
}
}
support = Spline() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 90, "x2": 550, "y2": 190, "rot": 0}
},
"tags": []
}
}
wheelSetJoint = MultibodyComponents.RollingWheelSetJoint(final radius = radius, final track = track, final width_wheel = width_wheel) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 280, "x2": 550, "y2": 380, "rot": 0}
},
"tags": []
}
}
body1 = MultibodyComponents.Body(final m = m_wheel, final I_11 = I_long, final I_22 = I_long, final I_33 = I_axis, render = false) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 120, "y1": 300, "x2": 220, "y2": 400, "rot": 270}
},
"tags": []
}
}
body2 = MultibodyComponents.Body(final m = m_wheel, final I_11 = I_long, final I_22 = I_long, final I_33 = I_axis, render = false) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 790, "y1": 300, "x2": 890, "y2": 400, "rot": 270}
},
"tags": []
}
}
shape1 = CylinderShape(render = render, color = color, r = frame1.r_0, R = transpose(frame1.R), length_direction = [0, 0, 1], length = 2 * width_wheel, width = 2 * radius, height = 2 * radius, r_shape = [0, 0, -width_wheel]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 30, "y1": 870, "x2": 130, "y2": 970, "rot": 0}
},
"tags": []
}
}
shape2 = CylinderShape(render = render, color = color, r = frame2.r_0, R = transpose(frame2.R), length_direction = [0, 0, 1], length = 2 * width_wheel, width = 2 * radius, height = 2 * radius, r_shape = [0, 0, -width_wheel]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 160, "y1": 870, "x2": 260, "y2": 970, "rot": 0}
},
"tags": []
}
}
parameter radius::Length = 0.3
parameter m_wheel::Mass = 1.0
parameter I_axis::Inertia = 1.0
parameter I_long::Inertia = 1.0
parameter track::Length = 1.0
parameter width_wheel::Length = 0.01
variable x::Length(statePriority = 100, initial = 0)
variable z::Length(statePriority = 100, initial = 0)
variable phi::Angle(statePriority = 100, initial = 0)
variable theta1::Angle(statePriority = 100, initial = 0)
variable theta2::Angle(statePriority = 100, initial = 0)
variable der_theta1::AngularVelocity(statePriority = 100, initial = 0)
variable der_theta2::AngularVelocity(statePriority = 100, initial = 0)
relations
wheelSetJoint.x = x
wheelSetJoint.z = z
wheelSetJoint.phi = phi
wheelSetJoint.theta1 = theta1
wheelSetJoint.theta2 = theta2
der_theta1 = der(theta1)
der_theta2 = der(theta2)
connect(body1.frame_a, frame1, wheelSetJoint.frame1) {
"Dyad": {
"edges": [
{"S": 1, "M": [], "E": -1},
{"S": -1, "M": [{"x": 170, "y": 500}], "E": 2},
{"S": 3, "M": [{"x": 310, "y": 330}, {"x": 310, "y": 500}], "E": -1}
],
"junctions": [{"x": 170, "y": 500}],
"renderStyle": "standard"
}
}
connect(body2.frame_a, frame2, wheelSetJoint.frame2) {
"Dyad": {
"edges": [
{"S": 1, "M": [], "E": -1},
{"S": -1, "M": [{"x": 840, "y": 500}], "E": 2},
{"S": 3, "M": [{"x": 695, "y": 330}, {"x": 695, "y": 500}], "E": -1}
],
"junctions": [{"x": 840, "y": 500}],
"renderStyle": "standard"
}
}
connect(wheelSetJoint.axis1, axis1) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 270, "y": 287}, {"x": 270, "y": 0}], "E": 2}],
"renderStyle": "standard"
}
}
connect(wheelSetJoint.axis2, axis2) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 760, "y": 287}, {"x": 760, "y": 0}], "E": 2}],
"renderStyle": "standard"
}
}
connect(wheelSetJoint.support, support) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(frame_middle, wheelSetJoint.frame_middle) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
metadata {
"Dyad": {
"icons": {"default": "dyad://MultibodyComponents/RollingWheelSet.svg"},
"labels": [
{
"label": "$(instance)",
"x": 500,
"y": 1080,
"rot": 0,
"attrs": {"font-size": "120"}
}
]
}
}
endFlattened Source
"""
Ideal two-wheel rolling axle with masses and inertia per wheel.
Wraps `RollingWheelSetJoint` and adds two `Body` instances at the wheel
centers. Connect driving torques between `axis1`/`axis2` and `support`.
"""
component RollingWheelSet
parameter render::Boolean = true
parameter color::Real[4] = [0.5, 0.5, 0.5, 1.0]
parameter specular_coefficient::Real = 1.5
frame_middle = Frame3D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 450, "x2": 550, "y2": 550, "rot": 0}
},
"tags": []
}
}
frame1 = Frame3D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
},
"tags": []
}
}
frame2 = Frame3D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
},
"tags": []
}
}
axis1 = Spline() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": -50, "y1": -50, "x2": 50, "y2": 50, "rot": 0}
},
"tags": []
}
}
axis2 = Spline() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 950, "y1": -50, "x2": 1050, "y2": 50, "rot": 0}
},
"tags": []
}
}
support = Spline() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 90, "x2": 550, "y2": 190, "rot": 0}
},
"tags": []
}
}
wheelSetJoint = MultibodyComponents.RollingWheelSetJoint(final radius = radius, final track = track, final width_wheel = width_wheel) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 280, "x2": 550, "y2": 380, "rot": 0}
},
"tags": []
}
}
body1 = MultibodyComponents.Body(final m = m_wheel, final I_11 = I_long, final I_22 = I_long, final I_33 = I_axis, render = false) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 120, "y1": 300, "x2": 220, "y2": 400, "rot": 270}
},
"tags": []
}
}
body2 = MultibodyComponents.Body(final m = m_wheel, final I_11 = I_long, final I_22 = I_long, final I_33 = I_axis, render = false) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 790, "y1": 300, "x2": 890, "y2": 400, "rot": 270}
},
"tags": []
}
}
shape1 = CylinderShape(render = render, color = color, r = frame1.r_0, R = transpose(frame1.R), length_direction = [0, 0, 1], length = 2 * width_wheel, width = 2 * radius, height = 2 * radius, r_shape = [0, 0, -width_wheel]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 30, "y1": 870, "x2": 130, "y2": 970, "rot": 0}
},
"tags": []
}
}
shape2 = CylinderShape(render = render, color = color, r = frame2.r_0, R = transpose(frame2.R), length_direction = [0, 0, 1], length = 2 * width_wheel, width = 2 * radius, height = 2 * radius, r_shape = [0, 0, -width_wheel]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 160, "y1": 870, "x2": 260, "y2": 970, "rot": 0}
},
"tags": []
}
}
parameter radius::Length = 0.3
parameter m_wheel::Mass = 1.0
parameter I_axis::Inertia = 1.0
parameter I_long::Inertia = 1.0
parameter track::Length = 1.0
parameter width_wheel::Length = 0.01
variable x::Length(statePriority = 100, initial = 0)
variable z::Length(statePriority = 100, initial = 0)
variable phi::Angle(statePriority = 100, initial = 0)
variable theta1::Angle(statePriority = 100, initial = 0)
variable theta2::Angle(statePriority = 100, initial = 0)
variable der_theta1::AngularVelocity(statePriority = 100, initial = 0)
variable der_theta2::AngularVelocity(statePriority = 100, initial = 0)
relations
wheelSetJoint.x = x
wheelSetJoint.z = z
wheelSetJoint.phi = phi
wheelSetJoint.theta1 = theta1
wheelSetJoint.theta2 = theta2
der_theta1 = der(theta1)
der_theta2 = der(theta2)
connect(body1.frame_a, frame1, wheelSetJoint.frame1) {
"Dyad": {
"edges": [
{"S": 1, "M": [], "E": -1},
{"S": -1, "M": [{"x": 170, "y": 500}], "E": 2},
{"S": 3, "M": [{"x": 310, "y": 330}, {"x": 310, "y": 500}], "E": -1}
],
"junctions": [{"x": 170, "y": 500}],
"renderStyle": "standard"
}
}
connect(body2.frame_a, frame2, wheelSetJoint.frame2) {
"Dyad": {
"edges": [
{"S": 1, "M": [], "E": -1},
{"S": -1, "M": [{"x": 840, "y": 500}], "E": 2},
{"S": 3, "M": [{"x": 695, "y": 330}, {"x": 695, "y": 500}], "E": -1}
],
"junctions": [{"x": 840, "y": 500}],
"renderStyle": "standard"
}
}
connect(wheelSetJoint.axis1, axis1) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 270, "y": 287}, {"x": 270, "y": 0}], "E": 2}],
"renderStyle": "standard"
}
}
connect(wheelSetJoint.axis2, axis2) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 760, "y": 287}, {"x": 760, "y": 0}], "E": 2}],
"renderStyle": "standard"
}
}
connect(wheelSetJoint.support, support) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(frame_middle, wheelSetJoint.frame_middle) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
metadata {
"Dyad": {
"icons": {"default": "dyad://MultibodyComponents/RollingWheelSet.svg"},
"labels": [
{
"label": "$(instance)",
"x": 500,
"y": 1080,
"rot": 0,
"attrs": {"font-size": "120"}
}
]
}
}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses