PTPController
Stands for Point-To-Point Controller. Is used to move the robot around the playing field autonomously using waypoints. Internally, this class uses a PD controller to control distance to the goal, and a PID controller to control rotation.
There is a built in anti-stall system that detects if the robot is stalling and if it is, stops moving and signals to proceed to the next point. If the robot doesn't stall, it will keep traveling until it gets within a user defined distance to the target. The robot is considered stalled if the PD / PID power is low AND the bot is not moving both positionally and rotationally.
Parameters
The mecanum that the PTP Controller will control
The localizer that the PTP controller will use to determine its position. This uses the Localizer interface meaning that a custom localizer can be used here.
Types
Properties
Parameters for anti-stall. For anti stall to trigger ALL conditions must be met.
True if the robots translational power is less than movePowerAntistallThreshold
True if the robots translational speed is less than moveSpeedAntistallThreshold
PID Controller for bot rotation.
True if the robots rotational power is less than rotatePowerAntistallThreshold
True if the robots rotational speed is less than rotateSpeedAntistallThreshold
PD controller for distance. Even though this takes a PID controller, the I component must not be set.