Class QuestNavProtocol
java.lang.Object
frc.robot.subsystems.vision.QuestNavProtocol
The few QuestNav protobuf messages FM uses, encoded and decoded by hand.
QuestNavLib's vendordep is built for WPILib 2026 and does not load on 2027. Its wire format is
small and stable (QuestNav protos/data.proto, commands.proto and WPILib's
geometry3d.proto), so rather than generate quickbuf classes this reads and writes the protobuf
wire format directly:
ProtobufQuestNavFrameData { int32 frame_count = 1; double timestamp = 2;
ProtobufPose3d pose3d = 3; bool isTracking = 4; }
ProtobufQuestNavDeviceData { int32 tracking_lost_counter = 1; int32 battery_percent = 3; }
ProtobufQuestNavCommand { QuestNavCommandType type = 1; uint32 command_id = 2;
ProtobufQuestNavPoseResetPayload pose_reset_payload = 10; }
ProtobufQuestNavPoseResetPayload { ProtobufPose3d target_pose = 1; }
ProtobufPose3d { ProtobufTranslation3d translation = 1; ProtobufRotation3d rotation = 2; }
ProtobufTranslation3d { double x = 1; double y = 2; double z = 3; }
ProtobufRotation3d { ProtobufQuaternion q = 1; }
ProtobufQuaternion { double w = 1; double x = 2; double y = 3; double z = 4; }
Check this against the QuestNav app version on the headset before the event.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA decoded device status.static final recordA decoded frame. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic QuestNavProtocol.DeviceDatadecodeDeviceData(byte[] bytes) DecodesProtobufQuestNavDeviceData;nullif malformed.static QuestNavProtocol.FramedecodeFrame(byte[] bytes) DecodesProtobufQuestNavFrameData;nullif the bytes are malformed.static byte[]encodePoseReset(int commandId, Pose3d questPose) Encodes a pose-reset command: the Quest re-origins so that its current pose readsquestPoseon the field.
-
Field Details
-
FRAME_DATA_TYPE
- See Also:
-
DEVICE_DATA_TYPE
- See Also:
-
COMMAND_TYPE
- See Also:
-
-
Method Details
-
decodeFrame
DecodesProtobufQuestNavFrameData;nullif the bytes are malformed. -
decodeDeviceData
DecodesProtobufQuestNavDeviceData;nullif malformed. -
encodePoseReset
Encodes a pose-reset command: the Quest re-origins so that its current pose readsquestPoseon the field.
-