Documentation Index
Fetch the complete documentation index at: https://mintlify.com/saquer916/odyssey/llms.txt
Use this file to discover all available pages before exploring further.
PinpointLocalizer implements the Localizer interface by wrapping GoBILDA’s GoBildaPinpointDriver. It reads X and Y position in millimetres and heading in radians directly from the Pinpoint odometry computer over I²C, and packages them into a Pose2d for the Follower. Because it depends on the FTC SDK’s hardware abstraction layer (GoBildaPinpointDriver, AngleUnit, DistanceUnit), the class lives in TeamCode rather than odyssey-core.
Package: org.firstinspires.ftc.teamcode.odyssey.localizationSource location:
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/odyssey/localization/PinpointLocalizer.java
Constructor
Wraps an already-configured
GoBildaPinpointDriver instance. Obtain the driver from hardwareMap and call resetPosAndIMU() on it before passing it here.A fully initialized GoBILDA Pinpoint driver retrieved via
hardwareMap.get(GoBildaPinpointDriver.class, "localizer").Methods
Returns the current robot pose by querying the Pinpoint driver:
- x —
pinpointDriver.getPosX(DistanceUnit.MM) - y —
pinpointDriver.getPosY(DistanceUnit.MM) - heading —
pinpointDriver.getHeading(AngleUnit.RADIANS)
Pose2d constructor, which normalizes heading to (−π, π].Calls
pinpointDriver.update() to fetch the latest odometry data from the Pinpoint computer. Must be called once per loop iteration before getPose() or Follower.update().Setup
The following excerpt fromPushTest.java shows the canonical initialization pattern:
init() method. The hardware configuration name "localizer" must match the name assigned to the Pinpoint device in the robot controller configuration file.
resetPosAndIMU() zeroes both the position odometry and the onboard IMU. Call it every time in init() so that the robot’s starting position is treated as the origin (0, 0, 0), regardless of where it was when powered on.
Verifying odometry with Push Test
Odyssey includes a dedicated TeleOp OpMode —Push Test Odometry — that streams live pose data to telemetry without driving the robot. Use it to validate your Pinpoint installation before running autonomous paths:
PinpointLocalizer is located in TeamCode, not odyssey-core, because it directly imports FTC hardware classes (GoBildaPinpointDriver, AngleUnit, DistanceUnit) that are not available outside the FTC SDK environment. If you are not using the provided TeamCode module directly, copy the file into your own TeamCode package and adjust the import paths as needed.