Class QuestNavIO
java.lang.Object
frc.robot.subsystems.vision.QuestNavIO
- All Implemented Interfaces:
QuestNavControl, PoseSourceIO
Meta Quest running QuestNav, over NetworkTables table
QuestNav.
QuestNav reports the headset's pose in a field frame that the robot sets by sending a
pose-reset command (resetPose(Pose2d)). This IO converts it to a robot pose with the inverse of
robotToQuest, and records the time and count of resets so the QuestNav gates (see Vision) can reject frames from before the first reset or just after one.
Frame timestamps are the NetworkTables server time at which the frame arrived, as QuestNavLib
uses; the Quest app's own clock is kept in PoseSourceInputs.health for latency analysis.
Health values: [appTimestamp, frameCount, batteryPercent, trackingLostCounter,
resetCount, lastResetTime].
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndices intoPoseSourceInputs.health.static final intIndices intoPoseSourceInputs.health.static final intIndices intoPoseSourceInputs.health.static final intIndices intoPoseSourceInputs.health.static final intIndices intoPoseSourceInputs.health.static final intIndices intoPoseSourceInputs.health.Fields inherited from interface PoseSourceIO
NONEFields inherited from interface QuestNavControl
NONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTells the Quest where the robot is, re-origining its field frame.voidupdateInputs(PoseSourceInputs inputs) Fillsinputswith everything reported since the last call.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PoseSourceIO
derived
-
Field Details
-
H_APP_TIMESTAMP
-
H_FRAME_COUNT
-
H_BATTERY
-
H_TRACKING_LOST
-
H_RESET_COUNT
-
H_LAST_RESET_TIME
-
-
Constructor Details
-
QuestNavIO
- Parameters:
robotToQuest- headset mount, robot frame (x forward, y left, z up)
-
-
Method Details
-
resetPose
Tells the Quest where the robot is, re-origining its field frame.- Specified by:
resetPosein interfaceQuestNavControl- Parameters:
robotPose- the robot's pose on the field right now
-
updateInputs
Description copied from interface:PoseSourceIOFillsinputswith everything reported since the last call.- Specified by:
updateInputsin interfacePoseSourceIO- Parameters:
inputs- the inputs to overwrite
-