|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help with TrajectoryLib
Hello,
Based on Team 254's TrajectoryLib, can somebody explain how I can find the kTurn, kA, and kV values? Additionally, what do these values represent and control? Thank you, Roboprog77 Last edited by Roboprog77 : 03-31-2016 at 01:26 PM. |
|
#2
|
||||
|
||||
|
Re: Help with TrajectoryLib
See the presentation that 254 gave at the 2015 Championships Conference (relevant part)
|
|
#3
|
|||
|
|||
|
Re: Help with TrajectoryLib
Could you explain how to find kTurn and what it represents and controls. I could not find kTurn in 254's presentation.
Thank you for your help, Roboprog77 |
|
#4
|
|||
|
|||
|
Re: Help with TrajectoryLib
kTurn is multiplied by the heading error (difference between current heading and desired heading of the trajectory segment) and added/subtracted to the left and right outputs, respectively. This helps the robot stay facing the right heading while it follows the trajectory. Another way to think about it is the P constant of a PID controller for the heading with I=0, D=0.
This the code that implements this behavior. |
|
#5
|
|||
|
|||
|
Re: Help with TrajectoryLib
kTurn was the P gain for a controller which tried to keep the robot's heading (measured by a gyro) on course with where it currently was in a pre computed 2d trajectory. I'd tune this by writing some code that tries to get your robot to turn 45 degrees in place and picking a gain that gets close the robot to the target with minimal overshoot. If you run the full controller and bot starts to wander off course and can't make harder turns, increase the gain. If you see oscillation, decrease the gain. If your drivetrain is relatively well balanced efficiency wise, you just need to be in the right ballpark.
Do you need 2d trajectories for your task? |
|
#6
|
|||
|
|||
|
Re: Help with TrajectoryLib
Quote:
|
|
#7
|
||||
|
||||
|
Re: Help with TrajectoryLib
Not that I'm using 2D trajectories, but in what cases would you use them? When did you guys use them?
|
|
#8
|
||||
|
||||
|
Re: Help with TrajectoryLib
Quote:
We are using them to drive in autonomous - we initially did not have vision tracking and used them to drive up to the batter and shoot in autonomous. Well, in theory we did. We didn't have much time to test it and were never confident enough to run it in a real match. We also just thought it was interesting and it was definitely a fun exercise to try and understand TrajectoryLib. Last edited by axiomofdarkness : 04-13-2016 at 09:52 PM. Reason: Forgot to add quote block |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|