step.base¶
Attributes¶
Classes¶
Base async action executed by missions and higher-level step combinators. |
Module Contents¶
- step.base.StepAnomalyCallback¶
- class step.base.Step¶
Bases:
raccoon.class_name_logger.ClassNameLoggerBase async action executed by missions and higher-level step combinators.
- required_resources() frozenset[str]¶
Return the hardware resources this step requires exclusive access to.
For leaf steps (drive, motor, servo), return the resources this step directly uses. Composite steps override
collected_resourcesinstead to include children —required_resourcesstays empty for composites because they don’t touch hardware themselves.
- collected_resources() frozenset[str]¶
Return all resources this step and its children require.
Used by
validate_no_overlapfor static conflict detection at construction time. Leaf steps don’t need to override this — the default delegates torequired_resources. Composite steps override to union their children’s collected resources.
- resolve() Step¶
Return the concrete Step that should actually execute.
Default returns
self.StepBuilderoverrides this to call_build()so that fluent-DSL builders are converted into the underlying Step at composite-construction time. Composite steps callresolve()on their children before storing them so thatvalidate_no_overlapandcollected_resourcessee the real resource sets, not empty builder placeholders.
- async run_step(robot: raccoon.robot.api.GenericRobot) None¶
Execute the step with logging and optional timing instrumentation.
When a per-step
_anomaly_callbackis set and a timing baseline exists, a background watchdog fires the callback as soon as the elapsed time exceeds the anomaly upper bound — even while the step is still running.
- to_simulation_step() step.model.SimulationStep¶
Convert this step to a simulation-friendly summary.
The default implementation uses timing history only when it can query the tracker synchronously; otherwise it returns conservative defaults. Override in subclasses that know their motion delta or exact duration.