Skip to content

Commit dee2ed3

Browse files
committed
better guesses for 3D geometry parameters
1 parent a428271 commit dee2ed3

1 file changed

Lines changed: 18 additions & 9 deletions

File tree

src/segway_3d.jl

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,31 @@ using OrdinaryDiffEq
77

88
@component function DyadBot3D(; name)
99
pars = @parameters begin
10-
wheel_radius = 0.25
11-
body_mass = 10.0
12-
body_height = 0.8
10+
wheel_radius = 0.04
11+
body_mass = 0.1
12+
body_height = 0.1
13+
body_width = 0.13
14+
body_depth = 0.07
1315
end
1416

1517
systems = @named begin
1618
world = World()
1719
wheels = RollingWheelSet(
1820
radius = wheel_radius,
19-
m_wheel = 1.0,
20-
I_axis = 0.1,
21-
I_long = 0.1,
22-
track = 0.5, # distance between wheels
21+
m_wheel = 0.05, # mass of one wheel
22+
I_axis = 5e-5, # moment of inertia of one wheel around the rotation axis
23+
I_long = 1e-5,
24+
track = body_width, # distance between wheels
2325
)
24-
body_offset = FixedTranslation(r = [0, body_height/2, 0]) # raise body above wheel axis
25-
body = BodyShape(m = body_mass, r = [0.1, body_height, 0.1]) # thin tall body
26+
body = BodyShape(
27+
m = body_mass,
28+
I_22 = 0.01*0.03^2, # Inertia around vertical axis, a very rough approximation
29+
I_11 = 0.01*0.05^2, # Total guesses
30+
I_33 = 0.01*0.05^2,
31+
r = [0.0, body_height, 0.0], # Vector from `frame_a` to `frame_b` (head) resolved in `frame_a`
32+
height = body_depth, # we use the word "height" for the length of r
33+
width = body_width,
34+
)
2635
end
2736

2837
eqs = [

0 commit comments

Comments
 (0)