Odometry Testing
Procedure:
-
Each Odometry Wheel tested will go through the following configurations:
- 2-Dead Wheels + Internal BHI260AP IMU
- 2-Dead Wheels + External BNO055 IMU
- 3-Dead Wheels
-
Each configuration will go through a total of three test programs (see programming section below for more details)
-
Each test program will be ran 5 times, and the final data are those 5 values averaged (see results section for more details)
-
The autonomous libUse RoadRunner V1.0 Quickstart to tune each configuration
- Each step in the tuning procedure will be tuned 3 times, and values will be averaged to get a final constant (e.g,
kV
,kA
, etc.)
- Each step in the tuning procedure will be tuned 3 times, and values will be averaged to get a final constant (e.g,
Environment:
- Latest FIRST Tech Challenge Field Soft Tiles
- Lightly used (1 season)
- Vacuumed before each new odometry system used
- No game elements (trusses, stage door, backdrop, etc.)
- Wood floor and tarp underneath field
Environment does not change or get moved between tests!
Hardware:
-
Strafer® Chassis Kit V5 - goBILDA® - all parts lightly used for 1 season or less with no effects to performance
- Only modification of 435 RPM goBILDA® motors
- Same goBILDA® MOD 1.25 30 tooth gears as what come in the kit
- Added weights at the center of the robot until robot weighs 25 lbs
- All screws have red loctite applied to them to keep robot rigid between tests
-
IMUs for 2 Wheel Odometry:
- Both IMUs available and tested individually for 2 wheel testing
- Internal BHI260AP IMU (Newer Control Hubs)
- External BNO055 IMU
-
All tests done when battery is between 12-13v (measured via REV Driver Hub)
- All batteries are less than a year old
Only hardware changes between tests are changing the odometry module or IMU!
- CAD models for all odometry set-ups can be found here
Software:
-
Robot Library: RoadRunner V1.0 Quickstart (for both 3 Dead Wheels & 2 Dead Wheels)
-
Tuning steps: (each step should be ran 3 times, and the three values should be averaged to get the final constant)
-
ForwardPushTest
&LateralPushTest
: TheoreticalinPerTick
\( =\frac{\frac{96}{24.5}}{384.5} = 0.010190812 \) -
ForwardRampLogger
: 5 Tiles (120 inches) -
LateralRampLogger
: ~5.5 seconds of runtime -
AngularRampLogger
: ~7 seconds of runtime -
ManualFeedforwardTuner
&ManualFeedbackTuner
: 4.5 Tiles (108 inches)
-
-
Testing Specifications:
-
- Moves in every 30° direction from 0° to 330° back and forth a distance of 2 Tiles (48 inches) in a straight line
- At the end, the change in position for each odometry wheel is returned
- There is no turning
- This will all be executed with
.strafeTo(new Vector2d(x, y))
, not.lineToX(x)
or.lineToY(y)
-
- Repeats a cycle of various splines, turns, and turning while strafing 3 times
- At the end of each cycle, the change in position for each odometry wheel is returned
-
- A combination of Spline Test and Straight Test
- Repeats a cycle of various splines, turns, and strafes 3 times
- At the end of each cycle, the change in position for each odometry wheel is returned
-
Analysis
Each test program above (Straight Test, Spline Test, and Combined Test) returns two results at the end of the program - the pose of the robot after each cycle, and a graph that has data plotted after each trajectory is complete. During the program, telemetry of the pose of the most recent trajectory completed and distance the robot has linearly traveled will be displayed - these are the two results that will be plotted in the graph.
The graph will be made in FTC Dashboard. The y-axis will represent the current error after each trajectory has been completed via this formula:
On the other hand, the x-axis will represent distance travelled linearly. In other words, after each trajectory, a point is plotting representing the error of the robot based off distance traveled.
A perfect odometry wheel will always have a y-axis of 0, since there is no error no matter the distance traveled, but most odometry wheels with error will likely have a graph with positive correlation (slope is upwards), as the x-axis (distance traveled) will have a more and more profound effect. This occurs because positional error tends to compound.
Based off the graph and the points plotted, we can create a line of linear best fit using the formula \( y = mx + b \) from points plotted in Google Sheets from the data outputted from FTC Dashboard.
Results
Each of the 3 testing programs will be ran a total of 5 times for each of the 3 odometry configurations. Each run will give us 1 sample, which includes the details below:
- Pose after each cycle (ideal pose is 0,0)
- A graph in Google Sheets from the data outputted from FTC Dashboard that shows the error after each trajectory has been completed, along with a line of best fit and the raw data in a table
- The slope of the line of the best fit
In addition, each configuration will have a final sample that is created from the averages of each of the 5 samples.
This means that for each odometry wheel, there will be a total of \( (3 \times 3 \times 5) + 3 = 48 \) samples.
We can compare the final samples from each test program to come to a final conclusion for odometry wheels from various vendors..