getDrivePowers

public Array<double> getDrivePowers(Vector correctivePower, Vector headingPower, Vector pathingPower, double robotHeading)

This takes in vectors for corrective power, heading power, and pathing power and outputs an Array of four doubles, one for each wheel's motor power. IMPORTANT NOTE: all vector inputs are clamped between 0 and 1 inclusive in magnitude.

Return

this returns an Array of doubles with a length of 4, which contains the wheel powers.

Parameters

correctivePower

this Vector includes the centrifugal force scaling Vector as well as a translational power Vector to correct onto the Bezier curve the Follower is following.

headingPower

this Vector points in the direction of the robot's current heaing, and the magnitude tells the robot how much it should turn and in which direction.

pathingPower

this Vector points in the direction the robot needs to go to continue along the Path.

robotHeading

this is the current heading of the robot, which is used to calculate how much power to allocate to each wheel.