VingVing Robot LogoVingVing Robot

Documentation v0.0.3

VingVing Robot Docs

Testing Your Tuning

Verify your robot's path following accuracy with geometric test patterns

Why Test?

After tuning PID controllers, these test patterns help you verify accuracy and identify remaining issues. Each test reveals different aspects of your tuning quality.

Line Test: Validates straight-line accuracy and stopping precision
Triangle Test: Tests sharp turns and heading control
Circle Test: Evaluates smooth curved path following

Line Test

The simplest test: drive forward 48 inches in a straight line. Tests translational PID and stopping accuracy.

Running the Test:

1.Navigate to: Tuning → Testing → Line Test
2.Place robot at starting position, facing forward
3.Clear 48+ inches of space ahead
4.Press START - robot will drive forward
5.Watch FTC Dashboard for real-time position tracking

What to Look For:

Perfect Result:Robot drives straight, stops exactly at 48 inches, no overshoot
Overshooting:Reduce translational P coefficient, increase D coefficient
Stops Short:Increase translational P coefficient or F coefficient
Drifts Sideways:Check heading PID tuning, verify IMU calibration
Expected Telemetry Output
Target: (48.0, 0.0, 0.0°)
Current: (47.8, 0.2, 0.1°)
X Error: 0.2 in
Y Error: 0.2 in
Heading Error: 0.1°
Status: Path Complete ✓

Triangle Test

Drives in a 24-inch equilateral triangle pattern. Tests sharp 120° turns and corner handling.

Path Description:

The robot follows three sides of an equilateral triangle:

  • Side 1: Forward 24 inches
  • Turn 120° left
  • Side 2: Forward 24 inches
  • Turn 120° left
  • Side 3: Forward 24 inches back to start

What to Look For:

Perfect Result:Returns to within 1 inch of starting position, sharp clean corners
Rounded Corners:Increase heading P coefficient for sharper turns
Doesn't Return to Start:Check localization accuracy, verify encoder directions
Oscillates at Corners:Reduce heading P, increase heading D to dampen oscillation
Triangle Test Path Code
follower.followPath(
    new BezierLine(new Point(0, 0, Point.CARTESIAN))
        .setConstantHeadingInterpolation(Math.toRadians(0)),
    new BezierLine(new Point(24, 0, Point.CARTESIAN))
        .setConstantHeadingInterpolation(Math.toRadians(120)),
    new BezierLine(new Point(12, -20.78, Point.CARTESIAN))
        .setConstantHeadingInterpolation(Math.toRadians(240)),
    new BezierLine(new Point(0, 0, Point.CARTESIAN))
        .setConstantHeadingInterpolation(Math.toRadians(0))
);

Circle Test

Follows a 24-inch radius circle. The ultimate test for smooth path following and centripetal PID tuning.

Path Description:

The robot drives in a complete circle with 24-inch radius using Bezier curves to approximate the circular path. This test is crucial for validating centripetal force correction.

What to Look For:

Perfect Result:Smooth circular path, returns to start within 1 inch, constant speed throughout
Cuts Corners (Spiral Inward):Increase centripetal P coefficient to push robot outward on curves
Swings Wide (Spiral Outward):Decrease centripetal P coefficient, verify velocity measurements
Jerky/Stuttering Motion:Increase drive D coefficient for smoother acceleration changes
Circle Test Path Code
// Circle approximated with Bezier curves
double radius = 24.0;
double controlDistance = radius * 0.551915024494; // Magic number for circle

follower.followPath(
    new BezierCurve(
        new Point(0, radius, Point.CARTESIAN),
        new Point(0, radius, Point.CARTESIAN),
        new Point(controlDistance, radius, Point.CARTESIAN),
        new Point(radius, controlDistance, Point.CARTESIAN),
        new Point(radius, 0, Point.CARTESIAN)
    ).setConstantHeadingInterpolation(Math.toRadians(0)),
    // ... 3 more curve segments to complete circle
);

Interpreting Test Results

Use FTC Dashboard

Watch the real-time path visualization on FTC Dashboard. The green line shows the target path, and the robot's actual position is shown as a dot. You should see minimal deviation.

Check Telemetry Errors

Monitor X Error, Y Error, and Heading Error values. During path following, errors should stay under 2 inches and 5 degrees. At path completion, under 0.5 inches and 2 degrees.

Run Multiple Times

Test consistency by running each test 3-5 times. Good tuning produces repeatable results. If results vary widely, check for mechanical issues or loose connections.

Test at Match Speed

Run tests at the same speeds you'll use in competition. PID performance can change significantly at different velocities. Tune for your typical autonomous speeds.

Testing Tips

💡 Start Simple

Always pass the Line Test before moving to Triangle or Circle tests. Each test builds on the previous one's tuning requirements.

💡 Use Field Tiles

Test on actual field tiles when possible. Different surfaces (carpet, foam tiles, wood) can significantly affect traction and therefore PID performance.

💡 Document Your Values

Keep notes of PID values and test results. This helps you track what works and makes it easier to recover if you accidentally make things worse.

💡 Battery Matters

Test with a fully charged battery. PID tuning that works at full charge may fail with a depleted battery due to reduced motor power.

Next Steps

If tests aren't going well, check out troubleshooting tips and common solutions.

Troubleshooting Guide →