Skip to content

Pinpoints

NextPinpoint is a wrapper for the goBILDA Pinpoint Odometry Computer that uses lazy initialization.

// By Lynx Module and I2C bus
val pinpoint = NextPinpoint(RobotController.controlHub, 0)
// Using your configuration name
val pinpoint = NextPinpoint("pinpoint")

Updates the position data from the device. Call this each loop, you can put this in your periodic for your Mechanism.

pinpoint.update()

Pose2d this is the robot’s current position and heading, in inches and radians.

val currentPose = pinpoint.pose

PoseVelocity2d this is the robot’s current translational and heading velocity.

val currentVelocity = pinpoint.velocity

Resets the odometry position tracking.

pinpoint.resetPosAndIMU()