AlvaAR icon indicating copy to clipboard operation
AlvaAR copied to clipboard

Created a react-three-fibre R3F example

Open ThorstenBux opened this issue 2 years ago • 8 comments

Hi @alanross ,

I've created a R3F example that works (after a fashion). I've got everything on a branch and if you are interested would create a PR. Just let me know if you would like to have the branch pushed to your repo or if I should fork and open a PR from the fork. Cheers

ThorstenBux avatar Feb 09 '23 23:02 ThorstenBux

Awesome, thank you Thorsten! Can you hold on to it and keep it warm for now so we can integrate it once the architecture is better defined?

alanross avatar Mar 09 '23 05:03 alanross

Sure thing, I'll push to a fork and keep it there. I'd also have a couple of questions as to why the model shows the way it shows :). How are you getting along with the architecture. Need any help?

ThorstenBux avatar Mar 09 '23 06:03 ThorstenBux

What would you like to know about how the model is shown? If you have any system architecture suggestions on the C++ side I'd be happy to check it out

alanross avatar Mar 09 '23 07:03 alanross

Hi @alanross I pushed it here https://github.com/ThorstenBux/AlvaAR/tree/thor-r3f here is a screenshot regarding model placement.

image

It looks like the model is at an angle and not sitting on the surface. Unsure if that is due to my camera/model settings in R3F or if it is due to the data coming from AlvaAR.

Lastly, I'm also getting a lot of these errors randomly:

RangeError: Range consisting of offset and length are out of bounds
set — alva_ar.js:6372
write — alva_ar.js:6372
findCameraPose — alva_ar.js:6527
(anonymous function) — useAlvaAR.tsx:91
render$1 — index-7dbf758c.esm.js:1454
loop — index-7dbf758c.esm.js:1481
650set — alva_ar.js:6372

Would you know why that is. Cheers

ThorstenBux avatar Mar 12 '23 21:03 ThorstenBux

IMU integration will handle orientation. The SLAM algorithm itself has no notion of its orientation in regards to its environment and will just use the first found frame as its reference.

alanross avatar Mar 14 '23 18:03 alanross

It looks like the model is at an angle and not sitting on the surface. Unsure if that is due to my camera/model settings in R3F or if it is due to the data coming from AlvaAR.

Would you know why that is. Cheers

actually when you test the official example, the 3d object is never "sitting" on the plane, rather always floating.

Zaniyar avatar Apr 02 '23 12:04 Zaniyar

actually when you test the official example, the 3d object is never "sitting" on the plane, rather always floating.

I think this is because the video frame is shown before the tracking is ready and can update the 3D mesh, so it just lags behind the video basically. The tracking is quite stable and surprisingly performant.

Squareys avatar Sep 12 '23 14:09 Squareys

Lastly, I'm also getting a lot of these errors randomly:

RangeError: Range consisting of offset and length are out of bounds
set — alva_ar.js:6372
write — alva_ar.js:6372
findCameraPose — alva_ar.js:6527
(anonymous function) — useAlvaAR.tsx:91
render$1 — index-7dbf758c.esm.js:1454
loop — index-7dbf758c.esm.js:1481
650set — alva_ar.js:6372

Would you know why that is. Cheers

you initialized alva twice :)

sookie928 avatar Jan 08 '24 08:01 sookie928