{"title":"Simulation and Visualization of Dynamic Systems in Virtual Reality Using SolidWorks, MATLAB/Simulink, and Unity","authors":"Ismail Akharas, M. Hennessey, Eric Tornoe","doi":"10.1115/IMECE2020-23485","DOIUrl":null,"url":null,"abstract":"\n This paper introduces a novel method for playing dynamic animations of rigid body assemblies with internal motions in virtual reality (VR). Through previous research over a decade ago, an inexpensive, relatively straight-forward process has been developed that entailed using SolidWorks, MATLAB/Simulink, and movie player software to permit one to view 2D MP4 files, such as on a laptop, smart phone, etc. Inspired by the usefulness of these previous results, the approach presented here targets a VR environment, clearly representing a technological leap over viewing 2D MP4 files. It’s made possible by recent advances in VR & gaming software (e.g. Unity) along with some unique software interfacing, including use of CADLink, to permit importation of CAD files, such as from SolidWorks, into Unity. Those interested in VR visualization of their dynamic system can use the step-by-step process presented as a manual to guide them through the hardware and software setup and ultimately learn how to use SolidWorks, MATLAB/Simulink, and Unity interactively to visualize their simulations in VR. Another key point is that the analyst has considerable control and access over each step in the process, including the dynamic modeling, unlike that commonly found in large, structured dynamic simulation software packages.\n As an example to illustrate the process, a dynamic simulation of a classic pendulum/slider system was created using MATLAB/Simulink, which in effect numerically solves the ordinary differential equations of motion. The time-dependent displacement data for both the slider’s lateral movement and the pendulum’s angle, along with a time vector in incremental difference form, was saved as an Excel file. In turn, it was read by a C# script residing within Unity to permit an animation playback scenario of the SolidWorks CAD model of the entire pendulum/slider system (previously brought into Unity via CADLink with some reassembly), viewed more generally as an assembly with internal motions. Unity, a popular open-source piece of VR game development software used to produce both 2D and 3D video games and simulations, then serves as a platform to access the virtual world with the aid of an Oculus Rift (or Quest) VR headset and two hand controllers. In the end, the VR viewer can physically move around in the VR environment while at the same time view the playback motion of the pendulum/slider system from varying vantage points, just as one would expect in the real world. This work significantly advances the typical visualization experience with respect to dynamic system simulation & animation in addition to being widely applicable to generic mechanical assemblies.","PeriodicalId":23585,"journal":{"name":"Volume 7A: Dynamics, Vibration, and Control","volume":"75 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2020-11-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Volume 7A: Dynamics, Vibration, and Control","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1115/IMECE2020-23485","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
This paper introduces a novel method for playing dynamic animations of rigid body assemblies with internal motions in virtual reality (VR). Through previous research over a decade ago, an inexpensive, relatively straight-forward process has been developed that entailed using SolidWorks, MATLAB/Simulink, and movie player software to permit one to view 2D MP4 files, such as on a laptop, smart phone, etc. Inspired by the usefulness of these previous results, the approach presented here targets a VR environment, clearly representing a technological leap over viewing 2D MP4 files. It’s made possible by recent advances in VR & gaming software (e.g. Unity) along with some unique software interfacing, including use of CADLink, to permit importation of CAD files, such as from SolidWorks, into Unity. Those interested in VR visualization of their dynamic system can use the step-by-step process presented as a manual to guide them through the hardware and software setup and ultimately learn how to use SolidWorks, MATLAB/Simulink, and Unity interactively to visualize their simulations in VR. Another key point is that the analyst has considerable control and access over each step in the process, including the dynamic modeling, unlike that commonly found in large, structured dynamic simulation software packages.
As an example to illustrate the process, a dynamic simulation of a classic pendulum/slider system was created using MATLAB/Simulink, which in effect numerically solves the ordinary differential equations of motion. The time-dependent displacement data for both the slider’s lateral movement and the pendulum’s angle, along with a time vector in incremental difference form, was saved as an Excel file. In turn, it was read by a C# script residing within Unity to permit an animation playback scenario of the SolidWorks CAD model of the entire pendulum/slider system (previously brought into Unity via CADLink with some reassembly), viewed more generally as an assembly with internal motions. Unity, a popular open-source piece of VR game development software used to produce both 2D and 3D video games and simulations, then serves as a platform to access the virtual world with the aid of an Oculus Rift (or Quest) VR headset and two hand controllers. In the end, the VR viewer can physically move around in the VR environment while at the same time view the playback motion of the pendulum/slider system from varying vantage points, just as one would expect in the real world. This work significantly advances the typical visualization experience with respect to dynamic system simulation & animation in addition to being widely applicable to generic mechanical assemblies.