File-By-File
GenericTurnController

GenericTurnController

This class provides a simple controller specifically designed for managing robot turns. It extends the AngleDeltaController class, inheriting its core functionality for handling angle-based control.

Key Concepts

  • Coefficient: The coefficient determines how quickly the robot will turn. A higher coefficient results in faster turns, while a lower coefficient leads to slower turns. This value typically requires tuning for optimal performance (a common starting point is around 0.01).
  • Inversion: The controller can be inverted, which reverses the direction of the turn. This is useful if the robot is turning in the opposite direction than intended.

Methods

GenericTurnController(double coefficient)

Constructs a new GenericTurnController with the specified coefficient.

newController(double coefficient)

Static factory method to create a new GenericTurnController. This is the standard way to instantiate the controller.

newInvertedController(double coefficient)

Static factory method to create a new, inverted GenericTurnController. This controller will turn the robot in the opposite direction compared to a non-inverted controller with the same coefficient.