Go to Post Can't we also care about and celebrate the processes, the professionalism, the experience of healing? - Taylor [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 Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 20-01-2011, 09:59
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,281
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: Swirve Drive

Quote:
Originally Posted by flamingtoaster View Post
This year my team is using a swirve drive on the robot. I am a first year programmer and doi not know how to program this. I know I need to make a custom drive, has anyone done this in the past and have any ideas on how to get this to work?
There are two major components to controlling swerve drives.

1.) Wheel Angle: First you need to calculate the desired wheel angle, this will depend on exactly how you are going to control it but most likely you will have to take the X and Y values and use trig to calculate the desired angle (Tan=Opposite/Adjacent). You will also need to calculate the current angle, for this you will need some kind of sensor (likely a potentiometer). Once you have the desired and actual angles you can use a PID loop (there are functions written for this in both labview and C++) to adjust the angle. There are whitepapers here on CD that describe the process of tuning PID loops.

2.) Wheel Speed, this can be calculated more directly. You can calculate the desired speed from the X and Y components of the joystick (Pythagorean Theorem) and you can map that to wheel speed.

This is the simplest way to do swerve drive and it doesn't take into account turning. To give you more guidance we really need to know what you are using to control the bot and how the swerve drive is set up. Anytime you are looking to program something that is complicated it is important to break it into smaller functions and attack each independently.

If you have more questions feel free to post them.
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
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


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

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