View Single Post
  #24   Spotlight this post!  
Unread 20-05-2011, 16:23
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: How to go about making tankDrive and ArcadeDrive methods

Quote:
Originally Posted by lineskier View Post
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.



Reply With Quote