Go to Post FIRST is not about winning awards, it's about learning and advancing the human culture - crispyc [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

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 01-04-2009, 11:13
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Programming Crab Drive

This is a problem that will take some time and patience to think through. I don't want to deprive you of that learning experience, but I'll give you some insight as to how we do crab.

Our left stick is our crab stick and the right stick is the drive stick. Up until last year, we mainly only looked at the X-axis of the crab stick to determine the desired crab angle. Centered meant an angle of 0 (straight ahead) and full left/right represented +- 90 degrees. Last year and this year, we took the approach of treating the crab stick as a polar coordinate system. We look at the angle component and map that directly to a crab angle (i.e. point the stick 45 forward right and the crab angle becomes +45). The trick here is to also look at the magnitude component and treat the angle as 0 unless it's outside of some deadband.

It gets slightly more complicated with the drive stick. We will behave differently depending on where the crab stick is. If the desired angle is between +- 30 degrees we treat the drive stick as a standard arcade stick. Once we get beyond the 30 degree mark, we only look at the Y component of the drive stick to get a desired speed for all wheels. This is because if you were to allow a tank turn while crabbed, the wheels will oppose each other. Once we get to +-30 degrees around +-90, we allow tank turn again, however we have to do some logic to make sure the wheels are driving in the right direction instead of opposing each other. We usually don't allow tank turn when crabbing, but this year had some benefits (we also had something similar in 2003).

Beyond that, you can do some cool things based on what buttons are pressed on the controller. For example, last year, we had buttons to do car steering (front wheels crab, back wheels fixed at 0) and monster steering (front and back crab opposite each other to get a tighter turn radius).

The biggest thing that you need to do is think through exactly what you want the behavior to be. Once you know that, it's just a matter of piecing the program logic together.

You guys are close enough where if you have problems along the way, have Herb get a hold of us and we can try to walk you through your issues.
Reply With Quote
 


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
Crab Drive Programming!!! HELP!!!!!!!!! Megy698 Programming 6 13-02-2009 07:53
crab drive cloud_254 Technical Discussion 14 24-01-2009 14:23
Crab Drive RMS11 Robot Showcase 46 05-09-2008 22:34
Crab Drive Joe_Widen Technical Discussion 9 21-04-2006 21:50
Crab Drive Collin Fultz Technical Discussion 3 04-09-2002 16:35


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

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