Closed NotInControl closed 9 years ago
Alternatively we can fix this now and reduce all setpoints.
The current calc does the following: If your Target Distance is Y, the robot stops short at a distance X, where the relationship is:
X = Y/1.5;
So, if your target was 4.5ft, the Robot Would only Drive approx. 3ft and stop (but thinking it drove 4.5 ft).
If we fix this problem now by correcting the calc and assuming all current setpoints were done imperially They would just need to be reduced by a factor of 1.5.
So If the current setpoint is SP (calculated with robot imperically), after the fix the new correct setpoint should be SP/1.5. This will keep the robot driving the same distance.
So do we want to fix this now, or after WPI?
After pls
fixed in SHA: 5376c8598cf8e494f9705390ecca41230c77da08
@jcorcoran , @ExcelledProducts ...
So here is the problem as to why the drive x distance was going the wrong distance (but thinking it finished at the correct distance).
The drivePos controller gets its position feedback from the IMU class, and the IMU calculates averaged distance traversed by the drivetrain.
The current calculation is
as can be seen in this line https://github.com/Team2168/2015_Main_Robot/blob/master/src/org/team2168/PID/sensors/IMU.java#L65
however, the calc should be
damn parenthesis error. So we can fix this after WPI since all autos are based off of the current offset. The current code only divides the right encoder by 2... lol