step.motion.line_follow_builder¶
Classes¶
Enum where members are also (and must be) strings |
|
Base class for generated step builders. |
Functions¶
|
Module Contents¶
- class step.motion.line_follow_builder.FollowCorrection¶
Bases:
enum.StrEnumEnum where members are also (and must be) strings
- ANGULAR = 'angular'¶
- LATERAL = 'lateral'¶
- FORWARD = 'forward'¶
- class step.motion.line_follow_builder.ConfigurableLineFollowBuilder¶
Bases:
raccoon.step.step_builder.StepBuilderBase class for generated step builders.
Subclasses must implement
_build()to construct the real Step from the collected parameters.Since StepBuilder extends Step, it satisfies StepProtocol and can be used anywhere a Step is expected (seq, parallel, mission step lists).
- dual(left_sensor: raccoon.sensor_ir.IRSensor, right_sensor: raccoon.sensor_ir.IRSensor) ConfigurableLineFollowBuilder¶
- single(sensor: raccoon.sensor_ir.IRSensor, side: step.motion.line_follow.LineSide = LineSide.LEFT) ConfigurableLineFollowBuilder¶
- move(forward: float = 0.0, strafe: float = 0.0) ConfigurableLineFollowBuilder¶
- forward_speed(value: float) ConfigurableLineFollowBuilder¶
- strafe_speed(value: float) ConfigurableLineFollowBuilder¶
- correct_angular() ConfigurableLineFollowBuilder¶
- correct_lateral(hold_heading: bool = True) ConfigurableLineFollowBuilder¶
- correct_forward(hold_heading: bool = True) ConfigurableLineFollowBuilder¶
- correction_sign(value: float) ConfigurableLineFollowBuilder¶
- hold_heading(degrees: float | None) ConfigurableLineFollowBuilder¶
Hold an absolute heading while correcting laterally/forward.
degreesis measured from themark_heading_reference()origin (CCW-positive, same convention asturn_to_heading_leftanddrive_forward(heading=…)). PassNone(the default) to hold whatever heading the robot has when the step starts. Only takes effect together withcorrect_lateral()/correct_forward()(the heading-hold correction modes); it is a no-op under angular correction. Requiresmark_heading_reference()earlier in the mission.
- distance_cm(value: float | None) ConfigurableLineFollowBuilder¶
- pid(kp: float, ki: float = 0.0, kd: float = 0.1, integral_max: float = 1.0, integral_min: float | None = None) ConfigurableLineFollowBuilder¶
Set the correction PID gains and its integral anti-windup band.
integral_max/integral_minclamp the PID’s accumulated integral (in the normalised correction space the PID emits, roughly [-1, 1]). Leaveintegral_minasNoneto mirror-integral_max(the classic symmetric clamp); set both explicitly for an asymmetric band (e.g.integral_min=0.0for a one-sided integrator). Only matters whenkiis non-zero.
- until(value: raccoon.step.condition.StopCondition | None) ConfigurableLineFollowBuilder¶
- step.motion.line_follow_builder.line_follow() ConfigurableLineFollowBuilder¶