![]() |
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?
|
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. |
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.
|
Re: Joystick Sensitivity
Quote:
try this instead: http://www.chiefdelphi.com/forums/sh...d.php?p=921992 |
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.
|
Re: Joystick Sensitivity
can some one please post a pic of there code, im new to labview.
|
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 |
Re: Joystick Sensitivity
thank you for the fast reply, but I have no idea how to do that or implant it into the code.
|
Re: Joystick Sensitivity
Quote:
minor (but important) clarification - to preserve the sign: joy2 = joy * abs(joy); |
Re: Joystick Sensitivity
Quote:
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. |
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
|
Re: Joystick Sensitivity
Quote:
So if all you want to do is square the inputs, you don't need to do that in your code. |
Re: Joystick Sensitivity
Quote:
|
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.
|
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