Log in

View Full Version : Analysis of the drive() method


Baldstrom
02-08-2015, 16:25
During the build season, our programming team wanted to use the drive() method with predictable results on the field. We tried adjusting parameters but never got the result we wanted, even when we dove into the source code of the RobotDrive class's drive() method we didn't, at first, understand what inputs would give us specific results. So naturally, we broke it down and analyzed it. These are our findings (attached).

Our team was using Java; we assume the method uses the same or relatively the same calculation for other programming languages.


Thanks!
Jaden Bottemiller

calcmogul
02-08-2015, 22:32
If you want, you could clone WPILib, commit your drive() documentation improvements, generate a patch with "git format-patch", and submit that patch in a new bug in the bug tracker. I can submit your patch for review for you.

AlexD744
03-08-2015, 09:07
Very interesting, thank you for sharing your findings! We typically directly set the motor outputs (using setLeftRightMotorOutputs()), but I once used the drive() method and also felt similarly confused by the lack of documentation. I will refer to this next time I need to use it.

Xanawatt
06-08-2015, 13:11
This is so helpful! Might actually use this method in future years for auto purposes. It seems like it can do a lot of very complicated things!