Go to Post Even in the worst times, I get a reminder of just how wonderful my big FIRST family is. - 216Robochick288 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-02-2009, 16:14
furiousgeorge's Avatar
furiousgeorge furiousgeorge is offline
Registered User
FRC #3055
 
Join Date: Jan 2009
Location: Austin
Posts: 74
furiousgeorge will become famous soon enoughfuriousgeorge will become famous soon enough
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?
Reply With Quote
  #2   Spotlight this post!  
Unread 14-02-2009, 16:20
airnate airnate is offline
Registered User
FRC #0236 (Techno Ticks)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: southeastern CT
Posts: 93
airnate is a jewel in the roughairnate is a jewel in the roughairnate is a jewel in the rough
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.

Last edited by airnate : 14-02-2009 at 16:41.
Reply With Quote
  #3   Spotlight this post!  
Unread 19-02-2010, 19:26
JP Carlin's Avatar
JP Carlin JP Carlin is offline
Registered User
FRC #2487 (Mechanical Animals)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Sayville NY
Posts: 42
JP Carlin is on a distinguished road
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 19-02-2010, 21:46
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,086
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Joystick Sensitivity

Quote:
Originally Posted by JP Carlin View Post
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
Reply With Quote
  #5   Spotlight this post!  
Unread 19-02-2010, 23:13
JP Carlin's Avatar
JP Carlin JP Carlin is offline
Registered User
FRC #2487 (Mechanical Animals)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Sayville NY
Posts: 42
JP Carlin is on a distinguished road
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 21-01-2014, 22:12
Team3993Tom Team3993Tom is offline
Registered User
FRC #3993
 
Join Date: Feb 2013
Location: Newhall
Posts: 35
Team3993Tom is an unknown quantity at this point
Re: Joystick Sensitivity

can some one please post a pic of there code, im new to labview.
Reply With Quote
  #7   Spotlight this post!  
Unread 21-01-2014, 22:20
Dexterium's Avatar
Dexterium Dexterium is offline
Registered User
AKA: Adam Poindexter
FRC #1208 (Metool Brigade)
Team Role: Programmer
 
Join Date: Sep 2012
Rookie Year: 2011
Location: United States
Posts: 24
Dexterium is an unknown quantity at this point
Re: Joystick Sensitivity

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
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	232
Size:	50.8 KB
ID:	15911  
Reply With Quote
  #8   Spotlight this post!  
Unread 21-01-2014, 22:26
Team3993Tom Team3993Tom is offline
Registered User
FRC #3993
 
Join Date: Feb 2013
Location: Newhall
Posts: 35
Team3993Tom is an unknown quantity at this point
Re: Joystick Sensitivity

thank you for the fast reply, but I have no idea how to do that or implant it into the code.
Reply With Quote
  #9   Spotlight this post!  
Unread 22-01-2014, 12:37
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Re: Joystick Sensitivity

Quote:
Originally Posted by Dexterium View Post
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);
Reply With Quote
  #10   Spotlight this post!  
Unread 22-01-2014, 13:06
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,086
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Joystick Sensitivity

Quote:
Originally Posted by gpetilli View Post
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.


Reply With Quote
  #11   Spotlight this post!  
Unread 22-01-2014, 20:47
Dexterium's Avatar
Dexterium Dexterium is offline
Registered User
AKA: Adam Poindexter
FRC #1208 (Metool Brigade)
Team Role: Programmer
 
Join Date: Sep 2012
Rookie Year: 2011
Location: United States
Posts: 24
Dexterium is an unknown quantity at this point
Re: Joystick Sensitivity

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.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	256
Size:	10.5 KB
ID:	15926  
Reply With Quote
  #12   Spotlight this post!  
Unread 22-01-2014, 21:09
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,086
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Joystick Sensitivity

Quote:
Originally Posted by Dexterium View Post
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.



Last edited by Ether : 23-01-2014 at 17:08.
Reply With Quote
  #13   Spotlight this post!  
Unread 26-01-2014, 19:50
Team3993Tom Team3993Tom is offline
Registered User
FRC #3993
 
Join Date: Feb 2013
Location: Newhall
Posts: 35
Team3993Tom is an unknown quantity at this point
Re: Joystick Sensitivity

Quote:
Originally Posted by Dexterium View Post
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.
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
Reply With Quote
  #14   Spotlight this post!  
Unread 26-01-2014, 20:16
sanelss sanelss is offline
Registered User
FRC #1658
 
Join Date: Dec 2012
Location: saint louis
Posts: 258
sanelss is a splendid one to beholdsanelss is a splendid one to beholdsanelss is a splendid one to beholdsanelss is a splendid one to beholdsanelss is a splendid one to beholdsanelss is a splendid one to behold
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.
Reply With Quote
  #15   Spotlight this post!  
Unread 27-01-2014, 00:39
sanelss sanelss is offline
Registered User
FRC #1658
 
Join Date: Dec 2012
Location: saint louis
Posts: 258
sanelss is a splendid one to beholdsanelss is a splendid one to beholdsanelss is a splendid one to beholdsanelss is a splendid one to beholdsanelss is a splendid one to beholdsanelss is a splendid one to behold
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
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
joystick sensitivity gabrielse Programming 2 08-02-2008 14:52
Joystick sensitivity Philz20 Programming 10 24-01-2008 08:34
joystick sensitivity hanan Control System 4 19-01-2007 05:36
joystick sensitivity Team 668 Programming 11 16-02-2005 18:45
Help with Joystick Axes and Sensitivity bglass Programming 6 06-02-2005 14:01


All times are GMT -5. The time now is 09:51.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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