将物体放置在预先扫描的房间中的设定位置 [英] Placing objects at set locations in a pre-scanned room

查看:94
本文介绍了将物体放置在预先扫描的房间中的设定位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目标: 我有一个房间的预扫描空间图. (通过入职流程进行.)

Objective: I have a pre-scanned spatial map of a room. (Carried out through an onboarding process.)

我们获取该地图,并在Unity中的预定义静态位置向其添加全息位置/标记/数字孪生.例如墙面空间,配件等

We take that map and add holographic locations/markers/digital twins to it in Unity, at pre-defined static locations. E.g wallspace, fittings, etc.

然后启动该应用程序,并在正确的位置包含所有全息数据,而与用户的物理起始位置无关.

The app is then launched and contains all the holographic data in the correct location, irrespective of the users physical start location.

简而言之,我希望启动一个应用,并在现实世界中的指定位置使用预定义的全息图,而不管该应用在该房间中的启动位置.

In short, I want an app to start, with pre-defined holograms at set locations in the real world, irrespective of where the app is started within that room.

我已经阅读了许多有关空间映射,空间理解等的教程和演练,但是它们似乎并不能解决我的问题.

I have read lots of tutorials and walkthroughs etc on Spatial Mapping, Spatial Understanding etc. but they do not seem to solve my problem.

我已经使用hololens网络浏览器界面下载了房间的3D空间地图,并使用Unity及其相应的脚本等放置了全息图.

I have already downloaded the 3D spatial map of the room using the hololens web browser interface, and placed holograms using Unity, with their respective scripts etc.

现在,当我启动该应用程序时,所有全息图都相对于彼此正确创建,但是只有当我启动该应用程序并站在设定点并朝设定方向看时,它们才位于正确的位置.

Now, when I start the app, all of the holograms are created correct relative to eachother, but they are only in the right place if I start the app stood at a set point, looking in a set direction.

主要思想是找到房间的空间锚(我不知道在创建的空间地图中从何处获得这些锚!),然后找到它们,旋转/平移全息世界以匹配实时扫描的空间锚点.

The main idea has been to find the spatial anchors for the room, (I don't know where I get these from in the created spatial map!) and then once they are found, rotate/translate the holographic world to match the live scanned spatial anchors.

其他方法包括: -将所有对象手动放置在应用程序的某些配置首次运行中 -创建二维码并将其放置在设置的位置,以与上述主要思想中的空间锚点相同的方式发挥作用.

Other methods include: - placing all the objects manually in some config first-run of the app - creating qr codes and placing them in set locations to act in the same way as the spatial anchors in the main idea above.

有人这样做吗,还有没有更好的方法可以在每个应用运行时在真实位置生成预定义的全息图?

Has anyone done this, and is there a better way of spawning pre-defined holograms at real-world locations every app run?

其他类似问题,但仍未解决我的用例: https://forums.hololens.com/discussion/2938/position-独立对象放置

Other questions looking for similar answers, but not solving my use-case: https://forums.hololens.com/discussion/2938/position-independent-object-placement https://forum.unity.com/threads/how-do-i-refer-to-a-specific-space-in-a-spatial-mapped-room.425525/

推荐答案

您将需要设置World锚点,以使Hololens记住全息图在扫描空间中的位置. (更多信息)

You will need to setup World anchors to let Hololens remember the position of holograms in your scanned space. (More info)

我尝试过,并且效果很好.

I tried it and this works pretty well.

这篇关于将物体放置在预先扫描的房间中的设定位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