Go to Post The events are not just a competition, but a celebration of 6 weeks of hard work. - ChristinaR [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-03-2011, 22:39
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: The Hardest Drive System To Program:

Any base drive system is not incredibly difficult to program. Programming an effective control system for a drive system is hard.

see:
  • Failure checking (state machine, redundancies)
  • Human error correction
  • Mechanical error correction

I really don't know what to answer your question with, everytime I think of a drive system I think of all the ways I could improve it with pieces of code - would be very difficult to pick a single one, and would require more context.
  #2   Spotlight this post!  
Unread 26-03-2011, 22:41
mobilegamer999 mobilegamer999 is offline
Registered User
FRC #3357 (Comets)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Michigan
Posts: 124
mobilegamer999 is a jewel in the roughmobilegamer999 is a jewel in the roughmobilegamer999 is a jewel in the rough
Re: The Hardest Drive System To Program:

My opinion would be swerve drive.
Theres pre-made code in WPILIB already for Tank, Arcade, Mechanum and one other I believe. But swerve is the only one out there that requires pretty much completely custom code to get working.
__________________
  #3   Spotlight this post!  
Unread 26-03-2011, 22:43
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: The Hardest Drive System To Program:

Quote:
Originally Posted by mobilegamer999 View Post
My opinion would be swerve drive.
Theres pre-made code in WPILIB already for Tank, Arcade, Mechanum and one other I believe. But swerve is the only one out there that requires pretty much completely custom code to get working.
Can you explain swerve drive? Apparently, my understanding of the said swerve drive is actually "crab drive". Tell me WHAT it is, not how or anything like that.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #4   Spotlight this post!  
Unread 26-03-2011, 22:46
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: The Hardest Drive System To Program:

Quote:
Originally Posted by davidthefat View Post
Tell me WHAT it is, not how or anything like that.
To be fair, your original post was only

Quote:
Originally Posted by davidthefat
What is the hardest drive system to program?
--

Quote:
Originally Posted by davidthefat View Post
my understanding of the said swerve drive is actually "crab drive"
Crab drive is a specific type of swerve drive, where there are four rotating modules.
  #5   Spotlight this post!  
Unread 26-03-2011, 22:49
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: The Hardest Drive System To Program:

I would recommend reading this excellent white paper by Ian Mackenzie

http://www.firstroboticscanada.org/s...irectional.pdf
  #6   Spotlight this post!  
Unread 26-03-2011, 22:50
mobilegamer999 mobilegamer999 is offline
Registered User
FRC #3357 (Comets)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Michigan
Posts: 124
mobilegamer999 is a jewel in the roughmobilegamer999 is a jewel in the roughmobilegamer999 is a jewel in the rough
Re: The Hardest Drive System To Program:

Quote:
Originally Posted by davidthefat View Post
Can you explain swerve drive? Apparently, my understanding of the said swerve drive is actually "crab drive". Tell me WHAT it is, not how or anything like that.
Each wheel module rotates along its vertical axis as well as rotating along the wheels axle (for movement which is usually helpful), so to go at a 45 degree angle, you rotate all wheels to 45 deg and then just drive all wheels straight.
__________________
  #7   Spotlight this post!  
Unread 26-03-2011, 22:55
bladetech932's Avatar
bladetech932 bladetech932 is offline
Programmer of awesome
AKA: Jon
FRC #0932 (Circuit Chargers)
Team Role: College Student
 
Join Date: May 2009
Rookie Year: 2009
Location: Tulsa
Posts: 242
bladetech932 is on a distinguished road
Re: The Hardest Drive System To Program:

In my opinion how you want to implement the drive will make the programming difficult. For example a competent programmer can program a swerve that can move the wheels forward and rotate them directly with a joystick but making a program that takes into account the position of the wheels relative to the closest direction to rotate and stops the wheels from moving till they reach the correct angle while taking into account the angle of the robot and the desired direction will make the programming more difficult. i have found the most fun is had trying to make an extremely complex drive train simple to use! Now with just the simple setup (aka. nothing unique) i would agree it would be the swerve because of the availability of prewritten code and for the difficulty in making the drive simple to use.

~Jon
__________________
Expect the best, Prepare for the worst
  #8   Spotlight this post!  
Unread 26-03-2011, 23:01
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: The Hardest Drive System To Program:

Quote:
Originally Posted by bladetech932 View Post
i have found the most fun is had trying to make an extremely complex drive train simple to use!
Precisely.
  #9   Spotlight this post!  
Unread 26-03-2011, 23:03
connor.worley's Avatar
connor.worley connor.worley is offline
Registered User
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Berkeley/San Diego
Posts: 601
connor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond repute
Re: The Hardest Drive System To Program:

They're all fairly simple until you get to a full swerve drive. But even then it's just some control loops and a bit of trigonometry.
__________________
Team 973 (2016-???)
Team 5499 (2015-2016)
Team 254 (2014-2015)

Team 1538 (2011-2014)
2014 Driver (25W 17L 1T)
日本語でOK
  #10   Spotlight this post!  
Unread 26-03-2011, 23:08
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: The Hardest Drive System To Program:

Quote:
Originally Posted by connor.worley View Post
They're all fairly simple until you get to a full swerve drive. But even then it's just some control loops and a bit of trigonometry.
Joystick has a X and a Y axis; get the inverse tangent of the Y/X. You have your angle (of course, there is something to check if the x and y are both negatives and or on the axis it self. That is easy) Rotate the wheels to that angle (Closed Loop System) Then the magnitude (Pythagorean theorem) is the speed to the motors.

How ever, I heard that it is the crab drive.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #11   Spotlight this post!  
Unread 26-03-2011, 23:12
mobilegamer999 mobilegamer999 is offline
Registered User
FRC #3357 (Comets)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Michigan
Posts: 124
mobilegamer999 is a jewel in the roughmobilegamer999 is a jewel in the roughmobilegamer999 is a jewel in the rough
Re: The Hardest Drive System To Program:

swerve drive == crab drive

and yes, putting all that stuff in (in summary) sounds simple, but seems complicated in comparison to say tank drive which is read left joystick set left wheels, read right joystick set right wheels
__________________
  #12   Spotlight this post!  
Unread 26-03-2011, 23:14
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: The Hardest Drive System To Program:

Quote:
Originally Posted by mobilegamer999 View Post
swerve drive == crab drive

and yes, putting all that stuff in (in summary) sounds simple, but seems complicated in comparison to say tank drive which is read left joystick set left wheels, read right joystick set right wheels
So you are saying that the "hardest" drive system is not even that hard. (I am more than capable of programming that) Now I guess I will look into to legged locomotion instead of wheels...

Actually, I think a 2 wheel system would be fairly hard.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #13   Spotlight this post!  
Unread 26-03-2011, 23:21
rahilm's Avatar
rahilm rahilm is offline
Registered User
AKA: Rahil Mehta
FRC #0668 (The Apes of Wrath)
Team Role: Mentor
 
Join Date: Oct 2009
Rookie Year: 2007
Location: San Jose, CA
Posts: 116
rahilm has a spectacular aura aboutrahilm has a spectacular aura about
Re: The Hardest Drive System To Program:

Quote:
Originally Posted by mobilegamer999 View Post
swerve drive == crab drive

and yes, putting all that stuff in (in summary) sounds simple, but seems complicated in comparison to say tank drive which is read left joystick set left wheels, read right joystick set right wheels
Crab is simply a TYPE of swerve drive, but they are not the same. Swerve is just the ability to have sets of wheels that can rotate. Crab drive is a type of swerve drive where all the wheels are linked (mechanically usually), so they are always at the same angle. There are other types of swerves, including ones where each wheel is rotated independently (allows greater maneuverability and less skidding and much more complicated programming), and Winnovation's 6-wheel swerve.
__________________
Team 668 - Apes of Wrath - 2008-2011
Team 668 - Apes of Wrath - 2011-Present (Mentor)
  #14   Spotlight this post!  
Unread 26-03-2011, 23:34
mobilegamer999 mobilegamer999 is offline
Registered User
FRC #3357 (Comets)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Michigan
Posts: 124
mobilegamer999 is a jewel in the roughmobilegamer999 is a jewel in the roughmobilegamer999 is a jewel in the rough
Re: The Hardest Drive System To Program:

I have helped many teams with base drive code and have encountered quite a few different drive types. The swerve drive that I worked with was 4 swerves, each with independent control, and I would say it was one of the more difficult ones to get working, fully functions, and non-wire-twisting.

Now, the code i have doesnt use PID loops, but rather 'manual' monitoring and speed adjustment of swerve modules based on current and target angles. That being said, had it not been in the heat of competition with the limited time for programming and annoyance of "its just code, whats so hard about it" (as im sure all programmers are used to), I would have taken the time to properly implement PID loops, correct stops, and more features. But what made it difficult and would make it similarly difficult in any build season is the tendency to get 'base functionality' working then add 'slightly more' over and over so you can get more testing done and get it more and more functional but have ugly and hard to manage code, instead of taking the time to properly write it with closed control loops after base functionality was working. The biggest issue was the time limitation we had on programming and had we had more time, maybe it might have been easier to work with.
__________________
  #15   Spotlight this post!  
Unread 26-03-2011, 23:38
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
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: The Hardest Drive System To Program:

Quote:
Originally Posted by Siri View Post
I'd say Unicorn drive is up there. There's so many modes available: tank (uncommon if snake works), full crab (all wheels pointed same direction), snake (front & back point opposite directions), center spin, arbitrary center spin, each potentially with x and y-orientation.
You left out the most interesting one: full 3-degree-of-freedom control, like a mecanum or omni.


Quote:
Originally Posted by rahilm View Post
There are other types of swerves, including ones where each wheel is rotated independently (allows greater maneuverability and less skidding and much more complicated programming)
A swerve with four-wheel independent steering and wheel speed control allows the vehicle to be programmed to behave much like a mecanum, but without the traction limitations.

The procedure for calculating the wheel speed and steering angle for each of the 4 wheels is presented here.

For those who like to have a deeper understanding, the derivation of those equations is given here.




Last edited by Ether : 26-03-2011 at 23:42.
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


All times are GMT -5. The time now is 03:57.

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