# Application Question (40 Points) Your task is to design a VR/AR application for a CNC machine manufacturer. The application should enable customers of the manufacturer to get a feeling about the working of the machine and discover possible inconsistencies of customer inputs: Unrealistic dimensions, final shapes etc. ### How the requirements are related? * The adopted CNC machine tool is a large and heavy mill-turn machine with the width up to eleven meters and weighted about 35 tons. * A head-mounted display (HMD) is attached to the developed VR CNC machine tool for the immersion viewing. * A user can see around the 3D scene of the large mill-turn machine and the operation of the virtual CNC machine can be actuated by bare hand. * Coolant can be added to demonstrate more realistic operation * Collision detection function is added to make the VR machine tool motions more authentic * This is accomplished by adding a collision-check object outside the 3D model, the object can be represented by rectangle, sphere, cylindr or in accordance with the mesh of 3D model. It would be most accurate by using the mesh geometry of 3D model to determine the collision, but the computational loading is also much heavier and costly. * In the VR machine tool, the color of the collided compoment will be changed to red and a warning audio will be played to remind the user when the collision is detected. * Elder persons might not adapt themselves easily to the VR-based scene because of eyesight issues (Presbyopia and Astigmatism) * Using Matlab to transform 2D desktop display to 3D display in VR robotics collaboration * Motion of machine tool * Robotic arm dynamic and simulation * In order to simulate the machine movement during the operation, both the Virtual and/or Real CNC Controllers can be employed to read the NC code. * The controller can interpret the NC code into motion information of each axis and then sends the information to the VR Client program. * The VR Client is connected to the VR Server of the VR Machine Tool by sending the information to the Virtual Controller. * The Virtual Controller issues commands to move the Machine Tool Model. ![](https://i.imgur.com/08Bn5H4.png =500x) * The motion functions are programmed in C# scripts. * A Virtual Controller allows for the user to operate the VR Machine Tool. * Functions: * machine tool axis motion, * tool change, * reference position return, * collision detection, and * NC decoding for controlling the machine. ### How would you design the application? Scene, Lightening, Objects, Collisions, Physics, Colors... * The 3D model of a huge mill-turn VR machine tool is 11 meters. * There is the kinematic chain of the machine tool. * In this kinematic chain, O is the starting origin, O* indicates that there is no relative motion with O. * C represents the rotation axis in C-axis, * W means workpiece, * Z represents the linear axis in the Z-axis direction, * X represents the linear axis in the X-axis direction, * B represents the rotation axis in B-axis, * Y represents the linear axis in the Y-axis direction, * S represents the rotation axis in sub-spindle, * T represents the rotation axis in tool, * T* represents the tip of tool and there is no relative motion relationship with T. ![](https://i.imgur.com/qmEbYRK.png =500x) ![](https://i.imgur.com/XYaPFUk.png =500x) ![](https://i.imgur.com/vqzuXm8.png =500x) * The machine components are split into two groups: * movable compoments and * fixed compoments * The compoments are classified by functions, for the mill-turn machine tool. There are: * the sheet metal parts, * the base, * the various moving linear axes, * the rotation axes, * the tailstock, * the turret, and so on. * The 3D model files of each component were exported and converted into the formats that were supported by the Unity 3DTM VR development environment. * In the VR machine tool, the color of the collided compoment will be changed to red and a warning audio will be played to remind the user when the collision is detected. ![](https://i.imgur.com/EqXXLc6.png =350x) ![](https://i.imgur.com/TCquzrn.png =400x) * In order to allow for the users to have more realistic experences when operating the machine tool, a gesture sensor was applied outside the VR HMD, thus the user's gestures were grabbed for controlling the control panel. ![](https://i.imgur.com/pxGpBKf.png =500x) ![](https://i.imgur.com/ie26mdI.png =500x) ![](https://i.imgur.com/asYwNsK.png =500x) ![](https://i.imgur.com/gE8gJfk.png =500x) ![](https://i.imgur.com/Ov543Ak.png =500x) ### How do you test and improve your application? Utilizing an Oculus Quest 2 and starting the application. Checking if the requirements are met as mentioned. If not, try to implement a solution. And of course by making use of Unity´s TestRunner. https://medium.com/xrpractices/test-driven-development-for-ar-vr-using-unity-ff7c9c181de5 ### How would you implement it in Unity or other tool? Unity: the go-to development environment for VR applications, highly adaptable, easy to use, lots of usable additional material, provides and manages physics ## Notes CNC-Maschinen (Computerized Numerical Control) sind Werkzeugmaschinen, die durch den Einsatz von Steuerungstechnik in der Lage sind, Werkstücke mit hoher Präzision auch für komplexe Formen automatisch herzustellen. https://www.researchgate.net/publication/319957305_Case_study_of_virtual_reality_in_CNC_machine_tool_exhibition https://www.sciencedirect.com/science/article/pii/S2212827112001916 https://www.ragni.me/papers/2016_intellisys/index.html https://ieeexplore.ieee.org/document/6761566 https://ieeexplore-1ieee-1org-1tn53mdt80de3.han.fh-campuswien.ac.at/stamp/stamp.jsp?tp=&arnumber=6761566 ___________________________________________________________________________ What is a CNC machine? Machine with 2 - 5 axis’s – used to automate production – programmed via CAD for example What do we produce? Desktop CNC Fräser – Absaugung, Drucker? Requirements: MoSCoW MUST The machine provides a control panel to show information about heat, drill speed, remaining work time. The machine automatically stops when opened during operation. The machine issues an audio warning when overheating. The machine gives visual and haptic feedback during calibration when collision is imminent. The customer can access the control panel to calibrate the machine and for maintenance. The customer can choose from given options what to produce. The customer can import the code to the CNC machine. The customer can start the machine. The customer can unplug the machine to stop it and replug it to continue. The customer can change the removable parts like the tool heads. The application works only with Oculus Quest 2. The application provides haptic, visual and audio feedback to the customer. SHOULD The customer can change the language of the displays and control panel between English and German. COULD WON´T No other CNC machine will be supported. The customer cannot upload his own CAD files or designs. The application will only support English and German. Design of the application: Scene, Lightening, Objects, Collisions, Physics, Colors … The scene includes the machine on a desktop, a chair and a lamp.