|
Re: Getting final vector from left & right drive encoders
It will be very difficult to make this accurate. First, let me point out that wheel slip can and does occur (to limit this, you'll pretty much need to limit your acceleration severely). In particular, this will make heading measurement difficult.
As a result, I'd recommend adding a heading gyro as well, and use that for your heading reference.
Then, each cycle, average the distances from the left and right encoders, and use that as the magnitude for the delta position vector. Use the gyro to obtain the heading for this vector. Then add this delta position vector to the current position each time. You will still get errors if wheel slip occurs -- this is why I suggested limiting acceleration (perhaps Jaguars in current control mode, or pseudo-current-control through velocity feedback?)
I'd explain the math and wheel slip-related caveats to this in more depth, but I simply do not have the time to do so right now. I wish you success (please let us know if you succeed!)
|