Repository navigation
Wall ends still land in the wrong place: at the meter on a short side, or 13 ft from where the phone went #71
Copy link
Copy link
Open
Labels
bugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.size:M30-99 effective changed lines.30-99 effective changed lines.
Description
Follow-up to #24: wall ends set without pointing at them still land in the wrong place, at the meter on a short side (run 2) or 13 ft from anywhere the phone went (run 3).
Seen in. Device field test of TestFlight build 4.1 (beta at 45017ba), iPhone 14 without LiDAR, iOS 26.6.2.
- Run 2 (indoor mock wall), video 1:38–1:50 ("Wall ends here" at 1:45.5). Report: run 2, A41-2015-03.
- Run 3 (a real house), video 1:34.25–1:35.0. Report: run 3, A41-2055-06.
The #24 fix does work in the common case: in run 1 "Can't get there" ended the wall where the phone walked (1 ft 0 in left, 20 ft 3 in right).
What happens.
- Run 2, short left side. "Walk slowly to your left": the tester walked to the end post, and the strip showed cells for about 1–4 ft left of the meter. At 1:45.5 they tapped "Wall ends here", then "Something blocks it". The strip redrew with the meter at its left edge, and every cell left of the meter disappeared. The AR end pole was drawn in line with the meter, not at the post. The packet has
wall_end_leftat s = 0.0 m. - Run 3. "Can't get there" on "Walk slowly to your left" set the left end at 13 ft 2 in left, although no kept view and no point of the trajectory is farther left than about 6 ft 8 in (in the exported frame). "Can't get there" on "Walk slowly to your right" set the right end at 1 ft 9 in right, while the phone was at about 5 ft right and the farthest kept right view at about 6 ft. The result then asked to "Keep walking past the left end (13 ft 2 in left)".
Cause.
- Run 2:
WalkedEnd.endcaps the end atreach, the farthest kept photo position on that side (WalkedEnd.swift#L19-L37). No kept photo in the whole run has s < 0: the two photos during the left walk were taken at +1.06 ft and +0.35 ft, because auto-capture keeps one per ~0.5 m moved and the phone moved less than that. Soreach= 0 and the end is clamped to the meter, whatever the phone and the strip showed. - Run 3: not reconciled. The same rule should have given about −6.7 ft and about +5 ft. Possible explanations (inferred, not confirmed): ARKit moved the meter anchor during the run and the export uses the final pose (the anchor was on an estimated plane in this run, see "Meter tap on an estimated plane put the wall 1.1 m behind the real wall and 46° off, and nothing corrects it"), or
observedCamerasholds positions other than the kept photos. The device log line fromlogEnd(ScanEngine+Ends.swift#L89-L96) would settle it; it wasn't collected.
Fix direction.
- End at the maximum of: the phone's own position, the farthest kept photo, and the farthest wall cell seen on that side.
- Or keep a photo when "Wall ends here" is tapped.
- Never silently drop cells the strip was showing a second earlier.
- Clamp any end to the walked trajectory (plus a margin), so an end can't land farther out than the phone ever went; log when the clamp fires.
- Collect the device log on the next non-LiDAR run to explain run 3.
Related. #24 (follow-up), #38, A41-2015-03, A41-2055-06.
Screen recordings are in the comment below.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.size:M30-99 effective changed lines.30-99 effective changed lines.
Activity
AidenJohnston commentedon Sep 27, 2026
Screen recordings from the build 4.1 field test (TestFlight 4.1, iPhone 14 without LiDAR). Click a link to play.
Times are in each run's recording. Full analyses: PR #60.
AidenJohnston commentedon Sep 27, 2026
Where a side's end goes when the phone is past the last kept photo (#71, follow-up to #24)
This doesn't pick an option. It sets out how the build 4.1 runs bear on the options already posted on #24 and the fix directions in #71, and what is still needed to choose. Read at
t3/ios-mvf4b71161.What the code does. Since 3c7b83a, "Wall ends here" and "Can't get there" during the walk end a side at the phone's position along the wall, capped at the farthest kept photo on that side (
WalkedEnd.end, fed byCoverageMap.walkedPositions). With the phone across the meter or its place lost, the end goes to that farthest kept photo. A side with no kept photo ends at the meter.WalkedEndTestsencodes this on purpose:straightWallEndsWhereThePhoneIscaps a phone at s = -4 m to the farthest photo at -3 m, andsideNeverWalkedEndsAtTheMetersends a phone at -1 m with no photo on the left to 0. Auto-capture keeps a photo about every 0.5 m moved (AutoCaptureConfig.spacingMeters), so the cap trails the phone by up to that much, and on a side shorter than that it is 0.What 4.1 showed
logEndline (phone s, walked extent, covered reach) wasn't collected.How that bears on the posted options
The #24 options for parts 1–3 were set aside after 3c7b83a. Part 1's question is the one #71 reopens.
seenExtent; don't set an end within ~1 ft of the meter, ask to walk first):seenExtentalready exists onCoverageMap, and the strip draws from it. In run 2 it reached about 1–4 ft left, so the end would likely have landed at the post. But seen cells follow where the camera looked, not where the phone went: in run 3 the strip showed about 13 ft of seen wall on the wrong line right after the taps, so a seen cap wouldn't have bounded that end. The 1 ft guard wouldn't have fired in run 2.CaptureRecorder), butWalkedEndsees only kept photos, so this needs positions recorded in session (inScanEngine.walk, stored onCoverageMapor the engine). The phone's current pose is itself on the trajectory, so on the phone's side this amounts to "end at the phone"; the cap only matters across the meter or with tracking lost. It would bound run 3's left end to about 6 ft 8 in if the frame stayed consistent, but not if the anchor moved.Any option that lets an end land at the phone without a kept photo there changes the two
WalkedEndTestsexpectations above, and may change #56'sFieldRunReplayTests.Still needed to decide
logEnddevice log line for each end, and a re-test on a build with the Meter tap on an estimated plane put the wall 1.1 m behind the real wall and 46° off, and nothing corrects it #69 fix, before treating it as an end-rule bug.Once decided, run 2 is a unit test: kept views at s = +0.32 m and +0.11 m, the phone left of the meter, and "Wall ends here" on the left must not return 0.
🤖 Generated with Claude Code
AidenJohnston commentedon Sep 27, 2026
Team decision (2026-09-27): on the phone's own side with tracking normal, the end goes where the phone is, even past the last kept photo; the kept-photo cap stays only across the meter or with tracking limited or lost, in PR #136.
ios: an end at the phone out along the wall counts as walked
Merge pull request #136 from SamGu-NRX/t3/41-ends-corner
Merge origin/beta into t3/41-ends-corner-2; drop the tracking debounce