Skip to content

Commit 431a314

Browse files
committed
add more docs for wheels
1 parent 8e04685 commit 431a314

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

docs/src/examples/wheel.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ When modeling wheels, there are several different assumptions that can be made,
77
The wheel-related components available are
88
- [`RollingWheel`](@ref): a wheel that can roll on the ground. It cannot slip and it cannot leave the ground.
99
- [`RollingWheelJoint`](@ref): a lower-level component used in `RollingWheel` to model the kinematics of the wheel, without inertial or mass properties.
10+
- [`SlipWheel`](@ref): Similar [`RollingWheel`](@ref), but can also slip.
11+
- [`SlipWheelJoint`](@ref): Similar to [`RollingWheelJoint`](@ref), but for `SlipWheel`.
1012
- [`RollingWheelSet`](@ref): a set of two wheels connected by an axis. One of the wheels cannot slip, while the other one slips as required to allow the wheel set to turn (no differential is modeled). No wheel can leave the ground.
1113
- [`RollingWheelSetJoint`](@ref): A lower-level component used in `RollingWheelSet` to model the kinematics of the wheel set, without inertial or mass properties.
1214
- [`RollingConstraintVerticalWheel`](@ref): A low-level constraint that is used to enforce a perfectly rolling wheel that is always vertical, i.e., it can only roll forward and not fall down.
@@ -322,7 +324,6 @@ end
322324
@named model = TestSlipBasedWheel()
323325
model = complete(model)
324326
ssys = structural_simplify(IRSystem(model))
325-
display(unknowns(ssys))
326327
defs = ModelingToolkit.defaults(model)
327328
prob = ODEProblem(ssys, [
328329
model.inertia.w => 1e-10, # This is important, at zero velocity, the friction is ill-defined

src/wheels.jl

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,34 @@ Joint for a wheel with slip rolling on a surface.
439439
compose(ODESystem(equations, t; name), frame_a)
440440
end
441441

442+
443+
"""
444+
SlippingWheel(; name, radius, m, I_axis, I_long, width = 0.035, x0=0, z0=0,
445+
angles = zeros(3), der_angles = zeros(3), kwargs...)
446+
447+
Wheel with slip rolling on a surface.
448+
449+
# Parameters
450+
- `radius`: Radius of the wheel
451+
- `m`: Mass of the wheel
452+
- `I_axis`: Moment of inertia of the wheel along its axis
453+
- `I_long`: Moment of inertia of the wheel perpendicular to its axis
454+
- `width`: Width of the wheel (for rendering)
455+
- `x0`: Initial x-position of the wheel axis
456+
- `z0`: Initial z-position of the wheel axis
457+
458+
# Variables
459+
- `x`: x-position of the wheel axis
460+
- `z`: z-position of the wheel axis
461+
- `angles`: Angles to rotate world-frame into `frame_a` around y-, z-, x-axis
462+
- `der_angles`: Derivatives of angles
463+
464+
# Connectors
465+
- `frame_a`: Frame for the wheel component
466+
467+
# Examples
468+
See [Docs: Wheels](https://help.juliahub.com/multibody/dev/examples/wheel/)
469+
"""
442470
@component function SlippingWheel(; name, radius, m, I_axis, I_long, width = 0.035, x0=0, z0=0,
443471
angles = zeros(3), der_angles = zeros(3), kwargs...)
444472
@named wheeljoint = SlipWheelJoint(; radius, angles, x0, z0, der_angles, kwargs...)

0 commit comments

Comments
 (0)