Skip to content
LIBRARY
tests.SphericalPendulumConstraint.md

tests.SphericalPendulumConstraint

Spherical Pendulum (joint as pure constraint, body holds quaternion state)

The Spherical joint is stateless (orientation_state = None); the Body carries the orientation state as a quaternion. Mirrors the "Spherical joint without state / Body with quaternion state" test in Multibody/test/basic_tests.jl.

Usage

MultibodyComponents.tests.SphericalPendulumConstraint()

Behavior

Source

dyad
"""
# Spherical Pendulum (joint as pure constraint, body holds quaternion state)

The Spherical joint is stateless (`orientation_state = None`); the Body carries
the orientation state as a quaternion. Mirrors the
"Spherical joint without state / Body with quaternion state" test in
`Multibody/test/basic_tests.jl`.
"""
example component SphericalPendulumConstraint
  world = MultibodyComponents.World() {}
  joint = MultibodyComponents.Spherical(orientation_state = OrientationState.None()) {}
  rod = MultibodyComponents.FixedTranslation(r = [1.0, 0, 0]) {}
  body = MultibodyComponents.Body(m = 1, orientation_state = OrientationState.Quaternion(), r_0(initial = missing), v_0(initial = missing)) {}
relations
  connect(world.frame_b, joint.frame_a) {}
  connect(joint.frame_b, rod.frame_a) {}
  connect(rod.frame_b, body.frame_a) {}
end
Flattened Source
dyad
"""
# Spherical Pendulum (joint as pure constraint, body holds quaternion state)

The Spherical joint is stateless (`orientation_state = None`); the Body carries
the orientation state as a quaternion. Mirrors the
"Spherical joint without state / Body with quaternion state" test in
`Multibody/test/basic_tests.jl`.
"""
example component SphericalPendulumConstraint
  world = MultibodyComponents.World() {}
  joint = MultibodyComponents.Spherical(orientation_state = OrientationState.None()) {}
  rod = MultibodyComponents.FixedTranslation(r = [1.0, 0, 0]) {}
  body = MultibodyComponents.Body(m = 1, orientation_state = OrientationState.Quaternion(), r_0(initial = missing), v_0(initial = missing)) {}
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

No test cases defined.

  • Examples

  • Experiments

  • Analyses