Go to Post Without programmers there would only be a robotic beauty contest. - mallot1243 [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 16-03-2009, 23:04
IceStorm IceStorm is offline
Mentor FRC 5046, FTC 8688
AKA: Chad
FRC #5046 (Jacked Up Jackets)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Michigan
Posts: 134
IceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of light
Send a message via AIM to IceStorm Send a message via Yahoo to IceStorm
joystick comparison within percentage

Were trying to figure out how to compare two joysticks used for a tankdrive system but have them have a percentage of difference allowed between them. With at touchy as they are there is no possible way that our driver would be holding the sticks exactly equal unless they are in the full -1,1, or 0 positions.

I have looked at the in range and coerce functions but don't fully understand them enough to figure out if they will do what were trying to do.

Right now we have our 2 joysticks and can figure out what the driver entended to do with the sticks but want to allow for a 10% or so margin of error so that the driver does not have to be super percise.

would someone either be able to provide us with a sample block of labview code or at least point us in the right direction and functions to use.

Thanks so much!
Reply With Quote
  #2   Spotlight this post!  
Unread 16-03-2009, 23:28
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: joystick comparison within percentage

In previous years, we did "arcade style" control in the code, even when the drivers used "tank style" input. The speed value was computed from the sum of the two joysticks, and the turn value was the difference. We applied a deadband function to the turn value, which does pretty much what you're asking for. A simple deadband is done like this: if the value is within a certain distance of zero, set it to zero.

(To turn arcade drive values back into tank drive values, the left motor is controlled by the speed plus the turn, and the right motor is controlled by the speed minus the turn.)
Reply With Quote
  #3   Spotlight this post!  
Unread 19-03-2009, 15:34
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,512
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: joystick comparison within percentage

Chad - come down with John Monday or Tuesday. I'll give you our Drive Straight.vi so you can see how it's done.

Tom
Reply With Quote
  #4   Spotlight this post!  
Unread 19-03-2009, 16:34
Cuse's Avatar
Cuse Cuse is offline
Registered User
AKA: Matt Mancuso
FRC #0175 (Buzz Robotics)
Team Role: Alumni
 
Join Date: Mar 2007
Rookie Year: 2005
Location: Enfield, CT
Posts: 22
Cuse is an unknown quantity at this point
Re: joystick comparison within percentage

I just made a quick SubVI for what I think you're asking for...

Is it what you need? It'll set both drives equal to the average of both sticks if the inputs from the sticks are within 10% (or whatever percentage you set) of each other, otherwise it takes the direct inputs and sends them through to the outputs (i.e, when you're turning).
Attached Files
File Type: vi Drive Straight (Tank) Sub.vi (12.2 KB, 50 views)
__________________


Last edited by Cuse : 19-03-2009 at 17:30.
Reply With Quote
  #5   Spotlight this post!  
Unread 20-03-2009, 00:19
IceStorm IceStorm is offline
Mentor FRC 5046, FTC 8688
AKA: Chad
FRC #5046 (Jacked Up Jackets)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Michigan
Posts: 134
IceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of light
Send a message via AIM to IceStorm Send a message via Yahoo to IceStorm
Re: joystick comparison within percentage

Quote:
Originally Posted by Cuse View Post
I just made a quick SubVI for what I think you're asking for...

Is it what you need? It'll set both drives equal to the average of both sticks if the inputs from the sticks are within 10% (or whatever percentage you set) of each other, otherwise it takes the direct inputs and sends them through to the outputs (i.e, when you're turning).

I will need to try it out next time I get on a machine with labview and see if it does the job or not. I think you hit right on with what were wanting to do.

Thanks for the help
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
Drive Train Comparison 2006 Rob2713g Technical Discussion 18 25-10-2006 16:36
Percentage of Work Done by Students. daviamp General Forum 49 22-03-2006 11:53
Shooters & Percentage Poll Joe Johnson General Forum 16 14-02-2006 13:55
Shooting Percentage? Joe Johnson FIRST Tech Challenge 7 15-04-2005 17:48
Comparison Paper ? Steve W General Forum 13 09-11-2004 16:37


All times are GMT -5. The time now is 08:31.

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