Pedro 3 has been released!
Pedro Pathing LogoPedro Pathing

Pinpoint

A localizer that uses the goBILDA Pinpoint Odometry Computer

Prerequisites

Ensure that two odometry pods are connected: one that is parallel to the length of your chassis (forward) and another that is perpendicular to the length of your chassis (lateral).

Common Mistakes

  • Make sure the pinpoint is plugged into an I2C port other than port 0. This is because the Control Hub's built in IMU uses port 0.
  • Make sure the pinpoint has the sticker side (with the ports) facing up.
  • Make sure the forward pod is plugged into the x port on the pinpoint and the strafe pod is plugged into the y port.

Automatic Tuning

The Pinpoint AutoTuner can automatically determine your PinpointConfig, which includes pod directions, offsets, resolution, etc.

Add the Tuner

Inside your Tuning class, add:

Tuning.java
@Tuner
public static Procedure pinpointTuner() {
    return new PinpointTuner();
}

Build and send the updated code to your Robot.

Open AutoTune

While connected to the Robot Controller, open the following address in your browser: http://192.168.43.1:10158

Select Pinpoint Procedure.

Pinpoint Setup

Enter the HardwareMap name of your Pinpoint and select the odometry pod type installed on your robot.

For example, if your Pinpoint is named pinpoint in your Configuration on your Driver Hub, enter:

pinpoint

in the HardwareMap Name field.

Next, select the odometry pod type that matches the pods installed on your robot, then press Submit.

Note

The Four Bar and Swing Arm pods are both goBILDA pods. If you are not using goBILDA pods, select the Custom option.

Custom Resolution Identification

If you are using a custom pod type, you will be prompted to run a test to determine the encoder resolution of your pods.

You should input the distance in inches that your want to push your robot forward in the test. The default is 48 inches.

Start the test, and then push the robot forward the distance you specified. After the robot has moved, stop the OpMode.

Forward Direction Identification

Press Continue, then push the robot straight forward.

After moving the robot forward, stop the OpMode.

The tuner will determine whether the x pod, which is the forward pod, should be set to FORWARD or REVERSED.

Strafe Direction Identification

Press Continue, then push the robot to the left.

After moving the robot to the left, stop the OpMode.

The tuner will determine whether the y pod, which is the strafe pod, should be set to FORWARD or REVERSED.

Important

During the Strafe Direction Identification step, push the robot to the left.

Offsets Identification

Press Continue, then rotate the robot in place 180 degrees counterclockwise.

After the robot has completed the rotation, stop the OpMode.

The tuner will automatically calculate the x and y pod offsets.

Applying the Results

Once the tuner is complete, open the Java tab.

AutoTune will generate a PinpointConfig using the values determined during the tuning procedure.

Copy the generated configuration into the PinpointConfig in your Constants.java file.

The generated configuration includes:

  • HardwareMap name
  • Pod type
  • X pod direction
  • Y pod direction
  • X pod offset
  • Y pod offset

Manual Offset Tuning

Offsets can also be found manually using the diagram below. Offsets are in inches.

Set your odometry pod offsets to define where they are relative to your robot's center of rotation.

Odometry Pod Offset Diagram

Testing the Localizer

Once you have completed the tuning steps, you can test your localizer as described on the localization page.

Congratulations on successfully tuning your localizer!

Troubleshooting

If you have any problems, see the troubleshooting page.

Last updated on