You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/fancy_joints.jl
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -331,7 +331,7 @@ This joint aggregation can be used in cases where in reality a rod with spherica
331
331
render = render, [description="Whether or not to render the joint in animations"]
332
332
end
333
333
334
-
pars =collect_all(pars)
334
+
#pars = collect_all(pars)
335
335
336
336
vars =@variablesbegin
337
337
f_rod(t), [description="Constraint force in direction of the rod (positive on frame_a, when directed from frame_a to frame_b)"]
@@ -340,14 +340,14 @@ This joint aggregation can be used in cases where in reality a rod with spherica
340
340
# e3_ia(t)[1:3], [description="Unit vector perpendicular to eRod_ia and e2_ia, resolved in frame_ia"]
341
341
f_b_a1(t)[1:3], [description="frame_b.f without f_rod part, resolved in frame_a (needed for analytic loop handling)"]
342
342
eRod_a(t)[1:3], [description="Unit vector in direction of rRod_a, resolved in frame_a (needed for analytic loop handling)"]
343
-
rRod_0(t)[1:3]= rRod_ia, [description="Position vector from frame_a to frame_b resolved in world frame"]
344
-
rRod_a(t)[1:3]= rRod_ia, [description="Position vector from frame_a to frame_b resolved in frame_a"]
345
-
(constraint_residue(t)=0), [description="Constraint equation of joint in residue form: Either length constraint (= default) or equation to compute rod force (for analytic solution of loops in combination with Internal.RevoluteWithLengthConstraint/PrismaticWithLengthConstraint)"]
343
+
rRod_0(t)[1:3], [guess = rRod_ia, description="Position vector from frame_a to frame_b resolved in world frame"]
344
+
rRod_a(t)[1:3], [guess = rRod_ia, description="Position vector from frame_a to frame_b resolved in frame_a"]
345
+
(constraint_residue(t)), [guess =0, description="Constraint equation of joint in residue form: Either length constraint (= default) or equation to compute rod force (for analytic solution of loops in combination with Internal.RevoluteWithLengthConstraint/PrismaticWithLengthConstraint)"]
346
346
f_b_a(t)[1:3], [description="frame_b.f resolved in frame_a"]
347
347
f_ia_a(t)[1:3], [description="frame_ia.f resolved in frame_a"]
348
348
t_ia_a(t)[1:3], [description="frame_ia.t resolved in frame_a"]
349
349
n2_a(t)[1:3], [description="Vector in direction of axis 2 of the universal joint (e2_ia), resolved in frame_a"]
350
-
(length2_n2_a(t)=1), [description="Square of length of vector n2_a"]
350
+
(length2_n2_a(t)), [guess =1, description="Square of length of vector n2_a"]
351
351
length_n2_a(t), [description="Length of vector n2_a"]
352
352
e2_a(t)[1:3], [description="Unit vector in direction of axis 2 of the universal joint (e2_ia), resolved in frame_a"]
353
353
e3_a(t)[1:3], [description="Unit vector perpendicular to eRod_ia and e2_a, resolved in frame_a"]
Copy file name to clipboardExpand all lines: test/test_fourbar.jl
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ D = Differential(t)
11
11
world = Multibody.world
12
12
13
13
systems =@namedbegin
14
-
j1 =Revolute(n = [1, 0, 0], w0 =5.235987755982989, state_priority=10.0, radius=0.1f0) # Increase state priority to ensure that this joint coordinate is chosen as state variable
14
+
j1 =Revolute(n = [1, 0, 0], w0 =5.235987755982989, state_priority=10, radius=0.1f0) # Increase state priority to ensure that this joint coordinate is chosen as state variable
@named fourbar2 =System(connections, t, systems = [world; systems])
41
-
fourbar2 =complete(fourbar2)
42
41
ssys =multibody(fourbar2)
43
42
44
43
prob =ODEProblem(ssys, [], (0.0, 1.4399)) # The end time is chosen to make the animation below appear to loop forever
@@ -49,7 +48,7 @@ sol = solve(prob, FBDF(autodiff=true));
49
48
50
49
51
50
systems =@namedbegin
52
-
j1 =Revolute(n = [1, 0, 0], w0 =5.235987755983, state_priority=12.0, radius=0.1f0) # Increase state priority to ensure that this joint coordinate is chosen as state variable
51
+
j1 =Revolute(n = [1, 0, 0], w0 =5.235987755983, phi0=nothing, state_priority=12, radius=0.1f0) # Increase state priority to ensure that this joint coordinate is chosen as state variable
0 commit comments