PinpointLocalizer
class PinpointLocalizer @JvmOverloads constructor(val hardwareMap: HardwareMap, var inPerTick: Double, val name: String = "pinpoint", var parYTicks: Double = 0.0, var perpXTicks: Double = 0.0, val parDirection: DcMotorSimple.Direction = DcMotorSimple.Direction.FORWARD, val perpDirection: DcMotorSimple.Direction = DcMotorSimple.Direction.FORWARD, val initialPose: Pose2d = Pose2d.zero) : Localizer
Localizer based on the GoBilda Pinpoint dead wheel module.
Parameters
hardwareMap
hardware map
inPerTick
inches per tick
name
name of the Pinpoint device
parYTicks
y-position of the parallel encoder (in tick units)
perpXTicks
x-position of the perpendicular encoder (in tick units)
parDirection
direction of the parallel encoder
perpDirection
direction of the perpendicular encoder
initialPose
initial pose
Constructors
Link copied to clipboard
constructor(hardwareMap: HardwareMap, inPerTick: Double, name: String = "pinpoint", parYTicks: Double = 0.0, perpXTicks: Double = 0.0, parDirection: DcMotorSimple.Direction = DcMotorSimple.Direction.FORWARD, perpDirection: DcMotorSimple.Direction = DcMotorSimple.Direction.FORWARD, initialPose: Pose2d = Pose2d.zero)
Properties
Functions
Link copied to clipboard
Updates the localizer and returns the new velocity.
Link copied to clipboard
fun withDirections(parDirection: DcMotorSimple.Direction, perpDirection: DcMotorSimple.Direction): PinpointLocalizer
Returns a new localizer with the given encoder directions.
Link copied to clipboard
Returns a new localizer with the given initial pose.
Link copied to clipboard
Returns a new localizer with the given device name.
Link copied to clipboard
Returns a new localizer with the given offsets.