Skip to content

Commit 7b9d31e

Browse files
committed
up prismatic
1 parent b221b59 commit 7b9d31e

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

src/joints.jl

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -119,20 +119,22 @@ The function returns an System representing the prismatic joint.
119119
render = render, [description = "render the joint in animations"]
120120
end
121121

122-
@variables s(t)=s0 [
123-
state_priority = state_priority,
124-
description = "Relative distance between frame_a and frame_b",
125-
]
126-
@variables v(t)=v0 [
127-
state_priority = state_priority,
128-
description = "Relative velocity between frame_a and frame_b",
129-
]
130-
@variables a(t) [
131-
description = "Relative acceleration between frame_a and frame_b",
132-
]
133-
@variables f(t) [
134-
description = "Actuation force in direction of joint axis",
135-
]
122+
vars = @variables begin
123+
s(t)=s0, [
124+
state_priority = state_priority,
125+
description = "Relative distance between frame_a and frame_b",
126+
]
127+
v(t)=v0, [
128+
state_priority = state_priority,
129+
description = "Relative velocity between frame_a and frame_b",
130+
]
131+
a(t), [
132+
description = "Relative acceleration between frame_a and frame_b",
133+
]
134+
f(t), [
135+
description = "Actuation force in direction of joint axis",
136+
]
137+
end
136138

137139
eqs = [v ~ D(s)
138140
a ~ D(v)

src/wheels.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ this frame.
179179
zeros(3) ~ collect(frame_a.f) + resolve2(Ra, f_wheel_0)
180180
zeros(3) ~ collect(frame_a.tau) +
181181
resolve2(Ra, cross(delta_0, f_wheel_0))]
182-
sys = compose(System(equations, t, vars, pars; name=:nothing), frame_a)
182+
sys = compose(System(equations, t; name=:nothing), frame_a)
183183
add_params(sys, [color;]; name)
184184
end
185185

@@ -241,6 +241,10 @@ with the wheel itself. A [`Revolute`](@ref) joint rotationg around `n = [0, 1, 0
241241
I_32 = 0,
242242
render = false)
243243
end
244+
# guesses = Dict([
245+
# (wheeljoint.angles) => angles;
246+
# (wheeljoint.der_angles) => der_angles;
247+
# ])
244248
pars = @parameters begin
245249
radius = radius, [description = "Radius of the wheel"]
246250
m = m, [description = "Mass of the wheel"]

0 commit comments

Comments
 (0)