If the chassis is square
we can use (encR-encL)*radianToDegree/chassisDiam
to get an angle
(encL encR has been converted to millimetres.)
(chassisDiam is the Distance from the Left Wheel to the Right Wheel)
but my chassis is rectangular.
(The spacing between front and rear wheels is larger than that between left and right wheels.)
There is always a deviation in the angle obtained by using this formula.
Can this formula only be applied to square chassis or the deviation caused by different rotational speeds of left and right wheels?
The formula (encR - encL) / width
(producing the angle of the robot in radians) will work with a rectangular base (assuming of course encR
, encL
and width
are all in the same unit).
The width that you need to use is the horizontal (relative to the direction of rotation of the wheels) distance between the wheels with the encoders. As an example, in the following image if the red lines are the wheels with the encoders, the distance represented by the blue dashed line is the width
you need to measure.
Yes. That’s how I calculated it. I think it might be wheel skidding or an error caused by inconsistent rotational speeds on both sides.
If you are using your drive wheels to do this measurement, they almost definitely slip. If you can’t add any tracking wheels (free spinning wheels with just an encoder an no motor) to do the measurement, I would recommend being very careful about how fast you accelerate and decelerate during autonomous.
Even if I use Kalman filter, I still can’t solve the problem of gyroscope integral accumulative error perfectly.
Yes, I understand that it’s the same thing, I was just reiterating when saying that it would work.
I’m not too sure what you mean by this. If you’re trying to say that the wheels have to point in the same direction, then ya, I agree. If you’re trying to say that the rotation points of the wheels have to be directly across from each other (unlike the diagram I posted above), then no, that’s not correct. We included a proof on page 6-7 here.
I did assume that the drive either had no traction wheels or one per side (with them being directly across from each other), though, if that’s not the case, changing that would be one of the first things I would recommend. If my assumption was correct, it shouldn’t matter which wheels are used for measurement (unless the center of mass way off of the traction wheels causing them to slip); again, proof on page 6-7 here.
As a practical example, last year, we used unpowered wheels for angle (and position) tracking, and they were omni wheels far behind the turning center (and center of mass) of the robot as seen below.
Yes, you’re correct. I was mistaken with the source of driveline windup with H-drives. It’s actually the steering of the wheels that causes it, not the inherent turning of the vehicle. Took me a bit of math to go back through this and driveline windup to see it more clearly. Thanks.
So now I’m at a loss for why there is deviation from the formula. Slipping could certainly be involved.