Go to Post I'm so conflicted right now. On one hand, you made the same page as a celebrity. On the other hand.... Justin Bieber. - Akash Rastogi [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 27-08-2011, 17:31
ratdude747's Avatar
ratdude747 ratdude747 is offline
Official Scorekeeper
AKA: Larry Bolan
no team
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Madison, IN
Posts: 1,060
ratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond repute
Re: Swerve Gear Box

Quote:
Originally Posted by Ether View Post
It's really really simple, unless you actually do it.


especially if it is "unicorn drive". it can be made to work but trust me, it involves a LOT of code. (you would know...)

perhaps the worst part for ANY swerve is deciding how you want it to drive...

hence why I am more of a fan of mecanum than swerve for competition bots that strafe... if I am going to write a lot of code, I'd rather it be on my manipulator/camera tracking than on my drive code. that is, unless you pull a 148 and have crab and no manipulator (tumbleweed, 2008), which in that situation was nothing but epic...

for off season/fun, any swerve can be fun... or not fun... it depends on how you go about it.
__________________
Dean's List Semi-finalist 2010
1747 Harrison Boiler Robotics 2008-2010, 2783 Engineers of Tomorrow 2011, Event Volunteer 2012-current

DISCLAIMER: Any opinions/comments posted are solely my personal opinion and does not reflect the views/opinions of FIRST, IndianaFIRST, or any other organization.
  #2   Spotlight this post!  
Unread 27-08-2011, 17:40
Happy Birthday! 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: Swerve Gear Box

Quote:
Originally Posted by ratdude747 View Post
especially if it is "unicorn drive". it can be made to work but trust me, it involves a LOT of code. (you would know...)

perhaps the worst part for ANY swerve is deciding how you want it to drive...

hence why I am more of a fan of mecanum than swerve for competition bots that strafe... if I am going to write a lot of code, I'd rather it be on my manipulator/camera tracking than on my drive code. that is, unless you pull a 148 and have crab and no manipulator (tumbleweed, 2008), which in that situation was nothing but epic...

for off season/fun, any swerve can be fun... or not fun... it depends on how you go about it.
Well, I see no problem with it because it's the off season. I am not constraint for time. Also, I still don't see how hard it can be. Just check each wheel if their velocity is within tolerance, if all the wheels are rotated with in the right tolerance and if they are not, make them.

PID loops are not hard. It is just all ratios, it just sounds hard. Sure, it is a lot of code, but it does not make it any harder. The hardest thing might just be incorporating a gyro scope, but that is not all that difficult unless there is a lot of inaccuracies in the readings.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #3   Spotlight this post!  
Unread 27-08-2011, 17:43
lemiant's Avatar
lemiant lemiant is offline
the Dreamer
AKA: Alex
FRC #4334 (Alberta Tech Alliance)
Team Role: Leadership
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Calgary, AB, Canada
Posts: 562
lemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond reputelemiant has a reputation beyond repute
Re: Swerve Gear Box

Quote:
Originally Posted by davidthefat View Post
Well, I see no problem with it because it's the off season. I am not constraint for time. Also, I still don't see how hard it can be. Just check each wheel if their velocity is within tolerance, if all the wheels are rotated with in the right tolerance and if they are not, make them.

PID loops are not hard. It is just all ratios, it just sounds hard. Sure, it is a lot of code, but it does not make it any harder. The hardest thing might just be incorporating a gyro scope, but that is not all that difficult unless there is a lot of inaccuracies in the readings.
You sound like all the people who say:
Quote:
We will make our robot auto target stuff with the camera, its not that hard.
It doesn't seem hard, but it is. You can do it with enough time dedication and skill, but that doesn't stop it from being hard.
  #4   Spotlight this post!  
Unread 27-08-2011, 17:45
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,986
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: Swerve Gear Box

Quote:
Originally Posted by davidthefat View Post

I see no problem with it ...

I still don't see how hard it can be...

Just check each wheel...

PID loops are not hard...

It is just all ratios...

it just sounds hard...

that is not all that difficult...
You talk a good game, David.


  #5   Spotlight this post!  
Unread 27-08-2011, 17:49
Joe G.'s Avatar
Joe G. Joe G. is offline
Taking a few years (mostly) off
AKA: Josepher
no team (Formerly 1687, 5400)
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2007
Location: Worcester, MA
Posts: 1,431
Joe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond reputeJoe G. has a reputation beyond repute
Send a message via AIM to Joe G.
Re: Swerve Gear Box

When designing something complex, it is very important to have faith that you can do it.

However, do not confuse faith in your ability to overcome challenging obstacles, with the difficulty of the obstacles themselves.

Believe that you can do it, but believe that it will be hard, take a while, and throw unexpected challenges at you every step of the way.
__________________
FIRST is not about doing what you can with what you know. It is about doing what you thought impossible, with what you were inspired to become.

2007-2010: Student, FRC 1687, Highlander Robotics
2012-2014: Technical Mentor, FRC 1687, Highlander Robotics
2015-2016: Lead Mentor, FRC 5400, Team WARP
2016-???: Volunteer and freelance mentor-for-hire
  #6   Spotlight this post!  
