GoBildaPinpointDriver

@I2cDeviceType
@DeviceProperties(name = "goBILDA® Pinpoint Odometry Computer", xmlTag = "goBILDAPinpoint", description = "goBILDA® Pinpoint Odometry Computer (IMU Sensor Fusion for 2 Wheel Odometry)")
open class GoBildaPinpointDriver : I2cDeviceSynchDevice<DEVICE_CLIENT>

The goBILDA® Pinpoint Odometry Computer driver, ported from goBILDA®.

To use this in BunyipsLib, use this as any other HardwareDevice (such as DcMotor).

File copy acquired 19/02/25, keeping the public API surface backwards compatible with other distributions of the driver.

Since

7.0.0

Constructors

Link copied to clipboard
constructor(deviceClient: I2cDeviceSynchSimple, deviceClientIsOwned: Boolean)
Constructs a new Pinpoint Computer.

Types

Link copied to clipboard
Captures the current fault condition of the device
Link copied to clipboard
Captures the direction the encoders are set to
Link copied to clipboard
Captures the kind of goBILDA odometry pods, if goBILDA pods are used
Link copied to clipboard
Captures a limited scope of read data.

Properties

Link copied to clipboard
I2C address of the device.
Link copied to clipboard
open val loopTime: Int
Link copied to clipboard
Link copied to clipboard

Inherited properties

Link copied to clipboard
protected open var deviceClient: DEVICE_CLIENT
Link copied to clipboard
protected open var deviceClientIsOwned: Boolean
Link copied to clipboard
protected open var isInitialized: Boolean

Functions

Link copied to clipboard
protected open fun doInitialize(): Boolean
Link copied to clipboard
open fun getDeviceID(): Int
Checks the deviceID of the Odometry Computer.
Link copied to clipboard
open fun getDeviceName(): String
Link copied to clipboard
Device Status stores any faults the Odometry Computer may be experiencing.
Link copied to clipboard
open fun getDeviceVersion(): Int
Link copied to clipboard
open fun getEncoderX(): Int
Link copied to clipboard
open fun getEncoderY(): Int
Link copied to clipboard
open fun getFrequency(): Double
Checks the Odometry Computer's most recent loop frequency.
Link copied to clipboard
open fun getHeading(): Double
Link copied to clipboard
Link copied to clipboard
open fun getManufacturer(): HardwareDevice.Manufacturer
Link copied to clipboard
open fun getPosition(): Pose2D
Link copied to clipboard
open fun getPosX(): Double
Link copied to clipboard
open fun getPosY(): Double
Link copied to clipboard
open fun getVelocity(): Pose2D
Link copied to clipboard
open fun getVelX(): Double
Link copied to clipboard
open fun getVelY(): Double
Link copied to clipboard
open fun getXOffset(): Float
This uses its own I2C read, avoid calling this every loop.
Link copied to clipboard
open fun getYawScalar(): Float
Link copied to clipboard
open fun getYOffset(): Float
This uses its own I2C read, avoid calling this every loop.
Link copied to clipboard
open fun recalibrateIMU()
Recalibrates the Odometry Computer's internal IMU.
Link copied to clipboard
open fun resetPosAndIMU()
Resets the current position to 0,0,0 and recalibrates the Odometry Computer's internal IMU.
Link copied to clipboard
Can reverse the direction of each encoder.
Link copied to clipboard
If you're using goBILDA odometry pods, the ticks-per-mm values are stored here for easy access.
open fun setEncoderResolution(ticksPerMm: Double)
Sets the encoder resolution in ticks per mm of the odometry pods.
open fun setEncoderResolution(cpr: Double, wheelRadius: Measure<Distance>)
Sets the encoder resolution based on the counts-per-revolution and circumference, calculated with wheel radius.
Link copied to clipboard
open fun setOffsets(xOffset: Double, yOffset: Double)
Sets the odometry pod positions relative to the point that the odometry computer tracks around.
Link copied to clipboard
open fun setPosition(pos: Pose2D): Pose2D
Send a position that the Pinpoint should use to track your robot relative to.
Link copied to clipboard
open fun setYawScalar(yawOffset: Double)
Tuning this value should be unnecessary.
Link copied to clipboard
open fun update()
Call this once per loop to read new data from the Odometry Computer.

Inherited functions

Link copied to clipboard
open fun close()
Link copied to clipboard
protected open fun disengage()
Link copied to clipboard
protected open fun engage()
Link copied to clipboard
Link copied to clipboard
open fun getDeviceClient(): DEVICE_CLIENT
Link copied to clipboard
open fun getVersion(): Int
Link copied to clipboard
open fun initialize(): Boolean
Link copied to clipboard
protected open fun initializeIfNecessary()
Link copied to clipboard
open fun onModuleStateChange(module: RobotArmingStateNotifier, state: RobotArmingStateNotifier.ARMINGSTATE)
Link copied to clipboard
protected open fun registerArmingStateCallback(doInitialCallback: Boolean)