 # Odometry Help

At our club we are working on implementing odometry into our autonomous but have no idea of where to start from. Any help would be greatly appreciated.

1 Like
6 Likes

i think okapilib in PROS has some odometery. Correct me if im wrong

Combination of a vertical gyro plus motor encoders and some circle geometry should work.

IMU is fine for odometry, but IME is not. The motor itself will influence the raw position reading you’re getting, therefore the input will be biased, resulting in an inaccurate measurement of global position. There is a reason why teams use tracking wheels for odometry.

1 Like

is the odometry using IQ or V5?

1 Like

IQ has no shaft encoders for Odom…

2 Likes

As to not make another thread, I’ll post my question here:

How would I determine the tracking center of my robot? From what I understand, it should be perpendicularly equidistant from both side tracking wheels, but where should it be placed relative to the third (strafe) tracking wheel? In addition, how should I go about measuring the distance from the tracking center to each tracking wheel? Would I stop my measurement at the wheel or at the shaft encoder?

Right as I’m about to post this, I was thinking, and I’m guessing that the position of the tracking center relative to the strafe wheel would just be the same distance as it is to each side wheel, is that correct?

Much thanks.

1 Like

I believe that the tracking center is the center of rotation of your robot (ex: if you have a tank drive and set one side to move forward and the other side going backward; what point does your robot spin around? That point is the tracking center). The distances from the tracking center to each of the three wheels is computed into the math, so they do not all have to be the same (I think, but I am not sure. Regardless, it would make the math much easier). You would measure the distance from the center of the rim of the wheel (the part that touches the ground) to the tracking center. If you have not read it already, I would suggest you read the Intro to Position Tracking document put out by the Pilons (team 5225A).
This is also my first year setting up an odometry system, so take all the above information with a grain of salt.

2 Likes

The tracking center can be chosen arbitrarily, but motion control using odom is more predictable if you make the tracking center the center of rotation.

5 Likes

Thank you! If I could, I’d like to ask one more question, when measuring the distance from the tracking center to the wheels, would I measure from the center to the physical center of the wheel, or just where the axel goes through the encoder?

I only use two tracking wheels and an IMU, so for me, the wheel distances from the center are completely arbitrary, only deciding where the tracking center is. For this reason, I don’t really give the measurements much thought, I just try to get pretty close. However, if you are using three tracking wheels with two parallel for calculating the angle, the distances from center are pretty important; if they are wrong, your angle calculation will be wrong.

To figure out what the right values are, I recommend experimental tuning:

1. Turn the robot a certain known amount. A bigger turn is better, like 10 rotations, because error will be exaggerated, and easier to see.
2. The robot will have measured the rotation incorrectly. If it was more than expected, the distances to center were too small, if it was less, they were too large. This should be intuitive: the farther the tracking wheels are from the center, the more ticks the encoder will measure for a given turn, because it travels a greater distance. It also makes sense mathematically, because s_L and s_R are in the denominator of the angle equation from the position tracking document ( ∆θ = (∆L - ∆R)/(s_L + s_R)), and a greater denominator leads to a smaller result.
3. Correct the distance values with a ratio between what the rotation should have been and what it actually was.
4. Repeat until you think the angle measurement is accurate enough.

Also be aware that you should follow a similar process for tuning the diameters of the tracking wheels before tuning the center distances. The values VEX tells us for diameter usually don’t measure distance accurately, so it needs to be tuned as well. When I do this, I drive the robot a certain distance forward then adjust the wheel diameter value in my code. The center distances for turning are inversely proportional (because they are in the denominator), while the wheel diameter is directly proportional, because they are in the numerator when calculating distance. So, if the measured distance traveled was greater than it should have been, I decrease the diameter value in the code.

6 Likes

Thank you very much! This helps a lot.

1 Like