View Single Post
  #17   Spotlight this post!  
Unread 04-04-2008, 13:07
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Unique ways of controlling your robot (driving)

Quote:
Originally Posted by JesseK View Post
With a single joystick, in code I can create a system that has some variables (aka coefficients). Based upon the variables I can determine different integral-based rotational neutral zones, scale within certain regions of joystick movement, how the robot reacts based upon its direction, and can eliminate jerky joystick movements that translate to jerky bot movements for both rotation and lateral at the same time. For tank drive, doing all of these things requires at least twice the code so you can determine a rotation vector, where as single-joystick drive rotation is a direct input.
To convert dual-joystick tank-style control to single-joystick arcade-style control is two lines of code.

Code:
 speed = left + right;
 turn = left - right;
I have left off scaling and offset, because some people like to keep the 0-254 range and others like +/- 127 instead (the TechnoKats Overdrive code this year actually uses +/- 100 for all internal computations).