Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Joystick Sensitivity (http://www.chiefdelphi.com/forums/showthread.php?t=74471)

furiousgeorge 14-02-2009 16:14

Joystick Sensitivity
 
is there a way to make the acceleration of the motors that are controlled by the joysticks more of a logarithmic acceleration so that our driver does not have to comensate as much for the sensitivity of the joystick controls?

airnate 14-02-2009 16:20

Re: Joystick Sensitivity
 
Well, you can certainly manipulate the joystick value and make your own transform function. The logarithms are in the following palette:

Mathematics -> Elementary -> Exponential Functions

If you prefer to use text to define the mathematical formula, you can use the Formula Node located in :

Mathematics -> Scripts & Formulas -> Formula Node

Drop a Formula Node on your block diagram and right click it and select Help to see how it works.

I also thought I remembered seeing a place that WPI provided in the Robotics library to add your own lookup table to the motor scaling, but I've forgotten where I saw this.

[I spoke to our Senior Control Mentor and he told me the motor scaling is done in the example code "Custom Motor Scaling"].

1. To see the Custom Motor Scaling Example, select View->Getting Started Window... from the menubar, or it will appear when you first open LabVIEW.
2. Select Examples -> More... (lower right corner of window)
3. Select Custom Motor Scaling Example.

JP Carlin 19-02-2010 19:26

Re: Joystick Sensitivity
 
honestly all i did when i needed to make a joystick less sensitive i just divided the value of the joystick by a constant of 2 before it reached the set speed of the motor. this made it only half as fast as it was originally but it also reduced its power.

Ether 19-02-2010 21:46

Re: Joystick Sensitivity
 
Quote:

Originally Posted by JP Carlin (Post 924165)
honestly all i did when i needed to make a joystick less sensitive i just divided the value of the joystick by a constant of 2 before it reached the set speed of the motor. this made it only half as fast as it was originally but it also reduced its power.


try this instead:

http://www.chiefdelphi.com/forums/sh...d.php?p=921992

JP Carlin 19-02-2010 23:13

Re: Joystick Sensitivity
 
i looked at that post when i was trying to work out the sensitivity on my controller although i had a little trouble grasping that concept. last year our one programmer graduated. he got pretty angry at the way the club was run and never taught anyone else how to program, so this being my first year i figured i would go with more simplistic ways to program.

Team3993Tom 21-01-2014 22:12

Re: Joystick Sensitivity
 
can some one please post a pic of there code, im new to labview.

Dexterium 21-01-2014 22:20

Re: Joystick Sensitivity
 
1 Attachment(s)
If you square the joystick value you will get a slower increase in power while still reaching 100% power and that should be just what you need.

Joystick input vs output graph below

Team3993Tom 21-01-2014 22:26

Re: Joystick Sensitivity
 
thank you for the fast reply, but I have no idea how to do that or implant it into the code.

gpetilli 22-01-2014 12:37

Re: Joystick Sensitivity
 
Quote:

Originally Posted by Dexterium (Post 1330557)
If you square the joystick value you will get a slower increase in power while still reaching 100% power and that should be just what you need.

Joystick input vs output graph below

We always square the joystick before using to improve fine motor coordination.

minor (but important) clarification - to preserve the sign:
joy2 = joy * abs(joy);

Ether 22-01-2014 13:06

Re: Joystick Sensitivity
 
Quote:

Originally Posted by gpetilli (Post 1330796)
We always square the joystick before using to improve fine motor coordination.

minor (but important) clarification - to preserve the sign:
joy2 = joy * abs(joy);

If you want to be able to fine-tune the sensitivity adjustment, try this instead:

Joyadj = a*(Joy3) + (1-a)*Joy,

where "a" is a constant in the range 0<=a<=1.

By changing "a" in that range, you get a family of curves lying between the curve Joyadj=Joy and Joyadj=Joy3.

When a=0 you get Joyadj=Joy, and when a=1 you get Joyadj=Joy3. When 0<a<1, you get a "blend" in-between Joyadj=Joy and Joyadj=Joy3. The range of Joyadj is still -1 to +1 for all curves in the family.

More detailed explanation here.



Dexterium 22-01-2014 20:47

Re: Joystick Sensitivity
 
1 Attachment(s)
Here's some code. You can implement the more complex form ether posted, but this is the most basic form and all that most teams need. Sorry for not including it the first time.:D

Ether 22-01-2014 21:09

Re: Joystick Sensitivity
 
Quote:

Originally Posted by Dexterium (Post 1331047)
Here's some code. You can implement the more complex form ether posted, but this is the most basic form and all that most teams need.

I don't know about LabVIEW, but the WPILib RobotDrive already has code in it to square the inputs if you want.

So if all you want to do is square the inputs, you don't need to do that in your code.



Team3993Tom 26-01-2014 19:50

Re: Joystick Sensitivity
 
Quote:

Originally Posted by Dexterium (Post 1331047)
Here's some code. You can implement the more complex form ether posted, but this is the most basic form and all that most teams need. Sorry for not including it the first time.:D

ok so that seemed to work a little but it's still sensitive. It was originally so bad that if you picked up the controller it would move like a bat out of hell and ram into the wall. So what else do you think I should do

sanelss 26-01-2014 20:16

Re: Joystick Sensitivity
 
I'll post you the vi I made earlier today just for this purpose. There are several ways this VI can be used and there's a few more features I want to add before I publish it. I'll also upload a video demonstrating the effects of all the different features. I had functions setup previous years that did everything I needed but this year I decided to wrap it up into a nice re-usable general purpose package with no drawbacks.

sanelss 27-01-2014 00:39

Re: Joystick Sensitivity
 
Here is the vi and video explaining it as promised:

https://drive.google.com/file/d/0B4f...it?usp=sharing

https://www.youtube.com/watch?v=5pDs...ature=youtu.be


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