Package gg.questnav.questnav
Record Class PoseFrame
java.lang.Object
java.lang.Record
gg.questnav.questnav.PoseFrame
- Record Components:
questPose- The current pose of the Quest on the field. This will only return the field-relative pose ifQuestNav.setPose(Pose2d)has been called at least once.dataTimestamp- The NT timestamp of when the last frame data was sent. This is the value which should be used with a pose estimator.appTimestamp- The Quest app's uptime timestamp. For integration with a pose estimator, use the timestamp fromdataTimestamp()instead!frameCount- The current frame count.
public record PoseFrame(edu.wpi.first.math.geometry.Pose2d questPose, double dataTimestamp, double appTimestamp, int frameCount)
extends Record
A frame of data from the Quest.
-
Constructor Summary
ConstructorsConstructorDescriptionPoseFrame(edu.wpi.first.math.geometry.Pose2d questPose, double dataTimestamp, double appTimestamp, int frameCount) Creates an instance of aPoseFramerecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theappTimestamprecord component.doubleReturns the value of thedataTimestamprecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of theframeCountrecord component.final inthashCode()Returns a hash code value for this object.edu.wpi.first.math.geometry.Pose2dReturns the value of thequestPoserecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PoseFrame
public PoseFrame(edu.wpi.first.math.geometry.Pose2d questPose, double dataTimestamp, double appTimestamp, int frameCount) Creates an instance of aPoseFramerecord class.- Parameters:
questPose- the value for thequestPoserecord componentdataTimestamp- the value for thedataTimestamprecord componentappTimestamp- the value for theappTimestamprecord componentframeCount- the value for theframeCountrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
questPose
public edu.wpi.first.math.geometry.Pose2d questPose()Returns the value of thequestPoserecord component.- Returns:
- the value of the
questPoserecord component
-
dataTimestamp
public double dataTimestamp()Returns the value of thedataTimestamprecord component.- Returns:
- the value of the
dataTimestamprecord component
-
appTimestamp
public double appTimestamp()Returns the value of theappTimestamprecord component.- Returns:
- the value of the
appTimestamprecord component
-
frameCount
public int frameCount()Returns the value of theframeCountrecord component.- Returns:
- the value of the
frameCountrecord component
-