Repository navigation
Stamp each capture with the headset's pose; pin mapping and export behaviour with tests - #33
Merged
Merged
Conversation
…tests 184 EditMode tests in 8 files record what the code does today, so later changes show up as deliberate test edits. They cover SemanticLabelMapper, FloorplanBuilder, CaptureFrame, SnapshotFrameStore, GltfExtrasWriter, the exporter's extras and merge logic, BoundingBoxUtils and ViewportRaycaster, plus a golden extras v1 file. Tests whose behaviour looks wrong are named Currently... and say why (for example: only exact label keys map, so 16 of the 26 default-prompt classes become OTHER; re-exporting a space lists every pin twice; an identity intrinsics matrix counts as real intrinsics). Nothing in the runtime code changes. They live in their own assembly because the Editor test assembly cannot see Newtonsoft. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SpatialCapturePipeline creates the passthrough camera object under its own root, which never moves, and MobileCameraProvider reported that object's pose. Every CaptureFrame therefore carried the world origin, so rays and pins started from the origin instead of the headset. CapturePose.Resolve rejects a provider pose that is exactly the world origin while the scene camera is more than 5 cm or 1 degree away, uses the scene camera's pose instead and logs one warning. MobileCameraProvider now reports the pose of a pose source (the main camera by default), which the pipeline sets when it creates the camera object. Seven EditMode tests cover the rule; the one that drives a provider stuck at the origin failed before the change. Verified in the editor and by a Quest debug build, not on a headset. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft until a capture has been checked on a Quest: the pose fix is covered by tests and a build, not yet by a headset.
What changes
Fix: every capture carried the world origin as its pose.
SpatialCapturePipelinecreates the passthrough camera object under its own root, which never moves, andMobileCameraProvider.GetCameraPose()reported that object's pose. EachCaptureFrametherefore had position (0, 0, 0) and no rotation, so rays and pins started at the origin instead of at the headset.CapturePose.Resolverejects a provider pose that is exactly the world origin while the scene camera is more than 5 cm or 1 degree away. It returns the scene camera's pose, and the pipeline logs one warning.MobileCameraProviderreports the pose of aposeSource(the main camera by default). The pipeline sets it when it creates the camera object.Tests: 184 characterization tests (the first commit, test code only) record what the mapping and export code does today:
SemanticLabelMapper,FloorplanBuilder,CaptureFrame,SnapshotFrameStore,GltfExtrasWriter, the exporter's extras and merge logic,BoundingBoxUtilsandViewportRaycaster, plus a golden extras v1 file. Tests whose behaviour looks wrong are namedCurrently..., so fixing the behaviour later is a deliberate edit of a named test. They sit in their own assembly because the Editor test assembly cannot see Newtonsoft.Behaviour the tests pin that looks wrong (not changed here)
chair,picture frame,a couchandtablesgive OTHER, and 16 of the 26 classes in the default prompt end up as OTHER."pins": null. A corrupt existing glTF makes every later export of that space throw.CaptureFrame.HasIntrinsicsis true forMatrix4x4.identity, which the desktop provider and the no-provider fallback return. A ray through pixel (320, 240) is then almost parallel to the image plane.FloorplanBuilder: an L-shaped room's hull fills the notch (area 14, true area 12), the polygon runs counterclockwise so floor normals face down, and a U-shaped boundary inverts one fan triangle.BoundingBoxUtilsreads a pixel box (0, 0, 1, 1) as the whole image.ObjectMapperandMappedObjectDatabaseare in no scene or prefab and have no callers.How it was checked
XrSceneScreenshotTests.QaXrScene_CapturesControllersAndAnchorswaits forWaitForEndOfFrame, which batch mode does not raise.QuestBuilder.Build(10 minutes). It targets API 34, asks for exactly the 7 expected permissions and has a v2 signature.Not checked
.github/scripts/check-quest-package.shneeds the GameCI container. Its checks were repeated by hand withaapt2andapksigner.🤖 Generated with Claude Code