That is, they use the change in distance with the back motor encoder, find the radius and apply the law of cosines to find the change in x. But when they combine this into one equation, they use the same theta as used for the two side tracking wheels. If you look at where it says
final equations" there is only one theta variable used, for both movement and strafing. Purdue, JAR, Lemlib and other sources seem to do all the same thing. But this makes no sense. The heading for forward and backwards movement has nothing to do with the heading for side to side movement. Why do we then use the same theta value for strafing and movement?
That isn’t possible. In those equations the change in heading and change in the back wheel are knowns, and the change in absolute position is the unknown.
but how do we know the change in heading. Of course, from the parallel encoders we know the change in heading is just left - right/distance. But when we start strafing, we only have the back encoder, so how do we know the angle for that arc?
What teambirb said. That’s like a special case and it’s obvious how the robot’s moved if the heading is the same as the previous cycle. You can see that in JAR’s odom code it’s like the only if statement.
Okay, I think I may have the wrong idea of what accounting for strafing means. At the picture above, isn’t the heading of the robot clearly changing? But heading isn’t suppose to change when the robot is “strafing”?
Think for yourself a bit. Is it possible to make an arc as shown in the picture you sent with your robot? If so, then the back tracking wheel is changing its position (strafing) and the heading is also changing (turning).