step.timing.do_until_checkpoint_dsl =================================== .. py:module:: step.timing.do_until_checkpoint_dsl .. autoapi-nested-parse:: Auto-generated step builders and DSL functions — DO NOT EDIT. Source: do_until_checkpoint.py Classes ------- .. autoapisummary:: step.timing.do_until_checkpoint_dsl.DoUntilCheckpointBuilder Functions --------- .. autoapisummary:: step.timing.do_until_checkpoint_dsl.do_until_checkpoint Module Contents --------------- .. py:class:: DoUntilCheckpointBuilder Bases: :py:obj:`raccoon.step.step_builder.StepBuilder` Builder for DoUntilCheckpoint. Auto-generated — do not edit. .. py:method:: checkpoint(value: float) .. py:method:: step(value) .. py:function:: do_until_checkpoint(checkpoint: float = _UNSET, step=_UNSET) Run a step until a mission-relative time checkpoint, then cancel it. Starts executing ``step`` immediately and cancels it when the robot's global synchronizer clock reaches ``checkpoint`` seconds since mission start. If the step finishes before the checkpoint, execution continues without waiting. This is useful for time-boxing actions within a timed Botball run (e.g. "search for objects, but stop at T=45s no matter what"). Prerequisites: The robot must have a ``synchronizer`` configured. The synchronizer clock starts when the mission begins. :param checkpoint: The mission-relative deadline (in seconds) at which ``step`` will be cancelled. :param step: The step to run. Will be cancelled if still active when the checkpoint time is reached. :returns: A DoUntilCheckpointBuilder (chainable via ``.checkpoint()``, ``.step()``, ``.on_anomaly()``, ``.skip_timing()``). Example:: from raccoon.step.timing import do_until_checkpoint from raccoon.step.logic import loop_forever # Search for objects until T=45s, then move on search = loop_forever(seq([ scan_for_object(), drive_forward(10), ])) seq([ do_until_checkpoint(45.0, search), drive_to_start(), ])