Unread 27-08-2011, 18:05
Happy Birthday! 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: Swerve Gear Box

P= Error*Pconstant
I=((Previous Error*change in time + Error*change in time)/2)* Iconstant
D=((Error-PreviousError)/change in time)* Dconstant

output = P+I+D + 127

60 < Pconstant < 95
5 < Iconstant < 25
0 < Dconstant < 5

The time can be obtained from the FPGA
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.

Last edited by davidthefat : 27-08-2011 at 18:10.
  #7   Spotlight this post!  
Unread 27-08-2011, 18:21
Andrew Schreiber Andrew Schreiber is offline
Data Nerd
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,049
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: Swerve Gear Box

Quote:
Originally Posted by davidthefat View Post
P= Error*Pconstant
I=((Previous Error*change in time + Error*change in time)/2)* Iconstant
D=((Error-PreviousError)/change in time)* Dconstant

output = P+I+D + 127

60 < Pconstant < 95
5 < Iconstant < 25
0 < Dconstant < 5

The time can be obtained from the FPGA

Believe me when I say that this is the easy part of a PID. I'm sure Ether knows better than I but my experience has always been contrary to GI Joe's claim that knowing is half the battle. Knowing is maybe 10% of the battle. 10% is actually writing the code. and 80% is a mix of debugging and ripping your hair out. There may be some crying/cursing mixed into the last section depending on how you react.
__________________




.
  #8   Spotlight this post!  
Unread 27-08-2011, 18:58
Cuog's Avatar
Cuog Cuog is offline
Registered Linux User: 390661
AKA: Alex
FRC #0422
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2004
Location: Richmond, Virginia
Posts: 852
Cuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond repute
Send a message via AIM to Cuog
Re: Swerve Gear Box

My first question to you is what machining capabilities do you and your team have? You'll need someone experienced in machining to thousandths of an inch accuracy. And preferably someone who has experience working with gears. I can tell you it will take an incredible amount of talent to make a working swerve module with a drill press and a hacksaw.

Second PID loops are great and all, but there's a lot more to it than that. To make an intuitive setup you'll need to figure out exactly what way you want to map user input to outputs. There are about 10 ways to do it that will work, but a lot fewer that are considered good. Again you'll need to scale these inputs usefully.

My first time programming a omni directional drive it was very easy. It took only 3 lines of code(4 omni wheels at 90 degrees from one another). And yeah it worked first go kudos to me. Then one of the drivers said what happens when we turn, tapped the joystick full left for a second and the robot spun in place at 14 feet per second with its arm sticking out 4 feet almost hitting several people. Ok that's easy to fix, just tone down the spin modifier. That worked to keep it from being a death trap, but then thanks to slowing its turn, getting a smooth strafe/twist couldn't happen over a certain speed because the twist modifier couldn't twist enough.

In the end my pretty little 3 lines of code which worked turned into a pretty large function to control the omni bot properly. And I didn't even use PID, not to mention there's a little bit more to keep track of in a swerve drive.

I'm sure you're thinking pfft that's nothing, I got this. You probably will get it eventually, but keep in mind the sheer number of stumbling points waiting for you, and if you attack it with the same arrogance I read in your posts, you'll lose a lot of the people whose help you will need to complete the project.
__________________
KK4KQO
http://voltair.us
Too many projects, too little time.
  #9   Spotlight this post!  
Unread 27-08-2011, 19:21
Happy Birthday! 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: Swerve Gear Box

Quote:
Originally Posted by apalrd View Post
I will disagree with you on this one.

Our 2011 robot has about as much code running the drivetrain as it does running the elevator/claw system as a whole (minibot is separate, and much smaller).

Why?

Closed-loop drive control has a few blocks to it, logic to coast out stops, logic to hold position, gain scheduling based on shift state, etc.

Autoshifting has a block to it, its a lot of tuned logic operations.

Lift piston management has a few blocks, to lift the rear wheels when turning, and another one to lift the inner one in an arc.

HMI has a bunch of blocks, for arc management, speed derating at high elevator positions, drive line inversion, and such.

The elevator and wrist, on the other hand, has:

A really big state machine that actually runs the elevator
A reality check that prevents driving through the elevator with the wrist (or the wrist with the elevator), some of the going backwards logic.
A P controller with gain scheduling
An anti-stall-death algorithm

What I'm saying is that the little code things you write to optimize performance in the drivetrain add up to the one really big state machine plus a few other blocks you write for the mechanism. For us, the optimization effort is worth it, I guess that depends on your teams coding resources.
I'll say this: 90% of all our code was probably put into the drive; my mentor said that this year's robot was probably the smoothest driving robot our team has made. That says something about really putting effort into it. I admit, the code for rest of the robot was pretty much chopped together in an hour. The drive took weeks of optimization and yet I was still not able to optimize it to the best I can because a lot of my time went into testing sensors and stuff like that.


