Skip to content
LIBRARY
PlanarMechanics.PlanarToMultiBodyKinematicTest.md

PlanarMechanics.PlanarToMultiBodyKinematicTest

Kinematic test of PlanarToMultiBody: a prescribed planar pose is lifted into 3D and read back by a 3D absolute-angle sensor. The 3D frame position must equal [r_x, r_y, z_position] and its orientation a rotation about z by phi.

Usage

MultibodyComponents.PlanarMechanics.PlanarToMultiBodyKinematicTest()

Behavior

Source

dyad
"""
Kinematic test of `PlanarToMultiBody`: a prescribed planar pose is lifted into
3D and read back by a 3D absolute-angle sensor. The 3D frame position must equal
`[r_x, r_y, z_position]` and its orientation a rotation about z by `phi`.
"""
test component PlanarToMultiBodyKinematicTest
  world = World() {}
  prescribed = PrescribedPose() {}
  body = Body(m = 1.0, I = 1.0) {}
  adapter = PlanarToMultiBody(z_position = 0.5) {}
  sensor = MultibodyComponents.AbsoluteAngles() {}
relations
  prescribed.r_x = time
  prescribed.r_y = 0.5 * time
  prescribed.phi = 0.3 * time
  connect(prescribed.frame_b, body.frame_a, adapter.frame_a) {}
  connect(adapter.frame_b, sensor.frame_a) {}
end
Flattened Source
dyad
"""
Kinematic test of `PlanarToMultiBody`: a prescribed planar pose is lifted into
3D and read back by a 3D absolute-angle sensor. The 3D frame position must equal
`[r_x, r_y, z_position]` and its orientation a rotation about z by `phi`.
"""
test component PlanarToMultiBodyKinematicTest
  world = World() {}
  prescribed = PrescribedPose() {}
  body = Body(m = 1.0, I = 1.0) {}
  adapter = PlanarToMultiBody(z_position = 0.5) {}
  sensor = MultibodyComponents.AbsoluteAngles() {}
relations
  prescribed.r_x = time
  prescribed.r_y = 0.5 * time
  prescribed.phi = 0.3 * time
  connect(prescribed.frame_b, body.frame_a, adapter.frame_a) {}
  connect(adapter.frame_b, sensor.frame_a) {}
metadata {}
end


Test Cases

No test cases defined.