|
Re: How to make the robot drive straight?
A number of ways.
1. You can continue using an open loop system with no sensors, but do a bit of calibration. Multiply the right side by .9 or .95 or whatever value corrects for the problem.
2. You can dig deeper and determine if it is due to differences in motors, bindings in gearboxes, tightness of chains, or resistance of electrical components, and try to correct the underlying issue.
3. You can close the loop and add sensors such as encoders to measure how fast the motors are running and correct it so that the fast side doesn't outrun the slow side.
Option 1 is trivially easy but will likely not solve the problem except at that power setting, with that battery voltage, on that carpet, etc. Option 2 is important to at least look for in case it is a serious inefficiency that you are trying to work around in software. Option 3 takes more thought and more work, but if tuned well, it is the most robust.
Greg McKaskle
|