|
Re: Using PID on Talon SRX with Gyro for feedback
Put an encoder on each side (left and right).
Average the left and right encoder counts and use that as the process variable for separate left/right closed-loop distance controllers.
Use your gyro reading to keep the vehicle driving straight. Use the gyro reading as the process variable for separate left/right closed-loop orientation controllers.
Sum the left (and right) distance and orientation controller outputs and use that sum as the command for the left (and right) wheels.
|