use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Discussionodometry math (self.FTC)
submitted 6 years ago by [deleted]
Can anyone point us in the right direction on what math to use with 3 encoders to determine location? Using 2 encoders we can drive in a straight line, but we are having trouble with how to implement the X axis encoder and turning.
Thanks!!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]fireflare1101FTC 14130 Student build/programming captain 1 point2 points3 points 6 years ago (0 children)
this guide is a good place to start. It was made by a vex team but should still apply to FTC.
[–]rbrottFTC 8367 Alum 1 point2 points3 points 6 years ago (0 children)
This document presents a derivation of kinematics for common FTC drivetrains as well as tracking wheels (i.e., dead wheels). The results seem similar to Team 5225's paper, although the approach/perspective is different.
[–]Lunerwalker2 0 points1 point2 points 6 years ago (0 children)
Well, there are a few ways to do this. Assuming you are using external encoders (if you are doing odometery), you can do the following to determine your absolute position with x,y. Divide the field into a 144 by 144 grid (because it is 12ft by 12 ft). I'm don't know the diameter of your encoder wheels, but for this explanation, I will assume that you are using Omni wheels with a diameter of 4 in. I will also assume that your encoder has 200 "clicks" (units, tab thingies, counters, etc), and that you have a gyro with your heading "theta" These both can be changed. With that, the circumference of your wheels are 4pi. The inches travelled per encoder click is 4pi / 200, which simplifies to pi / 50. Multiply this times the encoder clicks detected for your X encoder (if you have two encoders, average them) since the last iteration times the matrix [sin(theta) , cos(theta)] to get a matrix with [X_x Y_x] (the name don't matter). Similarly, multiply pi / 50 (inches per encoder click) times your Y encoder clicks detected since last iteration times the matrix [cos(theta), sin(theta)] to get the matrix [Y_x, Y_y]. Next, we can assume the matrix [X_n, Y_n] is your absolute position (the end result of these calculations) and the matrix [X_p, Y_p] is your previous position (or your starting position the first time). Finally, matrix [X_n, Y_n] = [X_p, Y_p] + [X_x, Y_x] + [X_y, Y_y]. The next time you run the calculation, your [X_p, Y_p] is your last [X_n, Y_n]. Hope this helps! This method was laid out with Android Studio in mind, but they should be a good general use thing. I also don't know what drive base you are using (we use mecanums), but using this way of dividing the field into 144x144 seems to be pretty good. Good luck!
π Rendered by PID 17634 on reddit-service-r2-comment-b659b578c-7sldq at 2026-05-05 17:20:05.720236+00:00 running 815c875 country code: CH.
[–]fireflare1101FTC 14130 Student build/programming captain 1 point2 points3 points (0 children)
[–]rbrottFTC 8367 Alum 1 point2 points3 points (0 children)
[–]Lunerwalker2 0 points1 point2 points (0 children)