Pinpoints
NextPinpoint is a wrapper for the goBILDA Pinpoint Odometry Computer that uses lazy initialization.
Creating a NextPinpoint
Section titled “Creating a NextPinpoint”// By Lynx Module and I2C busval pinpoint = NextPinpoint(RobotController.controlHub, 0)
// Using your configuration nameval pinpoint = NextPinpoint("pinpoint")// By Lynx Module and I2C busNextPinpoint pinpoint = new NextPinpoint(RobotController.controlHub(), 0);
// Using your configuration nameNextPinpoint pinpoint = new NextPinpoint("pinpoint");update()
Section titled “update()”Updates the position data from the device.
Call this each loop, you can put this in your periodic for your Mechanism.
pinpoint.update()pinpoint.update();Pose2d this is the robot’s current position and heading, in inches and radians.
val currentPose = pinpoint.posePose2d currentPose = pinpoint.getPose();velocity
Section titled “velocity”PoseVelocity2d this is the robot’s current translational and heading velocity.
val currentVelocity = pinpoint.velocityPoseVelocity2d currentVelocity = pinpoint.getVelocity();resetPosAndIMU()
Section titled “resetPosAndIMU()”Resets the odometry position tracking.
pinpoint.resetPosAndIMU()pinpoint.resetPosAndIMU();
