@@ -122,7 +122,6 @@ The `BodyShape` component is similar to a [`Body`](@ref), but it has two frames
122122 gy = - 9.80665 , m = 1 , I = 0.1 , radius = 0.1 ,
123123 render = true , color = purple, v= nothing , phi= nothing , w= nothing )
124124 pars = @parameters begin
125- r0[1 : 2 ] = r0, [description = " Vector from frame_a to frame_b resolved in frame_a" ]
126125 r[1 : 2 ] = r, [description = " Vector from frame_a to frame_b resolved in frame_a" ]
127126 r_cm[1 : 2 ] = r_cm, [description = " Vector from frame_a to center of mass, resolved in frame_a" ]
128127 gy = gy, [description = " Gravity field acting on the mass in the y-direction" ]
@@ -136,15 +135,17 @@ The `BodyShape` component is similar to a [`Body`](@ref), but it has two frames
136135 systems = @named begin
137136 translation = FixedTranslation (; r, render= false )
138137 translation_cm = FixedTranslation (; r= r_cm, render= false )
139- body = Body (; r = r0, I, m, gy, state_priority, v, phi, w)
138+ body = Body (; I, m, gy, state_priority, v, phi, w)
140139 frame_a = Frame ()
141140 frame_b = Frame ()
142141 end
143142
144143 vars = @variables begin
144+ (body_r (t)[1 : 2 ] = r0)
145145 end
146146
147147 equations = Equation[
148+ body. r ~ body_r
148149 connect (frame_a, translation. frame_a, translation_cm. frame_a)
149150 connect (frame_b, translation. frame_b)
150151 connect (translation_cm. frame_b, body. frame_a)
0 commit comments