Skip to content
LIBRARY
PlanarMechanics.PrescribedVelocityTest.md

PlanarMechanics.PrescribedVelocityTest

A body whose frame_a is driven by a PrescribedVelocity component with constant velocity inputs. The body should move with constant velocity, starting from r_start.

Usage

MultibodyComponents.PlanarMechanics.PrescribedVelocityTest()

Behavior

Source

dyad
"""
A body whose `frame_a` is driven by a `PrescribedVelocity` component with
constant velocity inputs. The body should move with constant velocity,
starting from `r_start`.
"""
test component PrescribedVelocityTest
  world = World() {}
  prescribed = PrescribedVelocity(r_start = [0, 0]) {}
  body = Body(m = 1, I = 1) {}
relations
  prescribed.v_x = 1.0
  prescribed.v_y = 2.0
  connect(prescribed.frame_b, body.frame_a) {}
end
Flattened Source
dyad
"""
A body whose `frame_a` is driven by a `PrescribedVelocity` component with
constant velocity inputs. The body should move with constant velocity,
starting from `r_start`.
"""
test component PrescribedVelocityTest
  world = World() {}
  prescribed = PrescribedVelocity(r_start = [0, 0]) {}
  body = Body(m = 1, I = 1) {}
relations
  prescribed.v_x = 1.0
  prescribed.v_y = 2.0
  connect(prescribed.frame_b, body.frame_a) {}
metadata {}
end


Test Cases

No test cases defined.