Skip to content

Commit 912dfa9

Browse files
committed
don't include Rrel sys when not needed in FreeMotion
1 parent 9652e06 commit 912dfa9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/joints.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,14 +557,15 @@ The relative position vector `r_rel_a` from the origin of `frame_a` to the origi
557557
# Free motion joint does not have state
558558
if w_rel_a_fixed || z_rel_a_fixed
559559
append!(eqs,
560-
w_rel_b .~ angular_velocity2(frame_b) - resolve2(frame_b.
561-
R, angular_velocity1(frame_a)))
560+
w_rel_b .~ angular_velocity2(ori(frame_b)) - resolve2(ori(frame_b), angular_velocity1(ori(frame_a))))
562561
end
563562
end
564563
if state && !isroot
565564
compose(ODESystem(eqs, t; name), frame_a, frame_b, Rrel_f, Rrel_inv_f)
566-
else
565+
elseif state
567566
compose(ODESystem(eqs, t; name), frame_a, frame_b, Rrel_f, )
567+
else
568+
compose(ODESystem(eqs, t; name), frame_a, frame_b)
568569
end
569570
end
570571

0 commit comments

Comments
 (0)