PoseUpdater

public class PoseUpdater

This is the PoseUpdater class. This class handles getting pose data from the localizer and returning the information in a useful way to the Follower.

Author

Anyi Lin - 10158 Scott's Bots

Aaron Yang - 10158 Scott's Bots

Harrison Womack - 10158 Scott's Bots

Baron Henderson - 20077 The Indubitables

Constructors

Link copied to clipboard
public void PoseUpdater(HardwareMap hardwareMap, Localizer localizer)
Creates a new PoseUpdater from a HardwareMap and a Localizer.
public void PoseUpdater(HardwareMap hardwareMap)
Creates a new PoseUpdater from a HardwareMap.

Properties

Link copied to clipboard
public double headingOffset
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public double xOffset
Link copied to clipboard
public double yOffset

Functions

Link copied to clipboard
public Pose applyOffset(Pose pose)
This applies the offset to a specified Pose.
Link copied to clipboard
This returns the acceleration of the robot as a Vector.
Link copied to clipboard
public double getAngularVelocity()
This returns the angular velocity of the robot as a double.
Link copied to clipboard
public Pose getDeltaPose()
Returns the robot's change in pose from the previous update.
Link copied to clipboard
public double getHeadingOffset()
This returns the heading offset.
Link copied to clipboard
This returns the Localizer.
Link copied to clipboard
public double getNormalizedIMUHeading()
This returns the IMU heading normalized to be between [0, 2 PI] radians.
Link copied to clipboard
public Pose getPose()
This returns the current pose, with offsets applied.
Link copied to clipboard
Returns the robot's pose from the previous update.
Link copied to clipboard
public Pose getRawPose()
This returns the current raw pose, without any offsets applied.
Link copied to clipboard
public double getTotalHeading()
This returns the total number of radians the robot has turned.
Link copied to clipboard
This returns the velocity of the robot as a Vector.
Link copied to clipboard
public double getXOffset()
This returns the x offset.
Link copied to clipboard
public double getYOffset()
This returns the y offset.
Link copied to clipboard
public void resetHeadingToIMU()
This resets the heading of the robot to the IMU's heading, using Road Runner's pose reset.
Link copied to clipboard
This resets the heading of the robot to the IMU's heading, using offsets instead of Road Runner's pose reset.
Link copied to clipboard
public void resetIMU()
Link copied to clipboard
public void resetOffset()
This resets all offsets set to the PoseUpdater.
Link copied to clipboard
public void setCurrentPoseWithOffset(Pose set)
This sets the current pose, using offsets.
Link copied to clipboard
public void setHeadingOffset(double offset)
This sets the offset for only the heading.
Link copied to clipboard
public void setPose(Pose set)
This sets the current pose without using resettable offsets.
Link copied to clipboard
public void setStartingPose(Pose set)
This sets the starting pose.
Link copied to clipboard
public void setXOffset(double offset)
This sets the offset for only the x position.
Link copied to clipboard
public void setYOffset(double offset)
This sets the offset for only the y position.
Link copied to clipboard
public void update()
This updates the robot's pose, as well as updating the previous pose, velocity, and acceleration.