libstp.step.wait_for_seconds ============================ .. py:module:: libstp.step.wait_for_seconds Classes ------- .. autoapisummary:: libstp.step.wait_for_seconds.WaitForSeconds Functions --------- .. autoapisummary:: libstp.step.wait_for_seconds.wait Module Contents --------------- .. py:class:: WaitForSeconds(seconds: Union[float, int]) Bases: :py:obj:`libstp.step.Step` A step that waits for a specified duration before completing. .. py:attribute:: seconds .. py:method:: to_simulation_step() -> libstp.step.SimulationStep .. py:function:: wait(seconds: float) -> WaitForSeconds Pause execution for a fixed number of seconds. Suspends the current step sequence for the specified duration using an async sleep. No hardware commands are issued during the wait, and other concurrent tasks (e.g. odometry updates) continue running normally. The wait duration is deterministic and is reflected accurately in simulation estimates. :param seconds: Duration to pause in seconds. Must be non-negative. Passing 0 yields control to the event loop for one tick without any meaningful delay. :returns: A ``WaitForSeconds`` step ready to be scheduled in a step sequence. Example:: from libstp.step import wait # Pause between two motor commands sequence( motor_power(robot.motor(0), 100), wait(2.5), motor_brake(robot.motor(0)), ) # Brief yield to let sensors settle wait(0.1)