From 4ddff0e6d65af8d8c4e0aa3816183b3751f2a9f9 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Thu, 26 Oct 2023 13:01:00 +0200 Subject: [PATCH] set default `r_cm` in `BodyShape` --- src/components.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components.jl b/src/components.jl index c0fe252d..83711e22 100644 --- a/src/components.jl +++ b/src/components.jl @@ -281,10 +281,10 @@ The `BodyShape` component is similar to a [`Body`](@ref), but it has two frames - `r`: Vector from `frame_a` to `frame_b` resolved in `frame_a` - All `kwargs` are passed to the internal `Body` component. """ -@component function BodyShape(; name, m = 1, r = [0, 0, 0], r_0 = 0, radius = 0.08, kwargs...) +@component function BodyShape(; name, m = 1, r = [0, 0, 0], r_cm = 0.5*r, r_0 = 0, radius = 0.08, kwargs...) systems = @named begin frameTranslation = FixedTranslation(r = r) - body = Body(; kwargs...) + body = Body(; r_cm, kwargs...) frame_a = Frame() frame_b = Frame() end