Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   joystick sensitivity adjustment (http://www.chiefdelphi.com/forums/showthread.php?t=82885)

Ether 17-02-2010 10:02

joystick sensitivity adjustment
 
1 Attachment(s)
Here's a simple algorithm to add sensitivity adjustment to your joystick:

x' = ax^3 + (1-a)x

x is a joystick output ranging from -1 to +1

x' is the sensitivity-adjusted output (also will be -1 to +1)

"a" is a variable ranging from 0 to +1

When a=0, you get x' = x

When a=1, you get x' = x^3 which gives very fine control of small outputs

When a is between 0 and 1, you get something in between. See the GIF file screenshot.

So by adjusting a, you can find the right sensitivity for your driver.

You can find the right value of "a" by trying different values, and then hard-code it, or

If you have a joystick with a "throttle" control (like we do), you can use the throttle control to set the value of "a" (so the driver can adjust it whenever he wants).

~

adamdb 17-02-2010 11:09

Re: joystick sensitivity adjustment
 
Awesome! I fly model airplanes also and frequently use "expo" on my models to improve the flyability. I've been wanting to figure out how to do it on our robot and this looks like just the trick.

Thanks for sharing!

Tom Line 17-02-2010 13:33

Re: joystick sensitivity adjustment
 
We worked with that for a while, but found that an exponential curve resulted in too gentle a curve around the Zero point, and hence too large a deadband.

Instead we moved to linear formulas (using 2 X/Y coordinates that we set up as controls in Labview so they could be tuned on the fly).

You can fix the deadband by changing your Y intercept too. It's fun to play with functions like that.

adamdb 19-02-2010 00:07

Re: joystick sensitivity adjustment
 
We implemented this algorithm on our holonomic drive and it works a ton! I love it! Thanks again for posting this!


All times are GMT -5. The time now is 11:30.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi