Skip to content
LIBRARY
PlanarMechanics.PrescribedPositionTest.md

PlanarMechanics.PrescribedPositionTest

A body whose frame_a is driven by a PrescribedPosition component with time-varying position inputs. Position should match [sin(t), 2t].

Usage

MultibodyComponents.PlanarMechanics.PrescribedPositionTest()

Behavior

Source

dyad
"""
A body whose `frame_a` is driven by a `PrescribedPosition` component with
time-varying position inputs. Position should match `[sin(t), 2t]`.
"""
test component PrescribedPositionTest
  world = World() {}
  prescribed = PrescribedPosition() {}
  body = Body(m = 1, I = 1) {}
relations
  prescribed.r_x = sin(time)
  prescribed.r_y = 2 * time
  connect(prescribed.frame_b, body.frame_a) {}
end
Flattened Source
dyad
"""
A body whose `frame_a` is driven by a `PrescribedPosition` component with
time-varying position inputs. Position should match `[sin(t), 2t]`.
"""
test component PrescribedPositionTest
  world = World() {}
  prescribed = PrescribedPosition() {}
  body = Body(m = 1, I = 1) {}
relations
  prescribed.r_x = sin(time)
  prescribed.r_y = 2 * time
  connect(prescribed.frame_b, body.frame_a) {}
metadata {}
end


Test Cases

No test cases defined.