Skip to content

AR overlays drift off their objects after walking away (window outline drawn over the panel) #73

Open

Description

@AidenJohnston

After walking away and back, the AR overlays drift off the objects they mark: the window's outline was drawn over the panel and disconnect boxes, 2–3 ft left of the window.

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 4:14–4:28, during the server's ground request, after the tester had walked about 5 m away from the wall and back. Report: run 2, A41-2015-05.

What happens.

  • The window's dashed outline was drawn over the electrical panel and disconnect boxes, about 2–3 ft left of the window. At 4:20 it partly overlapped the window's left side.
  • Tester: "The window's not on the window anymore … Now it's just a floating window. That's bad."
  • Tracking was normal throughout, with no pose jumps, so this isn't a relocalization snap.
  • The window mark itself (5.43–7.33 ft right) agrees with run 1's window (5.71–7.96 ft) to within about 0.5 ft, so the taps were roughly right when made.

Why it matters. The AR result ("See it on your wall") is drawn the same way, after the same walk. Once it renders (see the issue "See it on your wall" draws nothing on phones without LiDAR (regression from #41)), the battery could be feet off.

Cause (inferred, not confirmed). Either visual-inertial drift over 42 m of walking without LiDAR, or the overlays not following the meter anchor:

  • Marked features keep their tapped world points. When ARKit moves the meter anchor, only the meter position is updated and features are re-projected from those fixed world points (ScanEngine.swift#L381-L402, ScanEngine+Actions.swift#L272-L281). So a window outline stays where it was in raw world coordinates, not where it is relative to the meter's anchor. The repo's rule is to place AR content relative to the meter's anchor.
  • The anchor update takes the anchor's position only, not its rotation, so the wall's direction never follows ARKit's corrections.
  • The outline is then drawn from the wall frame and the re-projected span (WallMarksOverlay.swift#L45-L54).

Fix direction.

  • Log the meter anchor's transform over time and how far it has moved since the tap, to tell drift from a placement bug.
  • Store features relative to the meter anchor (or give each its own ARAnchor), and re-derive overlay positions from the anchors every frame, rotation included.
  • On the result screen, ask the homeowner to aim at the meter again first, re-hit-test the meter plane and correct the offset before drawing the battery.
  • Test on a non-LiDAR phone.

Related. A41-2015-05, #41.

Screen recordings are in the comment below.

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    size:L100-499 effective changed lines.
    on Sep 27, 2026
  2. AidenJohnston commented on Sep 27, 2026

    @AidenJohnston
    CollaboratorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.size:L100-499 effective changed lines.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions