View Single Post
  #1   Spotlight this post!  
Unread 21-01-2017, 12:31
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 213
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
PID loop speeds up as it gets closer to target?

Hey I'm programming a mecanum drive base and previously we used a simple function that slowed it down as we got closer to the target. However, we want to make a more complex PID loop so we can strafe and rotate at the same time more smoothly.

I am using a navx and the PIDController class. I based my changes off of the examples that the navx comes with. However, I'd rather not change too much of what we already have. All I want to do is compute the absolute speed that we want.

So the problem I'm having is that the output speed that it is giving me doesn't make sense. It starts slow and gets faster in the middle and slows down at the end. This causes us to rotate much slower than we could before.

Here is a link to my code:
https://github.com/team2053tigertron...e/TigerDrive.h

https://github.com/team2053tigertron...TigerDrive.cpp

Thank you for the help,
Drew
Reply With Quote