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/components.jl
+22-4Lines changed: 22 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -481,16 +481,34 @@ The `BodyShape` component is similar to a [`Body`](@ref), but it has two frames
481
481
482
482
See also [`BodyCylinder`](@ref) and [`BodyBox`](@ref) for body components with predefined shapes and automatically computed inertial properties based on geometry and density.
body =Body(; m, r_cm, r_0, I_11, I_22, I_33, I_21, I_31, I_32, kwargs...)
489
506
frame_a =Frame()
490
507
frame_b =Frame()
491
508
frame_cm =Frame()
492
509
end
493
510
511
+
# NOTE: these parameters should be defined before the `systems` block above, but due to bugs in MTK/JSC with higher-order array parameters we cannot do that. We still define the parameters so that they are available to make animations
494
512
@variablesr_0(t)[1:3]=r_0 [
495
513
state_priority =2,
496
514
description ="Position vector from origin of world frame to origin of frame_a",
@@ -504,7 +522,7 @@ See also [`BodyCylinder`](@ref) and [`BodyBox`](@ref) for body components with p
504
522
]
505
523
506
524
shapecode =encode(shapefile)
507
-
@parametersbegin
525
+
more_pars =@parametersbegin
508
526
r[1:3]=r, [
509
527
description ="Vector from frame_a to frame_b resolved in frame_a",
510
528
]
@@ -516,7 +534,7 @@ See also [`BodyCylinder`](@ref) and [`BodyBox`](@ref) for body components with p
516
534
end
517
535
518
536
519
-
pars =[r; radius; color; shapefile; shape_transform; shape_scale]
0 commit comments