Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Desensitizing Joysticks (http://www.chiefdelphi.com/forums/showthread.php?t=24613)

Astronouth7303 10-02-2004 21:38

Re: Desensitizing Joysticks
 
Wouldn't a hyperbola work? not the regular kind; try Y=sqrt(R^2+X^2)-R. basically, close to zero, it's a curve, but farther away, it's close to linear. Excel that and try it. But it won't reach maximum value ever. A coefficient would be necesary. R is the value at zero.

Rhs953 10-02-2004 21:39

Re: Desensitizing Joysticks
 
Take out the set screw in the joystick. It should spin like the wheel on the robobt.



I didn't break it!

deltacoder1020 10-02-2004 23:01

Re: Desensitizing Joysticks
 
Quote:

Originally Posted by Astronouth7303
Wouldn't a hyperbola work? not the regular kind; try Y=sqrt(R^2+X^2)-R. basically, close to zero, it's a curve, but farther away, it's close to linear. Excel that and try it. But it won't reach maximum value ever. A coefficient would be necesary. R is the value at zero.

plenty of mathematical forms work, just pick one.

marccenter 16-11-2004 16:26

Re: Desensitizing Joysticks
 
Quote:

Originally Posted by Scooter
What we use is a exponenetial function. This simply shifts the power curve out some while still retaining full power at the edges. Instead of it being completely linear, it follows a curve (that looks suspiciously like a cubic function). At 50% joystick travel, you may only have 33% motor output, but at 100% joystick travel, you have 100% motor output.

Another technique that I learned from flying R/C Heli's is to grip the joystick at the bottom with just a few fingers....This helps to make movements less extreme....they only downside is that it is a little tuffer to get to the buttons...The advantage is that the movement comes from the fingers instead of the arm and wrists, and it affords you alot more accuracy.

Bill

I am new to Chief Delphi forum but recommend that you add one more
bit of functionality - a rate limiting function. The exponential curve via
table lookup solves one problem but not the problem of quick changes
in torque. If you use both methods simultaneously, it can help to
solve range/resolution issues associated with Joystick input to pwm0x output,
and torque/speed transitions from positive/negative to negative/positive.

Gusman1188 16-11-2004 18:57

Re: Desensitizing Joysticks
 
Quote:

Originally Posted by KenWittlief
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.


Looking back on this post, the reason we did this was because our joysticks didn't stay exactly centered and you would have to re-adjust the trim 85 billion times in a match if we used those joysticks.

M. Hicken 16-11-2004 19:12

Re: Desensitizing Joysticks
 
im not a fluent programmer. im learning java in class. but our programmer wrote in a zeroing button on the control board after the joysicks being a pain and never going back to zero. big mistake, the joysticks hold a value, i forget what it is, and after a while the values become off due to the mechanics of the stick. The zero button made the robot very hard to drive,if you zero it while its not PERFECT, the handling falls apart.


just sharing an experience

Astronouth7303 16-11-2004 19:28

Re: Desensitizing Joysticks
 
Quote:

Originally Posted by marccenter
I am new to Chief Delphi forum but recommend that you add one more
bit of functionality - a rate limiting function. The exponential curve via
table lookup solves one problem but not the problem of quick changes
in torque. If you use both methods simultaneously, it can help to
solve range/resolution issues associated with Joystick input to pwm0x output,
and torque/speed transitions from positive/negative to negative/positive.

In programmer terms? Do you mean a loop to change the speed only so fast?

scitobor 617 16-11-2004 21:15

Re: Desensitizing Joysticks
 
Quote:

Originally Posted by Gusman1188
Looking back on this post, the reason we did this was because our joysticks didn't stay exactly centered and you would have to re-adjust the trim 85 billion times in a match if we used those joysticks.

My team had a similr problem. To correct it I wrote some code that would center the joysticks when a button was pressed. It would consider the current position of the joystick the center. It worked by finding the difference between true center and that position and always adding it to the output for the motors. It worked well on our robot and should not be to hard to edit for your robot.

P.S. If you would like the code PM me. The program was a little rushed so it was a tad buggy, nothing too major, but I'm sure with a little work they can be worked out.

Mr. Lim 17-11-2004 14:31

Re: Desensitizing Joysticks
 
Quote:

Originally Posted by bob1million
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?

It seems the problem is big enough to cause some serious thread resurrection.

Here was Team 188's solution to sensitive joysticks for 2004 courtesy Carol, Honson, Tristan and myself:


Code:

temp_p1_long = (signed long)p1_y - 128;
pwm01 = (unsigned char)(((temp_p1_long * temp_p1_long * temp_p1_long)  >> 14) + 128);

temp_p2_long = (signed long)p2_y - 128;
pwm02 = (unsigned char)(((temp_p2_long * temp_p2_long * temp_p2_long)  >> 14) + 128);

make sure you declare temp_p1_long and temp_p2_long as signed long beforehand.

In a nutshell, it's a cubic transfer function that makes the robot accelerate exponentially when you push the joystick. There's a nice wide area to operate slowly, yet full speed is still there when you push it all the way.

We spent a few days testing different transfer functions, and this one worked out the best.

It's pretty CPU intensive (multiplying long integers), and a look-up table would be faster, but try it for a quick and dirty way to get things working smoothly. You can generate a look-up based on the code later on.

Cheers!

-SlimBoJones...

tribotec_ca88 24-11-2004 18:21

Re: Desensitizing Joysticks
 
Absolutely...our team also realized the joysticks provided by FIRST proportionalize poor handling...Don't know if you'd had a look at the white papers on this website yet but team 1382's written one about the advantages of converting the linear curve of the joystick into an exponential one (and includes source code). I guarantee it'll give you some ideas...
Link:
http://www.chiefdelphi.com/forums/pa...le&paperid=280


All times are GMT -5. The time now is 05:21.

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