Repository navigation
ios: AR result is hidden by people and objects in front of it (#41) - #51
Conversation
The AR result was a SwiftUI Canvas over the camera, so nothing could occlude it. On the live camera it is now RealityKit content on the meter's anchor, with scene-mesh occlusion on LiDAR phones and people occlusion where supported, both on only while the AR screen is up. Replays keep the Canvas overlay. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Note Review skipped Codemetrics is installed on this repository, but it hasn't been added to your team yet. To enable AI code reviews for this repo, go to your dashboard and add house-scanning-master to your team's repositories. |
|
I read 2d33cea against the engine and capture. Several things hold up:
Two points:
|
AidenJohnston
left a comment
There was a problem hiding this comment.
Challenger review. The fix is sound. The model hangs on an AnchorEntity for the meter's ARAnchor, and simd_quatf(anchor.transform).inverse puts it back into world axes, so placement stays relative to the anchor. World alignment stays .gravity. Leaving the screen goes through setPhase and turns occlusion off again. A replay, or a meter with no anchor, falls back to the Canvas overlay. No project files changed, so the drift check isn't affected. Three nits:
- nit:
ios/HouseScan/Runtime/LiveCapture.swift:53and:80. People occlusion is checked by itself, but it is enabled alongside.sceneDepth.supportsFrameSemanticsshould be asked about the set that will actually run. If a device supports each semantic alone but not both together, the session fails on the one screen this PR is meant to fix. Fix: addif occludingPeople, ARWorldTrackingConfiguration.supportsFrameSemantics(configuration.frameSemantics.union(.personSegmentationWithDepth)) { ... }. - nit:
ios/HouseScan/Runtime/ScanEngine.swift:1147.publishWallrebuilds the whole model every timerefreshMeterFromAnchorsees the anchor move more than 2 cm, or the ground estimate moves more than 1 cm. TheAnchorEntityalready follows the anchor, so these rebuilds are redundant. A rebuild in the first 0.7 s also cancels the rise animation and makes the battery pop into place. Fix: rebuild only when geometry relative to the meter changes, such asgroundY - meter.y,along/outwardorcornerSegments. Compare against the last wall you built from. - nit: this conflicts with #53 in
ScanEngine.publishWall, because both PRs append a line after theWallGeometry(...)initializer. Resolve it by keeping both lines, withpublishFeaturesPastEnds()first.
The device checks in the description are the right ones. Please also try a non-LiDAR phone, which should get people occlusion only.
|
Read-only follow-up at |
|
@AidenJohnston Follow-up after merge at |
|
@AidenJohnston Linking the existing post-merge follow-up to #67: build 4.1 at Confirmed source: LiveCapture.swift:130-140 returns true after adding the anchor and requesting occlusion, without checking resolved anchoring or visible output; ResultARScreen.swift:17 then suppresses Canvas. The failing step is still unknown. One hypothesis needs narrowing: For acceptance, record a non-LiDAR phone opening the result with battery, cable and tint visible, then tracking recovery and Done/reopen. Keep #73 drift verification separate: visible output does not establish correct placement. The prior combined-semantics check also remains a separate concern; these non-LiDAR observations do not demonstrate a sceneDepth/person-segmentation combination failure. |
Brings in PRs #37, #41, #47, #48 and #51, 8604928 (result schema from t3/server 9e42970) and d0ff1be (the walk asks for the wall to 4.5 ft). Resolved: - Server requests: S3's plan(for:leftEnd:rightEnd:limitEnds:) with the item first carried into the walk's s (walkRequest), in the three call sites. - AR result: S3's in-scene result with occlusion (#41), drawn along the answer's wall (ResultPresentation.wall, else the walk's); publishWall redraws it after refreshing the result's wall. The auto-merge had put that redraw inside WallFrame's static geometry helper. - JSONSchemaValidatorTests: S3's text; the hashes match the vendored files. - Wall height: a 3D-map wall cell counts as covered once Map3DCoverage.wallHeight reaches wallWalkHeight, as S3's camera cells now do; the exported out_ft under map3d is still Map3DCoverage.wallHeight. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ithout every PLY they read. (#51) Electro and delivery scenes now carry angle75, angle80, and footprint3in from make gt. Facade and recon scene asset hashes point at the store PLYs already named in the manifest, and coverage tests skip unless the point cloud and occluders are both present. Co-authored-by: hss-cloud-agent <hss-cloud-agent@users.noreply.github.com>
Problem. On "See it on your wall" the battery was drawn over a person standing at the wall (field run 2, 4:14) and through the wooden post at the end of the mock wall (4:17). The result was a SwiftUI
Canvas(BatteryOverlay) painted on top of the camera view, so nothing in the real scene could ever cover it. The session already had the LiDAR mesh and scene depth, but nothing used them for occlusion.Fix.
ARViewthat shows the camera (ResultARModelinResultScene3D.swift, same colors and battery model as the 3D result view). They hang on anAnchorEntityfor the meter'sARAnchor, so they follow ARKit's corrections to that anchor as before. World alignment stays.gravity.LiveCaptureturns onsceneUnderstanding.occlusionwhen the phone builds a mesh (LiDAR), and.personSegmentationWithDepthwhensupportsFrameSemanticssays the phone can. The configuration is re-run without reset options, so tracking, anchors and the mesh carry on. Both are turned off again when the screen closes, so the capture runs exactly as before. A phone without LiDAR gets people occlusion only; a phone with neither gets the unoccluded model.ResultARModel.meshClearance; the cable was already drawn 3 cm out).Canvasoverlay.ScanViewState.resultInCameratells the screen which one is in use.Check on a device. CI can build this but can't see rendering, so it needs checking in the next field test. Open "See it on your wall" and confirm:
Worth knowing.
meshClearance.Canvasdrew around each clearance zone aren't in the 3D version; the zones are tinted fills, as in the 3D result view.Fixes #41. This branch merges into
t3/ios-mvf, so GitHub won't close the issue on merge; close it by hand.🤖 Generated with Claude Code