View Full Version : 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.
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
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?
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
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?
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.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.