![]() |
Using PID for traction control (help!)
Hi all,
I'm back to working on traction control code, and it doesn't seem to work :( The first thing that I'm trying to get working is to get the wheels to go at the same velocity as the robot. Here's the setup: we have an omni (trailer) wheels on each side of the robot, plus encoders on the omnis and on each transmission. This lets us see the velocity the wheels are going, and the velocity the robot (via the omnis) is going. Here is my algorithm for maintaining the velocity indicated by the omni wheels, in pseduocode: Code:
pidSetpoint = getOmniVelocity() // get velocity according to encoder on omni wheelSecondly, my plan is to decide if we're slipping (getOmniVelocity() and getTransmissionVelocity() differ enough) and then kick in the PID correction code until the slipping is over. Does anyone have any real-world success using this (albeit simplistic) method? I'm worried that it will become jerky. |
Re: Using PID for traction control (help!)
I would have to see more more of your code to tell for sure, but by your description it sounds like your loop just needs some tuning. The spinning in circles is classic PID overshoot.
We use a box with 3 pots (one for P, I, and D) so we can tune without reloading the code. |
Re: Using PID for traction control (help!)
Turns out that left and right were swapped:mad: The person on our software them (I'm looking at you, Ben) who wrote wrappers over the motors got them mixed up. As a result, we have spent about 2 weeks working on inexplicably buggy drive code.:mad: :mad: :mad:
It works now, though.:D |
| All times are GMT -5. The time now is 09:07. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi