View Single Post
  #3   Spotlight this post!  
Unread 16-02-2010, 08:58
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: Tank Drive 'sensitivity'

My team uses the joystick throttle as a scale-factor (multiplier) to the standard X and Y joystick values. When the throttle is full on (100%), the full-scale X and Y values are used, but if the throttle is halfway (50%), the X and Y get scaled by 50%. If the throttle is at 0, then X and Y are multiplied by 0 and you get no motion at all.

For this to work, you'll first need to tweak the standard throttle values from -1 to 1 into something that sends values from 0 to 1. To do this, we first add one to it, then divide by 2. Then, if you don't like the throttle orientation, you can flip it by taking the value above, and subtracting it from 1.

Take your "raw" joystick values, multiply this "new" throttle value to them, then wire that into your tankdrive.vi.

We don't use tankdrive, so I'm not exactly sure what sorts of pitfalls that come along with this ... but it's an idea ...
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics
Reply With Quote