Quote:
Originally Posted by lineskier
How do you access atan2? Its not included in the stripped down Math util.
|
See
Joe's post.
Quote:
|
A perfect arcade drive would map every point within a circle to a set of motor outputs.
|
The joystick makes a square, not a circle. The algorithms mentioned
here map every point in the square to a set of left/right motor outputs.
Quote:
|
Using trig you can program for every case using one formula.
|
You don't need trig to do this.
Quote:
|
Same is true for the mecanum drive. By knowing the resulting vector and magnitude you want, you can program a whole mec drive with a couple calculations.
|
FR = -Y -X -Z
FL = -Y +X +Z
RR = -Y +X -Z
RL = -Y -X +Z
How does trig make the above any easier ?
Quote:
|
The code would be a lot cleaner and more efficient, as every point on the circle formed by the joystick would map to a distinct ideal set of motor outputs. (as opposed to using a scaling algorithm.)
|
How does using trigonometry make the above mec code any "cleaner", or "more efficient"? The above code is
kinematically correct, even after normalization.