step.motion.turn

Classes

TurnLeft

Turn left (counter-clockwise) with angle or condition-based termination.

TurnRight

Turn right (clockwise) with angle or condition-based termination.

Module Contents

class step.motion.turn.TurnLeft(degrees: float = None, speed: float = 1.0, until: step.condition.StopCondition = None)

Bases: _ConditionalTurn

Turn left (counter-clockwise) with angle or condition-based termination.

Uses a PID controller on the IMU heading to rotate the robot in place. The controller saturates output at the configured max angular rate, producing an implicit trapezoidal velocity profile.

Example:

turn_left(90)
turn_left(speed=0.5).until(on_black(s))
class step.motion.turn.TurnRight(degrees: float = None, speed: float = 1.0, until: step.condition.StopCondition = None)

Bases: _ConditionalTurn

Turn right (clockwise) with angle or condition-based termination.

Uses a PID controller on the IMU heading to rotate the robot in place. The controller saturates output at the configured max angular rate, producing an implicit trapezoidal velocity profile.

Example:

turn_right(90)
turn_right(speed=0.5).until(on_black(s))