View Single Post
  #22   Spotlight this post!  
Unread 20-05-2011, 15:38
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: How to go about making tankDrive and ArcadeDrive methods

Quote:
Originally Posted by Ether View Post
Not sure what you mean by the above. Java, C++, and LabVIEW all support the atan2 function.




There's nothing wrong with exploring that, it's a great way to learn. But what is the basis for the following statements:

the best case would be to use trig even for an arcade drive to ensure max values

programming a mec via trig is a lot easier than doing it without it




How do you access atan2? Its not included in the stripped down Math util.

A perfect arcade drive would map every point within a circle to a set of motor outputs. Using trig you can program for every case using one formula.

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.

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.)
__________________
"Never let your schooling interfere with your education" -Mark Twain
Reply With Quote