Go to Post (This is why Non-Engineering Mentors make the dinner plans for the team...) - KathieK [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 15-12-2010, 13:14
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: HELP with TANK DRIVE PROGRAMMING

Quote:
Originally Posted by Mark McLeod View Post
P.S.
Not that you've said you have this issue, but if turning at low power is a problem with your robot you can also do something in software that doesn't require adding sensors, physically changing the gearing, or swapping out sticky wheels for slicks.
In your code you can avoid applying the power reduction to any turning component or make just turning a higher percentage. For example, if one of your joysticks is forward and the other is backward, then don't reduce the power to the joysticks. If they are both forward but to varying degrees, so you get a curved driving path, then leave the difference between the sticks alone and only reduce the straight component.

Here's one possible implementation of what Mark has suggested:

Let Y1 be the left joystick command and Y2 be the right joystick command.

Then compute these modified joystick commands:


Y1' = [(a+1)*Y1 + (a-1)*Y2]/2

Y2' = [(a-1)*Y1 + (a+1)*Y2]/2


where "a" is your speed adjustment factor, e.g. 0.25

Then send the modified Y1' and Y2' commands to the tank drive vi.



This transformation yields Y1' and Y2' values which are always in the range -1 to +1 (assuming that Y1 and Y2 were in that range).

It also handles cases where [(Y1>0) and (Y2<0)] or [(Y1<0) and (Y2>0)], so no conditional logic is required.



Reply With Quote
  #2   Spotlight this post!  
Unread 15-12-2010, 18:49
Cyberphil's Avatar
Cyberphil Cyberphil is offline
That Guy
AKA: Phil
FRC #0103 (Cybersonics)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Kintersville
Posts: 755
Cyberphil has much to be proud ofCyberphil has much to be proud ofCyberphil has much to be proud ofCyberphil has much to be proud ofCyberphil has much to be proud ofCyberphil has much to be proud ofCyberphil has much to be proud ofCyberphil has much to be proud ofCyberphil has much to be proud of
Send a message via AIM to Cyberphil
Re: HELP with TANK DRIVE PROGRAMMING

Now, I do not know about your robot at all, but rather than doing this with the programming, why don't you just change the gear ratio of the DT? This will probably save a lot of headache (If your DT is anything like ours). It will, in turn, give you more power, but in most robot destruction cases I have seen in the past 4 years, it has been because of the speed of the bot.

If this is not what you are looking for, then please just disregard this! Hope this helps!
Reply With Quote
  #3   Spotlight this post!  
Unread 15-12-2010, 20:27
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: HELP with TANK DRIVE PROGRAMMING

Quote:
Originally Posted by Cyberphil View Post
why don't you just change the gear ratio of the DT? It will ... give you more power
i.e. , if you gear it down further, it will reduce the top speed, and increase the pushing force.





Last edited by Ether : 15-12-2010 at 21:11.
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
Need help with tank drive nickcvet89 NI LabVIEW 16 02-02-2010 16:35
Problem with tank drive Mr. E NI LabVIEW 6 27-01-2009 16:59
Help with programing Tank Drive in Lab View zackcool123 NI LabVIEW 3 18-01-2009 19:49
EASY C PRO help tank drive issues!!! can any 1 solve this programming issue? mayazk Programming 2 16-02-2008 02:17
Tank Drive help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Idaman323 Programming 3 18-02-2005 15:17


All times are GMT -5. The time now is 21:20.

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