|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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. |
|
#2
|
|||||
|
|||||
|
Re: Trapezoidal Profiling for Drive System
Quote:
-RC |
|
#3
|
||||
|
||||
|
Re: Trapezoidal Profiling for Drive System
I did try and look at their code however I am not fluent in C++. Is there a java translation or psudo code version?
|
|
#4
|
|||||
|
|||||
|
Re: Trapezoidal Profiling for Drive System
Quote:
But I'd PM Austin Shuh, he'd really be able to help you out with the motion your looking for. -RC |
|
#5
|
||||
|
||||
|
Re: Trapezoidal Profiling for Drive System
Quote:
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? |
|
#6
|
||||
|
||||
|
Re: Trapezoidal Profiling for Drive System
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|