Tracking x y coordinates using GTS

Hi, I’ve been reading some threads on using accelorometers and gyroscopes and performing integrations to track the x y coordinate of a robot. It seems that by what I see there is some vibration issues and filtering issues related to doing this.

To try to remain as simple as possible I am wishing to use the gear tooth sensors to monitor the position of each wheel to determine the x y coordinate of the robot. I hope to use the difference of wheel travel sensed by each sensor to indicate how far the robot has rotated and traveled in a direction.

Does anyone have any advice as to how I could do this practically? This reminds me of line integrals.


This thread has some gear tooth sensor code posted by one of the mentors of my team.

Using a switch of some sort to set the initial position of the robot, it would be possible to use the sensors to determine the x y position of the robot. There may be some trig involved, but I mostly see a need for extreme usage of the pythagorean theorum. Please remember that the sqaure root function takes a long time to execute on the PIC processor, so use it sparingly.

I haven’t had much luck with the gear tooth sensors. You might be better off with an encoder. Their about 50 bucks but extremely accurate. If you buy an encoder with an index of 200 and mount it to the shaft of your drive wheels it will count 200 per 1 revolution of your wheel. So if you had a 8inch wheel, it would count every time you move about .126 of an inch. Also it will tell you direction the wheel is turning, unlike the gear tooth sensor.

Right now I’m trying to figure out how to use a combination of our two encoders and gyro to determine our location on an (X,Y) plane. Has anyone had any luck with this?


Thanks Will! Do you have any suggestions as to an encoder?

For distance you’ll do fine with encoders/GTS, but the slip when you turn will be too variable to accurately keep track of the amount of turning. Also, the errors will accumulate if you’re not careful.

Turning is best sensed with a gyro and timer: If the rate gyro says you’re turning at 15 degrees per second, and you do that for 6 seconds, you’ve gone 90 degrees to a fairly high degree of accuracy.

what about using the accelerometers to know how much the robot has traveled? and the gyro for the change of angles… that way you also cover the x y axis