Go to Post Just because there is a limit, doesn't mean that they don't love you. - Amanda M [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-05-2010, 08:49
Zme Zme is offline
Registered User
FRC #2619
 
Join Date: Jan 2009
Location: Michigan
Posts: 83
Zme is on a distinguished road
crab drive control scheme

I've got some code sketched out to do crab drive but i'm wondering how to control it. I was hoping to get some input on how other teams have set up the controls for their crab drives, any help would be nice.
  #2   Spotlight this post!  
Unread 26-05-2010, 08:59
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: crab drive control scheme

The easiest way is to implement P or PID control of the steering, here's some psuedo-code for Proportional (P):
Code:
error = setpoint - process_variable
output = error * gain
Nice and easy. You can increase the gain until it goes as fast as possible without overshooting/oscillating.

If you need finer control of PID (Proportional Integral Derivative) you can use the NI PID toolkit in LabVIEW, but P will probably be good enough for swerve steering.

If you have independent control of each wheel, you can calculate the optimum wheel angle when turning. Assuming you dont, you still turn like a skid-steer. When translating sideways, use the "front" and "back" motors as "left" and "right" for turning.

Edit: Forgot about user interface.

There are a few common ways to do this:
1. Gaming controls: Map the translation angle to the angle of the right joystick and the speed to the magnitude of the right joystick. Map the rotation to the X axis of the left joystick. Use Arcade Drive based on whatever wheels are currently left and right. This is generally combined with a gamepad type controller, and will be very familiar with drivers who are also gamers. These are generally the most common.

2. We have also used "tank-hybrid" when the driver was heavily trained in skid-steer driving. We mapped the speed to the Y axis of the two joysticks, just like tank, and the translation angle to the average of the X. The driver liked this, and it worked, although it did not allow us to utilize the power of four wheel independent steering.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack

Last edited by apalrd : 26-05-2010 at 09:04.
  #3   Spotlight this post!  
Unread 26-05-2010, 09:44
Zme Zme is offline
Registered User
FRC #2619
 
Join Date: Jan 2009
Location: Michigan
Posts: 83
Zme is on a distinguished road
Re: crab drive control scheme

the back end i wasn't worried about but you answered my question on the ui perfectly, Thanks
Closed Thread


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 vs. mecanum drive system superbotman Technical Discussion 33 06-01-2010 03:09
Crab / Swerve drive joystick control scheme Tom Line Programming 12 16-04-2007 18:47
Driving control scheme? ChuNalt787 General Forum 29 05-02-2006 01:04
Control Scheme Drok00 Control System 5 19-01-2006 16:57


All times are GMT -5. The time now is 23:13.

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