Go to Post When I encounter Dave at competitions and meetings, I find him to be kind, helpful, almost too nice. When I read his hints, I find him to be EVIL! - Ken Loyd [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-02-2012, 22:06
theNerd's Avatar
theNerd theNerd is offline
Registered User
FRC #3329 (Cam Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2110
Location: St. Marys
Posts: 51
theNerd is an unknown quantity at this point
Trapezoidal Profiling for Drive System

Recently I've been working on a new drive system that will allow our robot to drive very smooth this year. I learned of trapezoidal profiling and was thinking of integrating that technique into our drive code this year to achieve this. My main goal is to create a class that will take a polar coordinate as a position input and compute the necessary means of getting to that point in a smooth fashion. Could anybody help me in determining how to go about doing this?

PS: if there is a way to implement PID loops into this that would be awesome.
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2012, 22:48
R.C.'s Avatar
R.C. R.C. is offline
2017... Oooh Kill em, Swerve!
AKA: Owner, WestCoast Products
FRC #1323 (MadTown Robotics)
Team Role: Engineer
 
Join Date: Feb 2008
Rookie Year: 2006
Location: Madera, CA
Posts: 2,175
R.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond repute
Re: Trapezoidal Profiling for Drive System

Quote:
Originally Posted by theNerd View Post
Recently I've been working on a new drive system that will allow our robot to drive very smooth this year. I learned of trapezoidal profiling and was thinking of integrating that technique into our drive code this year to achieve this. My main goal is to create a class that will take a polar coordinate as a position input and compute the necessary means of getting to that point in a smooth fashion. Could anybody help me in determining how to go about doing this?

PS: if there is a way to implement PID loops into this that would be awesome.
I would take a look at Cheesy Poofs 2011 Code, it has trapezoidal motion in autonomous and their code is very very well written.

-RC
__________________
R.C.
Owner, WestCoast Products || Twitter
MadTown Robotics Team 1323
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2012, 14:13
theNerd's Avatar
theNerd theNerd is offline
Registered User
FRC #3329 (Cam Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2110
Location: St. Marys
Posts: 51
theNerd is an unknown quantity at this point
Re: Trapezoidal Profiling for Drive System

Quote:
Originally Posted by R.C. View Post
I would take a look at Cheesy Poofs 2011 Code, it has trapezoidal motion in autonomous and their code is very very well written.

-RC
I did try and look at their code however I am not fluent in C++. Is there a java translation or psudo code version?
Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2012, 14:24
R.C.'s Avatar
R.C. R.C. is offline
2017... Oooh Kill em, Swerve!
AKA: Owner, WestCoast Products
FRC #1323 (MadTown Robotics)
Team Role: Engineer
 
Join Date: Feb 2008
Rookie Year: 2006
Location: Madera, CA
Posts: 2,175
R.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond repute
Re: Trapezoidal Profiling for Drive System

Quote:
Originally Posted by theNerd View Post
I did try and look at their code however I am not fluent in C++. Is there a java translation or psudo code version?
Unsure Man,

But I'd PM Austin Shuh, he'd really be able to help you out with the motion your looking for.

-RC
__________________
R.C.
Owner, WestCoast Products || Twitter
MadTown Robotics Team 1323
Reply With Quote
  #5   Spotlight this post!  
Unread 14-02-2012, 14:31
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
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: Trapezoidal Profiling for Drive System

Quote:
Originally Posted by theNerd View Post
My main goal is to create a class that will take a polar coordinate as a position input and compute the necessary means of getting to that point in a smooth fashion.
Couple of questions:

Is the polar coordinate specified with respect to a coordinate system fixed to the robot or to the field?

Do you want to do this for arbitrary start and finish headings?

What type of drivetrain are you using?

Reply With Quote
  #6   Spotlight this post!  
Unread 15-02-2012, 19:35
theNerd's Avatar
theNerd theNerd is offline
Registered User
FRC #3329 (Cam Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2110
Location: St. Marys
Posts: 51
theNerd is an unknown quantity at this point
Re: Trapezoidal Profiling for Drive System

Quote:
Originally Posted by Ether View Post
Couple of questions:

Is the polar coordinate specified with respect to a coordinate system fixed to the robot or to the field?

Do you want to do this for arbitrary start and finish headings?

What type of drivetrain are you using?

I am using the relative coordinates. What I did was use these equations: magnitude= (rightDistance + leftDistance)/2 and angle = (rightDistance - leftDistance)/wheelContactWidth to derive the left and right wheel distances that the robot needs to travel to get to the proper coordinate and then I just feed those values to two PID controllers (one for each motor). We are using a tank drive system. I know that the Integral controller would work a little, however I think that a trapezoidal profile would work better.
Reply With Quote
Reply


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 06:45.

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