PinpointLocalizer

public class PinpointLocalizer extends Localizer

This is the Pinpoint class. This class extends the Localizer superclass and is a localizer that uses the two wheel odometry set up with the IMU to have more accurate heading readings. The diagram below, which is modified from Road Runner, shows a typical set up. The view is from the top of the robot looking downwards. left on robot is the y positive direction forward on robot is the x positive direction /--------------\ | ____ | | ---- | | || | | || | ----> left (y positive) | | | | \--------------/ | | V forward (x positive) With the pinpoint your readings will be used in mm to use inches ensure to divide your mm value by 25.4

Author

Logan Nash

Havish Sripada 12808 - RevAmped Robotics

Ethan Doak - Gobilda

Constructors

Link copied to clipboard
public void PinpointLocalizer(HardwareMap map)
This creates a new PinpointLocalizer from a HardwareMap, with a starting Pose at (0,0) facing 0 heading.
public void PinpointLocalizer(HardwareMap map, Pose setStartPose)
This creates a new PinpointLocalizer from a HardwareMap and a Pose, with the Pose specifying the starting pose of the localizer.

Properties

Link copied to clipboard
public double totalHeading

Functions

Link copied to clipboard
public double getForwardMultiplier()
This returns the Y encoder value as none of the odometry tuners are required for this localizer
Link copied to clipboard
public IMU getIMU()
This is overridden to return the IMU, if there is one.
Link copied to clipboard
public double getLateralMultiplier()
This returns the X encoder value as none of the odometry tuners are required for this localizer
Link copied to clipboard
public Pose getPose()
This returns the current pose estimate.
Link copied to clipboard
public double getTotalHeading()
This returns how far the robot has turned in radians, in a number not clamped between 0 and 2 * pi radians.
Link copied to clipboard
public double getTurningMultiplier()
This returns either the factory tuned yaw scalar or the yaw scalar tuned by yourself.
Link copied to clipboard
public Pose getVelocity()
This returns the current velocity estimate.
Link copied to clipboard
This returns the current velocity estimate.
Link copied to clipboard
public boolean isNAN()
This returns whether if any component of robot's position is NaN.
Link copied to clipboard
public void resetIMU()
This resets the IMU.
Link copied to clipboard
public void setPose(Pose setPose)
This sets the current pose estimate.
Link copied to clipboard
public void setStartPose(Pose setStart)
This sets the start pose.
Link copied to clipboard
public void update()
This updates the total heading of the robot.