pylabrobot.paa.kx2.KX2.move_parametric#

async KX2.move_parametric(path_fn: Callable[[float], CartesianPose], duration: float) → None#

Stream a parametric Cartesian trajectory through IPM.

path_fn(t) is called at every IPM sample time t ∈ [0, duration] (seconds, evaluated at the drive’s interpolation cadence, currently 8 ms) and must return the absolute CartesianPose the gripper should occupy at that instant. Use the start pose if you need offsets:

start = await arm.request_gripper_pose()
def fig8(t):
  s = t / duration
  theta = 2 * math.pi * s
  return CartesianPose(
    location=Coordinate(start.location.x + 50 * math.sin(theta),
                        start.location.y + 12.5 * math.sin(2*theta),
                        start.location.z + 30 * math.sin(math.pi * s)),
    rotation=start.rotation,
  )
await arm.move_parametric(fig8, duration=8.0)

No speed/accel cap — the parametrization sets the velocity profile; callers are responsible for keeping derivatives within drive limits. Joint travel limits are enforced via IK; out-of-range raises IKError before any motion. Path continuity is the caller’s responsibility — discontinuities surface as drive faults.

Parameters:
Return type:

None