Quote:
Originally Posted by Ether
Weight distribution! Yes, I can see where that might be a factor with our design.
Gyro. Interesting. How difficult was this to implement (develop and tune the algorithm)? Did you have success using gyro without closed-loop wheelspeed control?
Thanks!
~
|
Using the gyro was very simple - the algorithm was just:
Code:
for each motor
motorCommand = <result of holonomic drive calculations>;
if we are trying to go straight (e.g. yaw command is zero)
motorCommand += Kp * getGyroRate();
end if
Tell motor to go "motorCommand"
end for
As you can see, we didn't need encoders for this to work well for us. We determined "Kp" by having it read from a potentiometer (the throttle on our joystick) - we played with it until it seemed like there was a good balance between staying straight and being smooth (if Kp is too high, the robot will oscillate wildly). You can also use integral or derivative terms (e.g. PI, PD, or PID) in your controller if you aren't satisfied that this is fixing things for you.
We put encoders on our drive, but ended up only using them for distance tracking in autonomous mode rather than for velocity control (the gyro by itself was fine and was 4 less things that could fail).