![]() |
Desensitizing Joysticks
My fellow programmers and I have tried many different ways to desensitize our joysticks, but none of ways work very well. Does anyone know a good way to desensitize them?
|
Re: Desensitizing Joysticks
Quote:
Why dont you just get new joysticks. very good ones can be found for cheep |
Re: Desensitizing Joysticks
Quote:
You could make a slightly non-linear lookup table to de-sensitize the joystick in whatever region of deflection you want. This is actually what I use this lookup table generator for - to rapidly prototype and test new transfer functions for the joystick. If you want some help, let me know... |
Re: Desensitizing Joysticks
how much do you want to back them down?
lots of teams just divide the joystick variable by 2, then add 64 to make 127= center again or divide it by 4 and add 96 to make 127 = center you can have this as optional code, with a button or operator switch that lets you switch between normal and "fine tuning" mode of driving. |
Re: Desensitizing Joysticks
We played around with joysticks for a while trying to desensitize and the only way that we found effective is to just state something like the following
if (p1_y <= 135 && p1_y >= 127) { p1_y = 127; } if (p1_y >= 119 && p1_y <127) { p1_y = 127; } We tried this but just decided to buy new ones or use last years. |
Re: Desensitizing Joysticks
Here's how I'd do it... first psuedocode for understanding:
Code:
x1 = p1_x; // get an axis, store it in temp variableCode:
p1_x-=127;-Sean |
Re: Desensitizing Joysticks
Hmmm... I'm not a programmer, but I think a large hammer would do it! :D
|
Re: Desensitizing Joysticks
Quote:
if ((p1_y <= 135 && p1_y >= 127) || (p1_y >= 119 && p1_y <= 127)) p1_y = 127; |
Re: Desensitizing Joysticks
and heck, if readability is your issue, just include the 127 case as well:
Code:
if(p1_y >= 119 && p1_y <= 135) p1_y = 127; |
Re: Desensitizing Joysticks
Quote:
|
Re: Desensitizing Joysticks
I dont understand how putting a deadband around 127 will make the joystick less sensitive
in fact, your bot is going to lurch when the joystick is moved just outside the deadband dividing the joystick variable by two, and then correcting the zero point by adding 64 - makes the full forward or full right... positions of the joystick equal to half forward, or half right... making the entire motion of the joystick less sensitive and making it easier to make fine control adjustments to the motion of the machine while driving - ie when you want to manuver to capture a ball, or position the robot precisely on the field. |
Re: Desensitizing Joysticks
Quote:
|
Re: Desensitizing Joysticks
I think this is related to the threads on PID and motor feedback. Id look there for the best solution.
I would try a simple average function- keep a bufer of the last 10 or so values, add each new one into the buffer, take the average, and send that value to the motor. Remove the oldest value from the buffer. This should at least smooth out effects of noise and minor hand jiggles. |
Re: Desensitizing Joysticks
that, or ramp the output - put in a "max change per cycle" function. also, you might try an exponential function for the joystick, so that it really only opens up at full movement.
|
Re: Desensitizing Joysticks
1 Attachment(s)
Quote:
Ken's solution sounds good, and is obviously more efficient than what I'm about to suggest here. I haven't tried my idea on the bot yet, and I'm a little sketchy about putting a lookup table of any size into the user routine because I don't want to slow it down too much. But here's the principle: make a slightly non-linear lookup table to de-emphasize the stick input near neutral, but not near the max/min. I've attached an example of the kind of curve I'm thinking of. Notice that near 127, it "dumbs down" the stick input to drive the motors slower and make the sticks less sensitive, but near the high or low end of the input it looks almost linear to make the driveability at high speeds feel pretty normal. Try it out and let me know what you think! Like I said, I haven't tried this on the bot yet... EDIT: I just changed the .xls to a zipped up .xls. |
| All times are GMT -5. The time now is 20:03. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi