From 9f7d4b89f06db1d71bb1e36d56089cce28cf8ec9 Mon Sep 17 00:00:00 2001 From: Yingbo Ma Date: Fri, 29 Mar 2024 14:30:03 -0400 Subject: [PATCH] Fix FixedTranslation --- src/components.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components.jl b/src/components.jl index 14d2e63c..dbda6e61 100644 --- a/src/components.jl +++ b/src/components.jl @@ -100,7 +100,7 @@ Can be though of as a massless rod. For a massive rod, see [`BodyShape`](@ref) o @component function FixedTranslation(; name, r) @named frame_a = Frame() @named frame_b = Frame() - @parameters r(t)[1:3]=r [ + @parameters r[1:3]=r [ description = "position vector from frame_a to frame_b, resolved in frame_a", ] r = collect(r) @@ -108,10 +108,10 @@ Can be though of as a massless rod. For a massive rod, see [`BodyShape`](@ref) o fb = frame_b.f |> collect taua = frame_a.tau |> collect taub = frame_b.tau |> collect - eqs = Equation[(collect(frame_b.r_0) ~ collect(frame_a.r_0) + resolve1(ori(frame_a), r)) + eqs = Equation[(collect(frame_b.r_0) .~ collect(frame_a.r_0) + resolve1(ori(frame_a), r)) (ori(frame_b) ~ ori(frame_a)) - (0 ~ fa + fb) - (0 ~ taua + taub + cross(r, fb))] + (0 .~ fa + fb) + (0 .~ taua + taub + cross(r, fb))] compose(ODESystem(eqs, t; name), frame_a, frame_b) end