Skip to content
LIBRARY
tests.WheelInWorld.md

tests.WheelInWorld

Wheel In World

A rolling wheel on flat ground starting at (x, z) = (0.2, 0.2) with initial angular velocities [0, -5, -1] (around y-, z-, x-axis) rolls freely under gravity. The World component is present only to enable gravity; the wheel is not connected to it because the joint's contact equations already constrain the wheel to the ground.

Expected at t = 4 s: wheel.x ≈ 0.162547, wheel.z ≈ -2.23778 (matching the Multibody.jl assertion).

Usage

MultibodyComponents.tests.WheelInWorld()

Behavior

Source

dyad
"""
# Wheel In World

A rolling wheel on flat ground starting at `(x, z) = (0.2, 0.2)` with initial
angular velocities `[0, -5, -1]` (around y-, z-, x-axis) rolls freely under
gravity. The `World` component is present only to enable gravity; the wheel
is not connected to it because the joint's contact equations already
constrain the wheel to the ground.

Expected at `t = 4 s`: `wheel.x ≈ 0.162547`, `wheel.z ≈ -2.23778`
(matching the Multibody.jl assertion).
"""
example component WheelInWorld
  world = MultibodyComponents.World() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 20, "y1": 20, "x2": 120, "y2": 120, "rot": 0}
      },
      "tags": []
    }
  }
  wheel = MultibodyComponents.RollingWheel(radius = 0.3, m = 2, I_axis = 0.06, I_long = 0.12, x(initial = 0.2), z(initial = 0.2), angles(initial = [0, 0, 0]), der_angles(initial = [0, -5, -1])) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 200, "y1": 20, "x2": 300, "y2": 120, "rot": 0}
      },
      "tags": []
    }
  }
relations
end
Flattened Source
dyad
"""
# Wheel In World

A rolling wheel on flat ground starting at `(x, z) = (0.2, 0.2)` with initial
angular velocities `[0, -5, -1]` (around y-, z-, x-axis) rolls freely under
gravity. The `World` component is present only to enable gravity; the wheel
is not connected to it because the joint's contact equations already
constrain the wheel to the ground.

Expected at `t = 4 s`: `wheel.x ≈ 0.162547`, `wheel.z ≈ -2.23778`
(matching the Multibody.jl assertion).
"""
example component WheelInWorld
  world = MultibodyComponents.World() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 20, "y1": 20, "x2": 120, "y2": 120, "rot": 0}
      },
      "tags": []
    }
  }
  wheel = MultibodyComponents.RollingWheel(radius = 0.3, m = 2, I_axis = 0.06, I_long = 0.12, x(initial = 0.2), z(initial = 0.2), angles(initial = [0, 0, 0]), der_angles(initial = [0, -5, -1])) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 200, "y1": 20, "x2": 300, "y2": 120, "rot": 0}
      },
      "tags": []
    }
  }
relations
metadata {}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses