AlvaAR icon indicating copy to clipboard operation
AlvaAR copied to clipboard

how to use with a-frame?

Open marcusx2 opened this issue 2 years ago • 8 comments

Do you have an example of how this library can be used with a-frame ?

marcusx2 avatar Jun 25 '23 16:06 marcusx2

Hi @marcusx2, Thanks for asking. I plan on adding support for different 3d engines in the future once the core implementation is more stable. The slam algorithm returns a camera pose array/matrix which contains the rotation and translation of the camera. This should work for any 3d engine.

Have a look the example and conversion.

alanross avatar Jul 03 '23 08:07 alanross

Hi! Started working on simplified, A-Frame version of this wonderful library. Please check it here: https://github.com/akbartus/A-Frame-World-Tracking

akbartus avatar Aug 11 '23 15:08 akbartus

@akbartus very nice! The robot is laid down though, shouldn't it be upstanding? It would be nice some features

  1. Tap to place
  2. Ability to hide small dots
  3. Fire event when floor is detected/when it's lost

Though I don't know if these features would better belong to AlvaAR itself.

marcusx2 avatar Aug 12 '23 16:08 marcusx2

@marcusx2 thanks for suggestions. Yes, I can implement these features. Will include in my updated list of tasks.

akbartus avatar Aug 12 '23 19:08 akbartus

I think more specifically, a function to place/unplace. Then the coder would use that to implement a tap to place functionality. This gives more control.

@alanross @akbartus Ideally, it would be nice if we could have an indicator of where the object will be placed once the user taps. This is usually done by having the object be semi-transparent following the phone, or a reticle. See this video for reference (first 10 seconds). Can this already be done, or can it be implemented? The api would return the current position at all times, then the user could use that to make a reticle follow it.

marcusx2 avatar Aug 13 '23 14:08 marcusx2

@akbartus very nice! The robot is laid down though, shouldn't it be upstanding? It would be nice some features

  1. Tap to place
  2. Ability to hide small dots
  3. Fire event when floor is detected/when it's lost

Though I don't know if these features would better belong to AlvaAR itself.

On index.html we have <a-entity gltf-model="url(3d/Xbot2.glb)" ></a-entity> if you use "Xbot" instead, it uses the other included GLB file - which is the upstanding model.

Try replacing with <a-entity gltf-model="url(3d/Xbot.glb)" ></a-entity>.

Anyway, I still have a bit of difficulty on detecting plane. It seems to depend a lot on lightning of the room.

nicolocarpignoli avatar Sep 12 '23 14:09 nicolocarpignoli

@nicolocarpignoli thank you for the support. I will come back to this project soon and then will try to implement the features requested.

akbartus avatar Sep 12 '23 17:09 akbartus

@alanross @akbartus Was the project abandoned? I hope these features get implemented soon T_T.

marcusx2 avatar Feb 19 '24 15:02 marcusx2