---
url: /dyad/stable/stdlib/MultibodyComponents/tests/PlanarMechanics.PlanarToMultiBodyPendulumTest.md
description: >-
  Dyad PlanarMechanics.PlanarToMultiBodyPendulumTest docs.  Dynamic test of
  PlanarToMultiBody: a swinging planar pendulum drives the adapter, whose
  force-free 3D side (an absolute-angle sensor) does n...
---

# `PlanarMechanics.PlanarToMultiBodyPendulumTest` {#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 {#Usage}

`MultibodyComponents.PlanarMechanics.PlanarToMultiBodyPendulumTest()`

## Behavior {#Behavior}

## Source {#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
```

```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 {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`AbsoluteAngles`](PlanarMechanics.PlanarToMultiBodyPendulumTest.md)

  * [`Body`](PlanarMechanics.PlanarToMultiBodyPendulumTest.md)

  * [`FixedTranslation`](PlanarMechanics.PlanarToMultiBodyPendulumTest.md)

  * [`PlanarToMultiBody`](PlanarMechanics.PlanarToMultiBodyPendulumTest.md)

  * [`Revolute`](PlanarMechanics.PlanarToMultiBodyPendulumTest.md)

  * [`World`](PlanarMechanics.PlanarToMultiBodyPendulumTest.md)
