# Extended Reality Application Framework for a Digital-Twin-Based Smart Crane
## 4 Discussion
### Service Layer  
We used Unity as the physical engine platform in the service layer. The advantages of Unity are obvious: it is free for the non-profit developers and accessible for the potential practitioners; Comprehensive documentation and extensive packages can be easily accessed; it supports the OpenXR standard, as well as provides the specific SDK for the Microsoft HMD, to largely increase the development efficiency; its cross-platform capability guarantees the reusability of the asset among different devices. The crane model and functional scripts developed in Unity can be repeatably used in different applications and built to the targeting terminal devices according to the applied scenarios. Furthermore, the various network APIs of Unity empowers interoperability, realizing the data interaction between the service layer and the network layer.  
VR training empowers workers' skill acquisition in industrial contexts. It is especially important in operations that pose some risk due to repeated actions during the work. For instance, virtual training can benefit the workforce by providing a safe environment without exposing them to potential risks. On the other hand, VR training is cost-efficient for discrete event simulation. Our case enables us to provide an immersive experience integrated with the aforementioned multi-feature, i.e., virtual hand, multimedia, and multimodal interaction. Meanwhile, the VR design document provides a comprehensive guide for the developers. However, to further improve the immersion and avoid the strangeness of the VR environment, a remote controller shall be designed that is compatible with Unity to substitute the self-contained controllers of the XR HMD (Head-Mounted Device). For the VR device, Oculus and Varjo support different operating systems, Android and Windows, respectively. Based on the cross-platform property of Unity, only the corresponding user interfaces were redesigned for the different controllers, and other assets can be commonly used in two VR headsets. Oculus Quest 2 is a wireless device providing enough mobility for the user; however, it is hard to provide high-resolution rendering and real-time data processing due to its limited computing capability. In the meantime, Varjo XR-1 is a cable-connected device offering excellent rendering and powerful computing ability. Hence, for the high requirements of synchronized data analysis and a more immersive experience, Varjo can be a better choice, while Oculus is suitable for the extensive movable scenarios. For the MR device, HoloLens can free the user's hands and provide more virtual information superimposed on the physical machine. HoloLens is suitable for the operator to use onsite to complete repeated complicated assembly work or maintenance work.  
Additionally, DT empowers the accessibility of the data and information transmitted in the industry via integrated communication chains [66]. Leveraging the XR technology, most of the monitoring data could be visualized in the XR environment, and used for monitoring, supervising, and controlling remotely the production processes. Based on the development framework, we effectively developed cross-platform and multi-function applications, namely, the remote monitor app and the remote control app. The framework also maximized the reusability of the virtual assets. Because the facility of the \"Ilmatar\" crane is under reconstruction, the feasibility of the apps interacted with the simulated model, and the latency and performance of the applications shall be measured and evaluated with the physical device in the future.