OTOSLocalizer

public class OTOSLocalizer extends Localizer

This is the OTOSLocalizer class. This class extends the Localizer superclass and is a localizer that uses the SparkFun OTOS. 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 forward (x positive) △ | | /--------------\ | | | | | || || | left (y positive) <--- | || || | | ____ | | ---- | \--------------/

Author

Anyi Lin - 10158 Scott's Bots

Constructors

Link copied to clipboard
public void OTOSLocalizer(HardwareMap map)
This creates a new OTOSLocalizer from a HardwareMap, with a starting Pose at (0,0) facing 0 heading.
public void OTOSLocalizer(HardwareMap map, Pose setStartPose)
This creates a new OTOSLocalizer 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 multiplier applied to forward movement measurement to convert from OTOS ticks to inches.
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 multiplier applied to lateral/strafe movement measurement to convert from OTOS ticks to inches.
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 the multiplier applied to turning movement measurement to convert from OTOS ticks to radians.
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 does nothing since this localizer does not use the IMU.
Link copied to clipboard
public void resetOTOS()
This resets the OTOS.
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.