Quote:
Originally Posted by Gmercer
I'm having a lot of trouble coming up with an algorithm on programming an arcade drive on a single joysick. We're using one joystick for our shooter, so our other one must drive the entire robot, here is what i know:
For both(joysticks):
Y values:
Up is -1
Down is 1
X values:
Left is -1
Right is 1
i know there is something to do with triangles, but i'm not quite sure. Any help / links are really appreciated, thanks!
|
You don't need to invent your own algorithm (unless you want to).
The Java WPILib already has a ready-made Arcade Drive object.
It's in the file "RobotDrive.java"