libstp.step.motion.motion_step¶
Base class for motion steps with a unified fixed-rate update loop.
All motion steps share the same async timing pattern: dt calculation, near-zero dt skip, sleep, and hard_stop cleanup. MotionStep owns this loop and exposes on_start / on_update / on_stop lifecycle hooks for subclasses.
Classes¶
Summary of the fixed-rate loop timing observed during one motion step. |
|
Base class for all motion steps. Handles the fixed-rate update loop. |
Module Contents¶
- class libstp.step.motion.motion_step.MotionLoopStats¶
Summary of the fixed-rate loop timing observed during one motion step.
- class libstp.step.motion.motion_step.MotionStep¶
Bases:
libstp.step.StepBase class for all motion steps. Handles the fixed-rate update loop.
- on_start(robot: libstp.robot.api.GenericRobot) None¶
Called once before the loop. Override to set up motion/velocity.
- abstract on_update(robot: libstp.robot.api.GenericRobot, dt: float) bool¶
Called each cycle with dt in seconds. Return True when motion is complete.
- on_stop(robot: libstp.robot.api.GenericRobot) None¶
Called after loop exits. Default: hard_stop.