@@ -105,14 +105,13 @@ A component rigidly attached to the world frame with translation `r` between the
105105"""
106106@component function Fixed (; name, r = [0 , 0 , 0 ], render = true )
107107 systems = @named begin frame_b = Frame () end
108- @parameters begin
108+ pars = @parameters begin
109109 r[1 : 3 ] = r, [description = " Position vector from world frame to frame_b, resolved in world frame" ]
110110 render = render, [description = " Render the component in animations" ]
111111 end
112112 eqs = [frame_b. r_0 ~ r
113113 ori (frame_b) ~ nullrotation ()]
114- sys = compose (System (eqs, t; name= :nothing ), systems... )
115- add_params (sys, [render]; name)
114+ compose (System (eqs, t, [], pars; name), systems... )
116115end
117116
118117"""
@@ -129,10 +128,10 @@ See also [`Pose`](@ref) for a component that allows for forced orientation as we
129128"""
130129@component function Position (; name, r = [0 , 0 , 0 ], render = true , fixed_orientation = true , x_locked = true , y_locked = true , z_locked = true )
131130 systems = @named begin frame_b = Frame () end
132- @parameters begin
131+ pars = @parameters begin
133132 render = render, [description = " Render the component in animations" ]
134133 end
135- @variables begin
134+ vars = @variables begin
136135 p (t)[1 : 3 ], [description = " Position vector from world frame to frame_b, resolved in world frame" ]
137136 v (t)[1 : 3 ], [description = " Absolute velocity of frame_b, resolved in world frame" ]
138137 a (t)[1 : 3 ], [description = " Absolute acceleration of frame_b, resolved in world frame" ]
@@ -146,8 +145,7 @@ See also [`Pose`](@ref) for a component that allows for forced orientation as we
146145 if fixed_orientation
147146 append! (eqs, ori (frame_b) ~ nullrotation ())
148147 end
149- sys = compose (System (eqs, t; name= :nothing ), systems... )
150- add_params (sys, [render]; name)
148+ compose (System (eqs, t, vars, pars; name), systems... )
151149end
152150
153151"""
@@ -177,10 +175,10 @@ See also [`Position`](@ref) for a component that allows for only forced translat
177175"""
178176@component function Pose (; name, r = [0 , 0 , 0 ], R= nothing , q= nothing , render = true , normalize= true , x_locked = true , y_locked = true , z_locked = true )
179177 systems = @named begin frame_b = Frame () end
180- @parameters begin
178+ pars = @parameters begin
181179 render = render, [description = " Render the component in animations" ]
182180 end
183- @variables begin
181+ vars = @variables begin
184182 p (t)[1 : 3 ], [description = " Position vector from world frame to frame_b, resolved in world frame" ]
185183 v (t)[1 : 3 ], [description = " Absolute velocity of frame_b, resolved in world frame" ]
186184 a (t)[1 : 3 ], [description = " Absolute acceleration of frame_b, resolved in world frame" ]
@@ -198,8 +196,7 @@ See also [`Position`](@ref) for a component that allows for only forced translat
198196 error (" Either R or q must be provided. If you only want to specify the position, use the `Position` component instead." )
199197 end
200198 ]
201- sys = compose (System (eqs, t; name= :nothing ), systems... )
202- add_params (sys, [render]; name)
199+ compose (System (eqs, t, vars, pars; name), systems... )
203200end
204201
205202@component function Mounting1D (; name, n = [1 , 0 , 0 ], phi0 = 0 )
0 commit comments