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?

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.

*.

  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.*

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/showthread.php?p=921992

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.

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

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





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

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:

Joy[sub]adj[/sub] = 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 Joy[sub]adj[/sub]=Joy and Joy[sub]adj[/sub]=Joy3.

When a=0 you get Joy[sub]adj[/sub]=Joy, and when a=1 you get Joy[sub]adj[/sub]=Joy3. When 0<a<1, you get a “blend” in-between Joy[sub]adj[/sub]=Joy and Joy[sub]adj[/sub]=Joy3. The range of Joy[sub]adj[/sub] is still -1 to +1 for all curves in the family.

More detailed explanation here.

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.:smiley:

Capture.PNG


Capture.PNG

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.

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

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.

Here is the vi and video explaining it as promised:

https://drive.google.com/file/d/0B4fOsi0gJv2feGZwb25Hc3RuZ00/edit?usp=sharing

If you don’t want the robot blazing around because of slight bumps or other movements when holding the controller, put in a deadband.

Basically, you’re saying that the joystick should only go though if it’s absolute value is greater than a specified level of tolerance. If it’s not greater than the tolerance level, than the output will be zero (no movement).

You maintain the same sensitivity in general use, except that now you have to move the stick outside a greater

deadband.PNG

I hope this helps, if this is what any of you are looking for.

deadband.PNG


deadband.PNG