step.wait_for ============= .. py:module:: step.wait_for Classes ------- .. autoapisummary:: step.wait_for.WaitFor Module Contents --------------- .. py:class:: WaitFor(condition: step.condition.StopCondition) Bases: :py:obj:`step.base.Step` Block until a stop condition is satisfied. Initializes the condition, then polls it at 50 Hz until it returns True. This lets you reuse any composable ``StopCondition`` — sensor triggers, timers, distance thresholds, or combinations — as a standalone wait without an accompanying motion. :param condition: A ``StopCondition`` instance (or composition) to wait for. Supports the same ``|``, ``&``, and ``+`` operators as motion ``.until()`` clauses. Example:: from raccoon.step import wait_for from raccoon.step.condition import on_black, after_seconds # Wait until the front-left IR sensor sees black wait_for(on_black(Defs.front.left)) # Wait for black OR a 5-second timeout wait_for(on_black(sensor) | after_seconds(5))