Skip to content
LIBRARY
PlanarMechanics.PlanarToMultiBodyPendulumTest.md

PlanarMechanics.PlanarToMultiBodyPendulumTest

Dynamic test of PlanarToMultiBody: a swinging planar pendulum drives the adapter, whose force-free 3D side (an absolute-angle sensor) does not disturb the planar dynamics. Verifies that the 3D frame tracks the lifted pendulum pose along a genuine (non-prescribed) trajectory.

Usage

MultibodyComponents.PlanarMechanics.PlanarToMultiBodyPendulumTest()

Behavior

Source

dyad
"""
Dynamic test of `PlanarToMultiBody`: a swinging planar pendulum drives the
adapter, whose force-free 3D side (an absolute-angle sensor) does not disturb the
planar dynamics. Verifies that the 3D frame tracks the lifted pendulum pose along
a genuine (non-prescribed) trajectory.
"""
test component PlanarToMultiBodyPendulumTest
  world = World() {}
  revolute = Revolute(phi(initial = 0.0), w(initial = 0.0)) {}
  rod = FixedTranslation(r = [1.0, 0.0]) {}
  body = Body(m = 1.0, I = 0.1) {}
  adapter = PlanarToMultiBody(z_position = 0.25) {}
  sensor = MultibodyComponents.AbsoluteAngles() {}
relations
  connect(world.frame_b, revolute.frame_a) {}
  connect(revolute.frame_b, rod.frame_a) {}
  connect(rod.frame_b, body.frame_a, adapter.frame_a) {}
  connect(adapter.frame_b, sensor.frame_a) {}
end
Flattened Source
dyad
"""
Dynamic test of `PlanarToMultiBody`: a swinging planar pendulum drives the
adapter, whose force-free 3D side (an absolute-angle sensor) does not disturb the
planar dynamics. Verifies that the 3D frame tracks the lifted pendulum pose along
a genuine (non-prescribed) trajectory.
"""
test component PlanarToMultiBodyPendulumTest
  world = World() {}
  revolute = Revolute(phi(initial = 0.0), w(initial = 0.0)) {}
  rod = FixedTranslation(r = [1.0, 0.0]) {}
  body = Body(m = 1.0, I = 0.1) {}
  adapter = PlanarToMultiBody(z_position = 0.25) {}
  sensor = MultibodyComponents.AbsoluteAngles() {}
relations
  connect(world.frame_b, revolute.frame_a) {}
  connect(revolute.frame_b, rod.frame_a) {}
  connect(rod.frame_b, body.frame_a, adapter.frame_a) {}
  connect(adapter.frame_b, sensor.frame_a) {}
metadata {}
end


Test Cases

No test cases defined.