---
url: /dyad/stable/stdlib/MultibodyComponents/examples/tests.SphericalPendulumQuatJoint.md
description: >-
  Dyad tests.SphericalPendulumQuatJoint docs.  Same geometry as
  SphericalPendulum but the orientation state lives in the joint as a
  quaternion. Mirrors the "Spherical joint with quaternio...
---

# `tests.SphericalPendulumQuatJoint` {#tests.SphericalPendulumQuatJoint}

# Spherical Pendulum (quaternion state in joint) {#Spherical-Pendulum-quaternion-state-in-joint}

Same geometry as `SphericalPendulum` but the orientation state lives in the joint as a quaternion. Mirrors the "Spherical joint with quaternion state" test in `Multibody/test/basic_tests.jl`.

## Usage {#Usage}

`MultibodyComponents.tests.SphericalPendulumQuatJoint()`

## Behavior {#Behavior}

## Source {#Source}

```dyad
"""
# Spherical Pendulum (quaternion state in joint)

Same geometry as `SphericalPendulum` but the orientation state lives in the
joint as a quaternion. Mirrors the
"Spherical joint with quaternion state" test in
`Multibody/test/basic_tests.jl`.
"""
example component SphericalPendulumQuatJoint
  world = MultibodyComponents.World() {}
  joint = MultibodyComponents.Spherical(orientation_state = OrientationState.Quaternion()) {}
  rod = MultibodyComponents.FixedTranslation(r = [1.0, 0, 0]) {}
  body = MultibodyComponents.Body(m = 1) {}
relations
  connect(world.frame_b, joint.frame_a) {}
  connect(joint.frame_b, rod.frame_a) {}
  connect(rod.frame_b, body.frame_a) {}
end
```

```dyad
"""
# Spherical Pendulum (quaternion state in joint)

Same geometry as `SphericalPendulum` but the orientation state lives in the
joint as a quaternion. Mirrors the
"Spherical joint with quaternion state" test in
`Multibody/test/basic_tests.jl`.
"""
example component SphericalPendulumQuatJoint
  world = MultibodyComponents.World() {}
  joint = MultibodyComponents.Spherical(orientation_state = OrientationState.Quaternion()) {}
  rod = MultibodyComponents.FixedTranslation(r = [1.0, 0, 0]) {}
  body = MultibodyComponents.Body(m = 1) {}
relations
  connect(world.frame_b, joint.frame_a) {}
  connect(joint.frame_b, rod.frame_a) {}
  connect(rod.frame_b, body.frame_a) {}
metadata {}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
