maxxfrazer / FocusEntity

Bringing the scanning box from SceneKit to RealityKit

Home Page:https://maxxfrazer.github.io/FocusEntity/documentation/focusentity/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lidar Device Issue

Reality-Dev opened this issue · comments

Have you tried running this same project on a Lidar-enabled device?

I tried it on my iPad Pro 2020 and it did not perform well with locating planes.
It would fail to change orientation to match the new surface.

I also tried it with a prior version of the project, commit 88112e6, and it has the same issues.

I think this could have something to do with the raycasting, but sceneUnderstanding.options does not include .collisions, so it should not be affecting raycast results.

I did also use

self.debugOptions.insert(.showAnchorGeometry)

To make sure that planes were being detected, and they were.

I believe someone mentioned this to me on twitter a while ago, but I didn't have a LiDAR device to test with at the time.
I'll use my 12 pro to see if I can replicate and hopefully debug tomorrow. (i usually test things like this on my ipad, which doesn't have LiDAR).

Thanks for raising this and already trying out an older version + debugOptions

Just to let you know - I tried this out and see the same bug, sometimes it works fine, but most of the time doesn't

Hey Max! I just tested pull request #18 out on both a lidar-enabled (iPad Pro 2020) and a non-lidar-enabled (iPhone XS) device. It worked beautifully on both of them. Changing the raycast query target to only .existingPlaneGeometry for lidar-enabled devices worked very well. The focus entity changes orientation to match the surfaces now. Great work! Thank you for fixing this. Lidar detects surfaces much more quickly and up to 5 meters away so this was a huge improvement.

One small issue I noticed is that when changing between two vertical planes which are perpendicular to one another, the orientation change is not smooth, since the code only smooths out changes between horizontal, vertical and none orientations.

It also rotates the wrong way when it goes on the ceiling for me! But I think fixing those couple of pieces won't take much further adjusting 👍

Interesting! Good catch. Yes it sounds not too bad.