step.motion.at_heading_dsl ========================== .. py:module:: step.motion.at_heading_dsl .. autoapi-nested-parse:: Auto-generated step builders and DSL functions — DO NOT EDIT. Source: at_heading.py Classes ------- .. autoapisummary:: step.motion.at_heading_dsl.WaitUntilDegreesBuilder Functions --------- .. autoapisummary:: step.motion.at_heading_dsl.wait_until_degrees Module Contents --------------- .. py:class:: WaitUntilDegreesBuilder Bases: :py:obj:`raccoon.step.step_builder.StepBuilder` Builder for WaitUntilDegrees. Auto-generated — do not edit. .. py:method:: degrees(value: float) .. py:method:: origin(value: step.motion.at_heading.HeadingOrigin) .. py:function:: wait_until_degrees(degrees: float = _UNSET, origin: step.motion.at_heading.HeadingOrigin = HeadingOrigin.STEP_START) Wait until the robot has turned at least the given number of degrees. Polls heading at 100 Hz and compares the angular distance from the chosen origin against the threshold. Designed to run inside a ``parallel()`` branch alongside a turn step, enabling actions to trigger at specific angles during a turn. The origin (zero point) is controlled by the ``origin`` parameter — see :class:`HeadingOrigin` for the three available modes. :param degrees: Heading-change threshold in degrees (always positive). :param origin: Which reference point to count degrees from. Defaults to ``HeadingOrigin.STEP_START``. :returns: A WaitUntilDegreesBuilder (chainable via ``.degrees()``, ``.origin()``, ``.on_anomaly()``, ``.skip_timing()``). Example:: from raccoon.step import parallel, seq from raccoon.step.motion import turn_left, wait_until_degrees, HeadingOrigin from raccoon.step.servo import servo # Default: fires 45° after this step starts executing parallel([ turn_left(90), seq([wait_until_degrees(45), servo(claw, 90)]), ]) # TURN_START: fires at 45° from the turn's own start parallel([ turn_left(90), seq([prepare_arm(), wait_until_degrees(45, origin=HeadingOrigin.TURN_START), servo(claw, 90)]), ]) # HEADING_REFERENCE: fires at 45° from the global reference parallel([ turn_left(90), seq([wait_until_degrees(45, origin=HeadingOrigin.HEADING_REFERENCE), servo(claw, 90)]), ])