Go to Post After all, bitterness takes all the fun out of wiring. - Venkatesh [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 19-01-2007, 13:35
dpick1055's Avatar
dpick1055 dpick1055 is offline
David Pick
FRC #1739 (Chicago Knights)
Team Role: Alumni
 
Join Date: May 2005
Rookie Year: 2004
Location: Chicago
Posts: 75
dpick1055 is on a distinguished road
Send a message via AIM to dpick1055
Swerve drive control system

Sorry if this was posted already, I did some searching and couldn't find it.

This year my team is doing a crab drive. I was wondering how when programming it you deal with a driver who isn't maintaining a constant position. We don't want our robot to start traveling on a curve but we want our wheels to turn fairly fast. My first idea is to have something in the code that says if the joystick doesn't change its position by more than 2 degrees don't move the wheels, but I don't think this will be good enough to fix the problem. Any help would be great. Thanks.
__________________
Always remember to take your powered wheels off the ground when first testing code. Otherwise you'll end up with holes in the wall like us
  #2   Spotlight this post!  
Unread 19-01-2007, 15:48
ggoldman's Avatar
ggoldman ggoldman is offline
Registered User
FRC #0401
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Richmond. Va
Posts: 258
ggoldman has much to be proud ofggoldman has much to be proud ofggoldman has much to be proud ofggoldman has much to be proud ofggoldman has much to be proud ofggoldman has much to be proud ofggoldman has much to be proud ofggoldman has much to be proud ofggoldman has much to be proud of
Send a message via AIM to ggoldman
Re: Swerve drive control system

Note: I am not a programming expert!

But I do remember that many teams program in a "dead zone" into their code that ignores a certain percentage of any joystick movement outside of center.

For example if you move all the way to the right, your motor input value will be 255. All the way to the left is 0. So if you program a deadzone of 10% in either direction, you just ignore any motor signals (or make it zero) for joystick outputs 100 - 140 or so.

Maybe this could solve part of your problem, maybe not.

Hope my non-expert advice could help!
__________________
Gabriel Goldman
PhD Candidate
RoMeLa: Robotics and Mechanisms Laboratory
http://www.me.vt.edu/romela
Virginia Tech
  #3   Spotlight this post!  
Unread 19-01-2007, 19:14
dpick1055's Avatar
dpick1055 dpick1055 is offline
David Pick
FRC #1739 (Chicago Knights)
Team Role: Alumni
 
Join Date: May 2005
Rookie Year: 2004
Location: Chicago
Posts: 75
dpick1055 is on a distinguished road
Send a message via AIM to dpick1055
Re: Swerve drive control system

Thanks, I was thinking something along those lines. Right now i'm thinking of splitting the joystick output into sections and only letting the robot drive a certain number of angles. This way I can say if the joystick is in x region put the wheel at y angle.
__________________
Always remember to take your powered wheels off the ground when first testing code. Otherwise you'll end up with holes in the wall like us
  #4   Spotlight this post!  
Unread 19-01-2007, 23:46
slloyd slloyd is offline
Registered User
AKA: Sonny
FRC #1221 (Nerbotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: CANADA -eh?
Posts: 20
slloyd is an unknown quantity at this point
Re: Swerve drive control system

the wheel button on the joystick has 8 discrete positions, well 9 if you consider not pressing the button = neutral position.

the default code maps this signal from joystick to port, just keyword search for "wheel" and see what you find.

maybe this is how you want to control your robot? wouldn't be smooth, but sounds like this is what you are asking for.

slloyd
  #5   Spotlight this post!  
Unread 19-01-2007, 23:57
Andrew Schuetze's Avatar
Andrew Schuetze Andrew Schuetze is offline
499 Founder / Alamo FTC & FLL AP
no team
Team Role: Leadership
 
Join Date: Jan 2002
Rookie Year: 2001
Location: San Antonio, Texas
Posts: 689
Andrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond repute
Re: Swerve drive control system

We've considered working up a crab-steer in the off-season. Our thoughts were to use a potentiometer/knob on a custom control box to steer a crab. If one uses a self-centering joystick, one will have to constantly maintain stick position to steer in that direction. Maybe you have a joystick with a twist or rotation option and momentary twists CW or CCW will jog the steer motor CW or CCW instead of going to set rotation...

APS
__________________
APS

Founder FRC 499
Parent alumni FRC 2745 & 4219
Co-Coach FTC 4549 & 6407
Alamo FTC Affiliate Partner
Alamo FLL Affiliate Partner
  #6   Spotlight this post!  
Unread 20-01-2007, 00:24
Eric Yahrmatter's Avatar
Eric Yahrmatter Eric Yahrmatter is offline
Registered User
FRC #0033 (Killer Bees)
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2003
Location: Ortonville, MI
Posts: 65
Eric Yahrmatter has a spectacular aura aboutEric Yahrmatter has a spectacular aura about
Re: Swerve drive control system

You could use a proportional feedback controller to drive your turret motor. We normally use them to control arm movements and prevent overshooting, but one can and will work in your case.
This presentation should help:
http://www.chiefdelphi.com/media/papers/1754

You can add a segment to the sample code provided in the presentation to prevent turret movement due to shaky driver inputs. Try something like this:
Code:
if (error > DEADBAND || error < -DEADBAND)
    {error = 127;}
'set DEADBAND to represent your +/- 2 degree margin of error
  #7   Spotlight this post!  
Unread 20-01-2007, 12:33
dpick1055's Avatar
dpick1055 dpick1055 is offline
David Pick
FRC #1739 (Chicago Knights)
Team Role: Alumni
 
Join Date: May 2005
Rookie Year: 2004
Location: Chicago
Posts: 75
dpick1055 is on a distinguished road
Send a message via AIM to dpick1055
Re: Swerve drive control system

I'll give that a try and see how it works. Thanks.
__________________
Always remember to take your powered wheels off the ground when first testing code. Otherwise you'll end up with holes in the wall like us
  #8   Spotlight this post!  
Unread 20-01-2007, 15:31
114gopher's Avatar
114gopher 114gopher is offline
Co-Captain
AKA: Adam Garcia
FRC #0114 (Eagle Strike)
Team Role: Student
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Los Altos High School
Posts: 30
114gopher will become famous soon enough114gopher will become famous soon enough
Send a message via AIM to 114gopher
Re: Swerve drive control system

Quote:
Originally Posted by Andrew Schuetze View Post
We've considered working up a crab-steer in the off-season. Our thoughts were to use a potentiometer/knob on a custom control box to steer a crab. If one uses a self-centering joystick, one will have to constantly maintain stick position to steer in that direction. Maybe you have a joystick with a twist or rotation option and momentary twists CW or CCW will jog the steer motor CW or CCW instead of going to set rotation...

APS
I agree with APS on this one. We did a crab drive for triple play, and tried to control the swivel by moving the joystick from side to side. Long story short, bad idea. A joystick that can rotate around the vertical would work, we also tried looking for one of those jog wheels that you find on remotes, the ones that return to center when you let go. I wold also recommend that you put a three position toggle switch on your control board that when you press it, centers your wheels so they all face foreward, and then turns the robot tank-style. This was a helpful feature for us, and allowed us to make turns that orient the entire robot that would have otherwise taken some wicked driving and some time. If there is any more help I or any of my team members can give you, let me know!
  #9   Spotlight this post!  
Unread 22-01-2007, 19:06
dpick1055's Avatar
dpick1055 dpick1055 is offline
David Pick
FRC #1739 (Chicago Knights)
Team Role: Alumni
 
Join Date: May 2005
Rookie Year: 2004
Location: Chicago
Posts: 75
dpick1055 is on a distinguished road
Send a message via AIM to dpick1055
Re: Swerve drive control system

Yeah I was planning on just putting in some code so when the trigger was pressed if the joystick was moved forward or backward the robot would spin like it was a tank drive system. I've now just about finished the code for the drive system. It actually ended up being easier than I thought it would.
__________________
Always remember to take your powered wheels off the ground when first testing code. Otherwise you'll end up with holes in the wall like us
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
A Swerve Drive Question lndnny Technical Discussion 10 20-07-2006 08:09
Swerve Drive Whitepapers/Info Ryan F. Kit & Additional Hardware 1 20-10-2005 00:51
Swerve Drive on a Jeep Karthik Math and Science 3 01-02-2005 17:50
pic: Lego Swerve Drive CD47-Bot Robot Showcase 14 26-06-2003 16:19
Swerve Drive Jeff Waegelin Technical Discussion 14 17-09-2001 08:06


All times are GMT -5. The time now is 18:33.

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