Quote:
Originally Posted by Cuog View Post
My first question to you is what machining capabilities do you and your team have? You'll need someone experienced in machining to thousandths of an inch accuracy. And preferably someone who has experience working with gears. I can tell you it will take an incredible amount of talent to make a working swerve module with a drill press and a hacksaw.

Second PID loops are great and all, but there's a lot more to it than that. To make an intuitive setup you'll need to figure out exactly what way you want to map user input to outputs. There are about 10 ways to do it that will work, but a lot fewer that are considered good. Again you'll need to scale these inputs usefully.

My first time programming a omni directional drive it was very easy. It took only 3 lines of code(4 omni wheels at 90 degrees from one another). And yeah it worked first go kudos to me. Then one of the drivers said what happens when we turn, tapped the joystick full left for a second and the robot spun in place at 14 feet per second with its arm sticking out 4 feet almost hitting several people. Ok that's easy to fix, just tone down the spin modifier. That worked to keep it from being a death trap, but then thanks to slowing its turn, getting a smooth strafe/twist couldn't happen over a certain speed because the twist modifier couldn't twist enough.

In the end my pretty little 3 lines of code which worked turned into a pretty large function to control the omni bot properly. And I didn't even use PID, not to mention there's a little bit more to keep track of in a swerve drive.

I'm sure you're thinking pfft that's nothing, I got this. You probably will get it eventually, but keep in mind the sheer number of stumbling points waiting for you, and if you attack it with the same arrogance I read in your posts, you'll lose a lot of the people whose help you will need to complete the project.
I have everything in my head. Yes I am arrogant, but from years of just living, I noticed that people tend to talk things up. Like how calculus is "so hard" or how physics was such a hard class. It usually ends up not as hard as they say it is. Like what you went through omni. I went through the same thing (it was the first system I was assigned to code), but I find those as minor discomforts. I do see what you are saying, but those are expected.

Well, I am saying that I am not scared of 30 file projects with thousands of lines of code. I actually like doing that; that is the whole fun of coding. It is those times that I feel like quitting and bashing my head on the wall that really satisfies me. It's because you really have to experience suffering before you know what joy really is like. I like tackling big projects head on.

As far as machining capabilities go, I can probably call somebody up to help make it and teach the team.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #10   Spotlight this post!  
Unread 27-08-2011, 22:21
Cuog's Avatar
Cuog Cuog is offline
Registered Linux User: 390661
AKA: Alex
FRC #0422
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2004
Location: Richmond, Virginia
Posts: 852
Cuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond repute
Send a message via AIM to Cuog
Re: Swerve Gear Box

Quote:
Originally Posted by davidthefat View Post
As far as machining capabilities go, I can probably call somebody up to help make it and teach the team.
So in other words you don't have any. I think that you are attempting to take on a project that is beyond the scope of what you're setup to handle. Based on your other threads I also have to ask is this a personal project or a team project? If its a team project, have you unilaterally decided that this is what the team will be doing, or have you actually discussed the project with the team to decide if its something everyone else wants to work on as well?
__________________
KK4KQO
http://voltair.us
Too many projects, too little time.
  #11   Spotlight this post!  
Unread 27-08-2011, 20:06
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,986
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: Swerve Gear Box

Quote:
Originally Posted by Andrew Schreiber View Post
80% is a mix of debugging and ripping your hair out. There may be some crying/cursing mixed into the last section depending on how you react.
I got a chuckle out of that. Thanks :-)


  #12   Spotlight this post!  
Unread 27-08-2011, 20:08
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,986
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: Swerve Gear Box

Quote:
Originally Posted by davidthefat View Post
P= Error*Pconstant
I=((Previous Error*change in time + Error*change in time)/2)* Iconstant
D=((Error-PreviousError)/change in time)* Dconstant

output = P+I+D + 127

60 < Pconstant < 95
5 < Iconstant < 25
0 < Dconstant < 5

The time can be obtained from the FPGA
Not sure what point you were trying to make with the above.

But I did notice you left out how you plan to calculate "error".


  #13   Spotlight this post!  
Unread 27-08-2011, 20:10
Happy Birthday! 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: Swerve Gear Box

Quote:
Originally Posted by Ether View Post
Not sure what point you were trying to make with the above.

But I did notice you left out how you plan to calculate "error".

I thought that was obvious. error = (desired input- current input)/desired input
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.

Last edited by davidthefat : 27-08-2011 at 20:15.
  #14   Spotlight this post!  
Unread 27-08-2011, 20:12
Andrew Schreiber Andrew Schreiber is offline
Data Nerd
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,049
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: Swerve Gear Box

Quote:
Originally Posted by davidthefat View Post
I thought that was obvious. error = (current input- desired input)/desired input
That is percent error unless I am having one of my moments...
__________________




.
  #15   Spotlight this post!  
Unread 27-08-2011, 20:13
Happy Birthday! 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: Swerve Gear Box

Quote:
Originally Posted by Andrew Schreiber View Post
That is percent error unless I am having one of my moments...
Yes it is, you are correct. It has to be between 1 and -1 or else the output would be too big. I actually I noticed an error, it's desired-current. not the other way around.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
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 07:44.

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