View Single Post
  #10   Spotlight this post!  
Unread 05-18-2011, 03:22 PM
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
Tank drive is pretty straightforward. To go straight forward, drive the left and right wheels at the same (forward) speed. To turn right, add a little speed to the left wheel(s), and subtract the same amount from the right wheel(s).

Now the trick is to try to figure out how to make it scale correctly. When you add together 2 values the max # you can see is 2 but the max value you can set is 1. I will let you know though that dividing by 2 is not the answer because then full speed ahead is only a .5 .

sorry this is in reference to an arcade drive.

are you driving this via joystick or via autonomous?

also you may want to create a drive class that contains 2 functions arcade drive and tank drive.

encapsulating the drive within its own class is good practice.
__________________
"Never let your schooling interfere with your education" -Mark Twain

Last edited by mwtidd : 05-18-2011 at 03:24 PM.
Reply With Quote