Quote:
|
Originally Posted by gnormhurst
BTW, our robot does not have wheel encoders. If your robot has wheel encoders and can actually control the speed of the wheels, not just the voltage to the motors, then squaring the motor PWM values in trentonDrive() is probably a bad idea, because it tends to mess up the idea that the ratio of the wheel speeds should not change when you change the Y axis. (To reduce joystick sensitivity, try squaring the joystick x/y axis values instead.)
In my case (no encoders), squaring the wheel values was simply an heuristic that worked well, perhaps because it made the motors' voltage/speed function more nearly linear.
|
I'm writing code for a drivetrain that absolutely needs an accurate velocity control (with a linear curve for inputs to outputs) for each wheel so i was planning on using a PID loop and encoders to get the velocity correct. I think the PID feedback loop would be more effective if the voltage was nearer to linear to speed. This way, the system could be made very responsive by having PID coefficients that work for the whole range, not a set of coefficients designed to work over a wide range of non linear values (probably a large proportional coefficient would do that). I would do the squaring right before the PID loop (and after a bunch of trigonometry, limiting, deadbanding, etc...) So basically, im asking why exactly the squaring would be bad with a PID loop?