Next Article in Journal
An Audiovisual Correlation Matching Method Based on Fine-Grained Emotion and Feature Fusion
Previous Article in Journal
UAV Visual and Thermographic Power Line Detection Using Deep Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Unity and ROS as a Digital and Communication Layer for Digital Twin Application: Case Study of Robotic Arm in a Smart Manufacturing Cell

1
Polymer, Recycling, Industrial, Sustainability and Manufacturing Research Institute, Athlone Campus, Technological University of Shannon: Midland and Midwest, N37 HD68 Athlone, Ireland
2
Software Research Institute, Athlone Campus, Technological University of Shannon: Midland and Midwest, N37 HD68 Athlone, Ireland
*
Author to whom correspondence should be addressed.
Sensors 2024, 24(17), 5680; https://doi.org/10.3390/s24175680
Submission received: 8 July 2024 / Revised: 16 August 2024 / Accepted: 29 August 2024 / Published: 31 August 2024
(This article belongs to the Special Issue IoT, Big Data and Artificial Intelligence in Smart Manufacturing)

Abstract

:
A digital twin (DT) is a virtual/digital model of any physical object (physical twin), interconnected through data exchange. In the context of Industry 4.0, DTs are integral to intelligent automation driving innovation at scale by providing significant improvements in precision, flexibility, and real-time responsiveness. A critical challenge in developing DTs is achieving a model that reflects real-time conditions with precision and flexibility. This paper focuses on evaluating latency and accuracy, key metrics for assessing the efficacy of a DT, which often hinder scalability and adaptability in robotic applications. This article presents a comprehensive framework for developing DTs using Unity and Robot Operating System (ROS) as the main layers of digitalization and communication. The MoveIt package was used for motion planning and execution for the robotic arm, showcasing the framework’s versatility independent of proprietary constraints. Leveraging the versatility and open-source nature of these tools, the framework ensures interoperability, adaptability, and scalability, crucial for modern smart manufacturing applications. Our approach was validated by conducting extensive accuracy and latency tests. We measured latency by timestamping messages exchanged between the physical and digital twin, achieving a latency of 77.67 ms. Accuracy was assessed by comparing the joint positions of the DT and the physical robotic arm over multiple cycles, resulting in an accuracy rate of 99.99%. The results highlight the potential of DTs in enhancing operational efficiency and decision-making in manufacturing environments.

1. Introduction

Digital twins (DTs) are becoming increasingly important across a variety of industries for the virtual mapping of physical systems and processes. A digital twin (DT) is a virtual replica that mimics its physical twin in real time, and vice versa [1]. This continuous data exchange differentiates DTs from digital shadows, which only reflect changes after the fact, lacking the immediate feedback loop essential for dynamic and adaptive systems [2]. DTs are used in manufacturing to simulate production processes and optimize efficiency, in aerospace to simulate aircraft behaviour and predict performance, in construction to optimize building design and construction processes, and in healthcare to simulate and predict the behaviour of biological systems. The wide range of DT applications showcases its versatility and transformative potential, making it a powerful tool for optimization, prediction, and decision-making in various industries [3].
Robotics in manufacturing are well-known for enhancing productivity and product quality due to their durability, accuracy, and flexibility. DTs can describe, control, and display robotic systems’ behaviour in real time, enabling the intelligent perception, simulation, understanding, prediction, and optimization of manufacturing processes [4,5]. This supports developing control strategies to boost productivity and product quality while reducing costs [6,7,8]. Moreover, by simulating real-world conditions, DT allows for extensive testing of the equipment and operators’ training without the risks associated with physical prototypes, such as damage to the equipment or safety hazards to staff [3]. DT also minimizes the environmental impact of manufacturing processes by optimizing resource utilization and reducing waste [9]. Applied across all production stages—from design and prototyping to testing and maintenance—DTs, integrated with IoT, AI, and big data analysis, are revolutionizing product design, manufacturing, and servicing [10,11]. This holistic approach is pivotal in industries ranging from healthcare, where robotic arms are used for remote surgery [12], to construction, agriculture, and the military [13,14].
To harness these benefits, robust digital and communication layers are required. Such layers enable effective communication and collaboration between the physical and digital worlds. The use of DTs in robotics is also becoming more accessible to small- and medium-sized businesses, as a result of the availability of open-source platforms and affordable hardware [15]. Unity is a game engine technology that can be applied to create 3D digital representations of physical systems. It supports the creation of complex and dynamic models that faithfully replicate real-world elements in a virtual environment, making it popular within research for DT development [16]. Conversely, Robot Operating System (ROS), an open-source framework for robot software development, stands out as a powerful middleware that simplifies the communication between a physical and digital counterpart. ROS provides a collection of tools, libraries, and conventions that simplifies the task of creating complex and sophisticated robot behaviours [17]. The integration of Unity and ROS in the realm of DT technology represents a significant leap in bridging the gap between virtual simulations and physical robotics.
Despite significant advancements in DT technology, notable limitations and gaps remain in the current research. A major challenge is the scalability of DTs, especially in large and complex industrial settings where real-time data integration from multiple sources is necessary. In this work, we evaluate the proposed Unity/ROS framework as a conduit for real-time data exchange, addressing a well-known and challenging problem [3,18]. This paper aims to address some of these limitations by presenting the potential of Unity and ROS as foundational layers for digitalization and communication in the development of DTs. Additionally, while many studies concentrate on specific case studies or applications, there is a shortage of comprehensive frameworks that can be broadly applied across various industries. The methodology adopted in this study is centred on a case study of a robotic arm in a smart manufacturing cell, demonstrating the practical application and efficacy of our approach, which can be adapted for any industry using robotic arms. Moreover, while many studies discuss the implementation of Unity and ROS for DT development, there is a scarcity of detailed technical assessments regarding their real-time performance. Our study thoroughly evaluates and analyzes the latency and accuracy of the system, highlighting the framework’s efficiency and reliability. The accuracy tests assess how accurately DT mirrors the movements and positions of the physical robotic arm by comparing their joint positions over time. On the other hand, the latency tests measure the delay between commands given to DT and the corresponding actions carried out by the physical robotic arm. The proposed framework is designed to be flexible and scalable, facilitating the seamless adaptation to different robotic systems and industrial scenarios. By bridging the digital and physical worlds seamlessly, this paper contributes to the broader discourse on intelligent automation and the future of robotics in various industries.

1.1. Related Work

The development of DTs for robotic arms using ROS has become increasingly vital for enhancing simulation capabilities, real-time monitoring, and control accuracy in the robotics industry. S. Baidya et al. [19] created an ROS-based DT of the Franka Emika Panda robot using the Gazebo simulator, emphasizing autonomous and remote operations to manage environmental uncertainties and ensure safety. N. Kousi et al. [20] developed the DT of an assembly line employing mobile dual-arm robots that move throughout the factory, multitasking as well as assisting people, thereby improving the overall efficiency of the factory. G. Garg et al. [21] also built the ROS-based DT of a Fanuc robot which can be used for trajectory programming for complex edges and space-constrained environments, and gathering synthetic data for machine-learning applications. T.I. Erdei, R. Krakó, and G. Husi [22] developed the DT of a training centre for an industrial robotic arm, KUKA KR5, for educational purposes. Their aim was to provide training to the students using this DT of this industrial lab in a safe environment before they start the actual physical training to reduce the risk of accidents while also reducing the costs associated with physical installations and maintenance. Similarly, Z. Wang et al. [23] developed a bidirectional linkage robot DT system for educational purposes based on ROS, enhancing the real-time monitoring and control of the robot. For teleoperation and visualization purposes, D. Diachenko et al. [24] developed a DT of the OMRON TM5-900 collaborative industrial robot, highlighting the use of the MQTT protocol for synchronization and advanced user interfaces. N. Kousi et al. [25] also previously created a DT for reconfigurable assembly systems to integrate human–robot collaboration to enhance system flexibility and adaptability in production lines in the automotive sector. While significant progress has been made in developing DTs for robotic arms, a comprehensive solution integrating various capabilities remains elusive. Each study contributes uniquely, but challenges such as complexity in integration, and specific application limitations persist. Additionally, except for G. Garg et al. [21], none of the aforementioned works of research had tested their DT performance. The contributions of ROS-based DT developed by researchers is summarized in Table 1.
Currently, researchers are also combining DTs with other technologies such as virtual reality (VR), machine learning (ML), and reinforcement learning (RL) to enhance their functionality and applicability. V. Havard et al. [26] proposed an architecture for the co-simulation and communication between DTs and VR software for human–robot collaborative workplace design and assessment. By integrating DTs and VR, they created a more realistic and immersive environment for designing and testing collaborative robot workspaces in contrast to the traditional methods, which often rely on static models or less interactive simulations, lacking dynamic real-time interaction.
A VR-based DT for multi-robot systems was developed by L. Pérez et al. [27], which could be used for operator training, real-time monitoring, and feasibility studies of future optimizations. It also allowed for a more interactive and dynamic training environment for robot operators, improving their skills and performance. Researchers are also integrating DTs of robots with RL to virtually train a robotic arm to complete a given task [28,29,30]. The use of RL with DTs allows for the more effective training of robots and enables them to adapt to changing environments and tasks. In addition, using ML with DTs, researchers have been able to train industrial robots for adaptive path planning to bypass objects and people in the workspace, making it safer for human operators [31]. Overall, combining DTs with VR, RL, and ML opens new avenues for research and development in the field of robotics, enabling researchers to create more advanced and efficient robotic systems that can adapt to changing environments and tasks. The landscape of the related literature burgeons with instances where the integration of game engines with ROS has propelled DT creation to new heights, thereby underpinning the essence of our architectural choices.
The field of DT in robotics has seen significant contributions, particularly in the integration of game engines and simulation platforms. While the use of ROS and game engines like Gazebo and Unity is not novel, our approach to integrate Unity with ROS is unique in terms of targeting enhanced real-time performance and high accuracy in smart manufacturing applications. Importantly, the accessibility and open-source nature of these tools, especially ROS and Unity (for students and researchers), play a crucial role in our approach. By leveraging open-source software, we can ensure that our solutions are widely accessible to the research community and industry practitioners, fostering innovation and collaboration. Our focus is on combining Unity and ROS for advanced scalability and flexibility, in addition to the latency and accuracy analysis. As a result, it has many applications in line with Industry 4.0 and 5.0. Our work, thus, not only builds upon but also significantly expands the scope of DT applications in the realm of intelligent automation.

1.2. Game Engines for DT

Game engines are traditionally used by software developers to design video games, providing developers with powerful tools for creating highly immersive and realistic experiences. They are excellent software for accurately simulating light reflection, particles, gravity, and other real-world aspects [32]. However, game engines are not just limited to the gaming industry, and their advanced features have opened new possibilities for creating DTs of real-world objects and systems [33]. Owing to the rapid development in game engines, their functionalities of visualizing, training, and testing have opened them up for application in creating DTs of several things such as vehicles [34,35], robotics/manufacturing [21,29,36], smart cities [37,38], etc. to optimize operations, reduce costs, and improve safety.
Game engines allow us to accurately create DTs that simulate complex systems and environments (Figure 1). Unity, as one game engine example, provides a realistic and immersive environment for visualizing and interacting with the digital world. Its robust physics engine enables accurate collision detection and realistic object behaviour, enabling researchers to assess the feasibility and safety of various manufacturing processes [39]. Another recently emerging possibility with game engine technology is their ability to generate synthetic data in a shorter time, which can be used to train AI models. This is particularly useful in industries such as autonomous vehicles and robotics, where AI is being used to automate processes and improve efficiency. Unity is one of the most popular game engines with a large community of developers and a wide range of features and capabilities. The benefits of using Unity, in particular, include flexibility, ease of use, and extensive community support.
Besides all the aforementioned benefits, another reason for choosing Unity for creating the digital model is its compatibility with ROS. ROS facilitates seamless communication between digital simulations and physical objects. It enables the real-time transmission of control commands and sensor data to improve simulation accuracy [40]. In this work, a case study of a robotic arm DT using Unity and ROS as the digital and communication layers, respectively, has been developed as part of an intelligent manufacturing cell. The integration of Unity with ROS enhances its flexibility in adoption, regardless of the type of robotic arm used. This integration not only demonstrates the practical applications of DTs but also highlights the potential for future advancements in smart manufacturing technologies.

2. Methodology

The setup of DT comprises three distinct but interconnected layers: physical, digital, and communication layer. This section provides an overview of these layers followed by the system architecture. This architecture is not just a framework for combining different layers but a designed system that ensures dynamic, real-time interaction and adaptation of the DT based on continuous data feedback.

2.1. Setup

2.1.1. Physical Layer

The physical setup of the manufacturing cell or pilot line has been described in detail in [41] for the interested reader. The two primary components are: the physical robot; and the digital model created in Unity. The robotic arm used for the experimentation is ABB IRB 1200-5/0.9 (ABB Ltd., Warrington, UK). The specifications and other information regarding the working range and maximum speed of each axis of the robotic arm are listed in Table 2. These specifications dictate the performance and capability of the robotic arm. The IRC5 compact controller, developed by ABB, controls the I/O ports and connects the robotic via Local Area Network (LAN) port, allowing its connection to ROS scripts. The controller utilizes the EtherNet/IP communication protocol, which operates over IEEE 802.3 for real-time communication between industrial devices.
The operational environment for the robotic arm is a smart manufacturing cell designed to replicate typical conditions in modern industrial settings. The manufacturing cell is configured to handle tasks that require high precision and flexibility, such as assembling small components, manipulating delicate materials, and coordinating with other automated systems. The robotic arm operates within a predefined workspace equipped with safety barriers and monitoring systems to ensure safe interaction between the robotic arm and human operators. The physical setup not only provides a realistic environment for testing the DT but also ensures that the findings are applicable to a wide range of industrial contexts, thereby enhancing the study’s relevance and impact.

2.1.2. Digital Layer

A digital model of the robotic arm was developed in Unity. The digital model replicates the physical robot’s movements and interactions with high accuracy, enabling comprehensive simulation and analysis. In the study Unity version 2022.3 was used for creating DT. There are some prerequisites for Unity to be imported, in order to create the simulation. The packages used are listed in Table 3. These packages facilitate the integration of Universal Robot Description Format (URDF) files and enable connection between Unity and ROS. All these packages are by Unity technologies and are available on GitHub [43]. The simulation created in Unity was controlled by ROS. ROS-Unity communication can be implemented using various methods, namely, ROS#, ROS-TCP-Connector, and ROS.NET. Among these, ROS-TCP-Connector is recommended due to its superior performance, exhibiting the lowest latency and highest publishing rates across most data sizes [44].

2.1.3. Communication Layer

Robot Operating System (ROS) serves as a communication layer for the creation of a DT. ROS is an open-source framework widely adopted in the robotics community due to its versatility and extensive support for various hardware and software platforms [45]. In this study, we used ROS Noetic, the latest long-term support release, which provides improved stability and support for Ubuntu 20.04. ROS provides a robust and flexible framework that enables seamless communication and data exchange between different components of the DT, including the virtual manufacturing cell and physical robot. By leveraging ROS’s publisher–subscriber architecture, a reliable and efficient communication channel can be established, facilitating the exchange of sensor data, control commands, and state information in real time [40].
In the publisher–subscriber model, the publisher node sends out information/messages to a topic, while the subscriber node receives this information by subscribing to the same topic. The nodes operate independently without any direct knowledge of one another, interacting exclusively through the exchange of messages on agreed-upon topics. This approach allows for loose coupling and high flexibility [46]. This setup ensures synchronization of the virtual and physical environments, ensuring that the DT accurately reflects the behaviour and performance of the manufacturing cell. ROS owing to its modular design also allows developers to easily integrate and customize different nodes and packages to meet specific application requirements. In addition, ROS’s extensive library of built-in communication protocols and message types simplifies the implementation of data exchange, enabling researchers to focus on developing high-level control algorithms and simulation scenarios.
The use of ROS as a communication layer enhances the fidelity and interactivity of the DT, enabling detailed analysis and optimization of manufacturing processes with a higher degree of accuracy and realism [47]. Furthermore, ROS’s active community and extensive documentation provide valuable resources for troubleshooting and continuous improvement, making it a preferred choice for developing advanced robotic applications.

2.2. Creation of DT

The architecture presented in Figure 2 was designed to ensure high fidelity and real-time synchronization between the physical twin and its DT. The architecture consists of several key components:
  • Robot Controller: This manages the physical movements of the robotic arm, ensuring precise execution of tasks. It interacts with the actuators and sensors to implement control algorithms developed in MoveIt 1 - Noetic.
  • ROS Publisher/Subscriber: The ROS Publisher broadcasts critical data such as status updates, sensor readings, and commands. The ROS Subscriber listens for incoming messages, including simulation results and new instructions for the DT, maintaining a continuous feedback loop.
  • TCP Server: The Transmission Control Protocol (TCP) Server facilitates a Transmission Control Protocol/Internet Protocol (TCP/IP)-based communication protocol for the exchange of information between ROS and Unity. This server ensures reliable and efficient data transfer, minimizing latency and maximizing synchronization accuracy.
  • Unity’s Articulation Body: This acts as the digital counterpart of the physical robot, where the robot’s behaviours and potential movements are simulated with high fidelity by subscribing to the ROS messages. It leverages URDF to accurately replicate the robot’s physical properties and motion dynamics within the simulation environment. The articulation body ensures that the DT behaves in a manner that is consistent with the physical robot, providing a realistic simulation environment.
  • MoveIt: Within ROS, MoveIt orchestrates complex maneuvers by enabling collective planning and movement control of multiple robotic joints. MoveIt’s advanced algorithms allow for precise motion planning, collision avoidance, and task execution, which are critical for complex robotic operations.
This integrated architecture empowers the DT system to not only mirror the physical robotic arm in real time but also employ predictive and adaptive strategies that refine the robot’s operations. Such a system is invaluable in smart manufacturing settings where the DT can simulate, optimize, and improve the robotic arm’s functions in real time, ensuring maximum efficiency, safety, and productivity. The continuous data feedback loop between the physical twin and DT enables ongoing performance improvements and operational insights.

2.2.1. Importing URDF to Unity

Universal Robot Description Format or URDF is a specification to describe a robot in ROS based on Extensible Markup Language (XML) [48]. It provides information about the kinematic and dynamic description of the robot, visual representation of the robot, and collision model of the robot. The description of a robot consists of a set of link elements, which represent the physical components of the robot, and a set of joint elements that connect the links and define their relative motion.
The URDF-Importer package allows developers to import a URDF file directly into Unity. This import process ensures that all the physical attributes and constraints of the robot are accurately represented in the digital model, providing a high-fidelity simulation environment. This enables the simulation of all the links and joints of the robot within the Unity environment. Both Unity and ROS share the same copy of the robot descriptor URDF, ensuring that the simulated robot in Unity accurately reflects the physical robot being controlled by ROS. In this setup, Unity serves as the main source of information regarding the joint state of the robot, allowing developers to test and refine their control algorithms in a virtual environment before deploying them on the physical robot

2.2.2. Integration of Unity and ROS

To enable communication between Unity and ROS, a TCP endpoint is used to handle all messages passing between the two systems. This endpoint runs as an ROS node and provides the necessary functions for publishing, subscribing, and calling services on the ROS side. On the Unity side, an ROSConnection component is used to interface with the TCP endpoint and manage communication with ROS.
For messages to be correctly passed between Unity and ROS, they must be serialized in the same way as ROS serializes them internally. This is achieved using the MessageGeneration plugin, which generates C# classes from ROS messages. These classes include serialization and deserialization functions that allow messages to be correctly encoded and decoded when being passed between Unity and ROS [49].
By using this architecture, developers can integrate Unity and ROS (Figure 3), allowing rapid development and testing of complex robot behaviours in a virtual environment before deploying them on physical hardware.

2.2.3. MoveIt for Motion-Planning

MoveIt is a powerful motion-planning library for the ROS developed by D. Coleman et al. [51]. It is an open-source software framework that can be used in a wide range of robotic applications, including manufacturing, logistics, and service robotics. MoveIt provides a comprehensive suite of tools for motion planning, collision checking, kinematics, and control, making it an indispensable component of our DT architecture. MoveIt has been designed to be modular, extensible, and easy to use, allowing developers to quickly and efficiently develop motion-planning and control applications for robots. A key feature of MoveIt is its ability to generate pick-and-place motions for different object types. This allows robots to perform a wide range of tasks such as assembling parts, packing boxes, or handling delicate objects. MoveIt also includes tools for calculating the forward and inverse kinematics of a robot, which are essential for accurately controlling its movements. For our study, MoveIt 1 - Noetic was used for used.
In addition to its motion-planning capabilities, MoveIt provides extensive functionality for planning collision-aware trajectories. This ensures that the robot can move safely and efficiently within its environment without colliding with obstacles or other objects. MoveIt also integrates with Unity, allowing developers to use the information streamed from the Unity simulation to plan the robot’s route and send the arm path back to Unity for manipulation of the joints [49]. Overall, MoveIt is a powerful tool for developing advanced motion-planning and control applications for robots. Its modular design and extensive functionality make it an ideal choice for developers working on a wide range of robotic projects, ensuring flexibility and scalability.
Integrating Unity with MoveIt allows us to take advantage of the advanced simulation capabilities of Unity and the powerful motion-planning tools provided by MoveIt. To integrate Unity with MoveIt, the ROS-TCP-Connector package has been used. This allows Unity to send information about the simulated robot and its environment to MoveIt, which can then be used to plan collision-free trajectories for the robot. Once a trajectory has been planned, MoveIt can send the arm path back to Unity, where it can be used to manipulate the joints of the simulated robot.

3. Experimentation and Results

Latency and accuracy tests were conducted on the developed DT to analyze its responsiveness and feasibility. These tests are critical for validating the DT’s performance in replicating real-world operations. The latency analysis underscores the real-world applicability of the DT, shedding light on potential avenues for reducing communication delays. Meanwhile, a thorough accuracy assessment through statistical and graphical analyses elucidates the correlation between the joint positions and movements of the DT and the physical robotic arm over time. The results from these tests are essential for identifying potential improvements and ensuring that the DT can be reliably used in various industrial applications.

3.1. Latency

Calculating the latency between a physical robotic arm and its DT involves measuring the time delay in the communication pipeline. This was achieved using timestamping messages sent and received between the physical robotic arm and the DT, and then computing the time difference. Over 5000 trajectory points were evaluated to provide a robust dataset for latency analysis. Latency data were used to calculate the mean latency and standard deviation, thereby assessing the system’s stability and performance variability. The results are presented in Figure 4. They show the time delay (in milliseconds) between command issuance and execution, capturing the lag of the DT in replicating the physical robotic arm’s operations. The DT exhibited a mean latency of 77.67 ms ± 15.74 ms. Low latency levels are essential for real-time applications in smart manufacturing environments. The standard deviation of 15.74 ms indicates a moderate level of variability in the system’s latency. This variability can be a critical factor for applications that demand uniform response times. Although the average latency suggests that the system is relatively swift, the range of latency values highlighted by the standard deviation underscores areas for further refinement and improvement.
The analysis of latency measurements suggests a stable performance. However, there are sporadic spikes that indicate infrequent delays in communication. These deviations may be attributed to a myriad of factors, such as network congestion or processing delays, which provide a focal point for further potential optimization. The system was connected to a local area network (LAN) with a high bandwidth and low latency, but occasional spikes were still observed. Understanding the root causes of these spikes can help in developing strategies to mitigate them, such as optimizing network configurations or enhancing processing efficiency. The ability of the DT to maintain a relatively low and stable latency highlights the efficiency of Unity and ROS integration for real-time control and feedback, ensuring that the DT can be reliably used in continuous and demanding industrial processes, enhancing both productivity and safety.

3.2. Accuracy

To calculate the accuracy, the joint movement data of the DT and actual robotic arm need to be compared. It involves the comparing of the joint positions of the two systems and computing the error or difference between them. This comparison is critical for assessing how well the DT replicates the physical robot’s movements and for identifying any discrepancies that could affect performance. To minimize bias and ensure the precise measurement of accuracy, the tests were conducted for an extended duration over multiple cycles. Each cycle consisted of a randomized set of movements and joint positions, generated by a predefined algorithm, designed to simulate a variety of operational scenarios and ensure a diverse range of actions that the robotic arm might encounter in actual use. To ensure that tests reflect real-world industrial conditions, each cycle was carried out continuously over an eight-hour period, which is representative of a typical work shift. To validate the consistency of these results, the procedure was repeated across three distinct test cycles. Long-duration testing helps in capturing a comprehensive set of data, reflecting various operational conditions and potential anomalies. During each cycle, all six joint angles published by both the physical and digital robots on different ROS topics were captured in real time. The ROS ‘rosbag’ tool was used to record the data streams, ensuring that the joint angles for each robotic arm were accurately logged without any loss of information. The joint angle of the real robotic arm was then compared against the digital one. The data collected from these cycles are illustrated in Figure 5, providing a comprehensive view of the DT’s performance in terms of accuracy across repeated operations.
Both actual errors and normalized errors were calculated to provide a comprehensive understanding of the DT’s accuracy, along with their standard deviation, which was calculated to understand the variability in the accuracy measurement across different joints.
The normalized error (Equation (1)) provides a scale-independent measure of error, making it possible to compare errors across different joints having varying ranges of motion. This approach ensures that the focus is on the proportional significance of an error rather than its actual magnitude, which is crucial in applications where the impact of an error is more about its relative size compared to the operational range. For instance, a small angular error in a joint with a limited range of motion could be more critical than the same error in a joint with a much larger range. By normalizing errors, they are expressed in terms of the total possible movement range, offering a more intuitive and standardized way of understanding their significance. It also ensures that the focus is on the proportional significance of an error rather than its actual magnitude, which is crucial in applications where the impact of an error is more about its relative size compared to the operational range, rather than the actual size itself.
Normalised   Error = A c t u a l   E r r o r R a n g e   o f   m o t i o n
The range of motion of all the joints has already been listed in Table 2. Figure 6 shows the normalized errors of all the joints at different cycles. The average/mean of absolute values of actual errors (MAE) and normalized errors (MNE) for each cycle are presented in Table 4 along with the overall average for all joints. Table 5 presents the standard deviation of actual errors (SDAE) and normalized errors (SDNE) for all the joints in each cycle as well as all cycles combined.
The accuracy for each joint was calculated using Equation (2). Although the working range of the joints is large, due to the cyclical nature of the angles, the maximum error that could be determined without an additional rotational context would be 180°. Thus, the accuracy of each joint based on the MAE is 99.99%, except for Joint_2, which has an accuracy of 99.91%, and, for the NME, it is 99.99–100%. Thus, the overall accuracy of the DT (Equation (3)) is also 99.99%. Such high levels of accuracy are critical for ensuring that the DT can be relied upon for precise control and simulation in real-world applications.
Accuracy = 1 Mean   Error Maximum   Possible   Error × 100
Overall   accuracy = Accuracy 6
The standard deviation in the accuracy measurements for each joint of the DT reveals significant insights into the system’s performance. Specifically, the pooled standard deviation for the normalized accuracy data is approximately 0.000208, which is notably low. This minimal variation indicates that the accuracy of the DT is remarkably consistent across different joints, highlighting its consistency and precision in mirroring the physical robot.
The precision of the DT’s joint movements, as indicated by the high accuracy percentages, reaffirms its reliability for simulating the physical robot’s functions. Notably, Joint_2 displays a slightly lower accuracy than the others, which could be attributed either to the mechanical fault in the physical robotic arm itself or its URDF file which is simulating Joint_2 not accurately. This observation is valuable for identifying which joints or movements might require closer attention or recalibration in the physical robotic arm to ensure optimal performance. Addressing these discrepancies can further enhance the DT’s fidelity and its applicability in precision-critical tasks.
Moreover, the near-perfect normalized error metrics underscore the DT’s capability to replicate the robot’s movements within a margin that is functionally negligible, which is particularly advantageous in precision-critical applications. Such precision ensures that the DT can be used for tasks requiring high accuracy, such as assembly operations, quality inspections, and complex manipulations.
Nonetheless, it is crucial to acknowledge that, despite the accuracy observed, minor deviations can lead to significant impacts over an extended period or complex tasks. Consequently, the continuous monitoring and adjustment of the DT may be necessary to maintain this level of accuracy, ensuring that it remains a reliable tool for predicting and improving the performance of the physical robot. Regular calibration and updates to the DT based on real-world performance data can help in maintaining its accuracy and effectiveness.

4. Discussion

As we journey towards Industry 5.0, the demand for customization over mass production is increasing, which can be achieved by intelligent systems such as DTs which can increase productivity and competitiveness in the market. The DT is the most consistent and upward trend in the domain of industrial robotics [52]. They enable more flexible and adaptable manufacturing processes, which are essential for meeting the diverse and changing needs of modern consumers. Game engines have expanded beyond their traditional use in the gaming industry and are now being used to create DTs for a wide range of applications [33]. With their advanced features and capabilities, game engines such as Unity are becoming essential tools for industries seeking to optimize their operations and improve efficiency. The integration of game engines with robotic systems provides a highly interactive and visually rich platform for simulation, testing, and development, which significantly reduces the time and cost associated with physical prototyping. With the increasing popularity and demand for DT technology, this tool is expected to play a significant role in the future of robotics and automation across all industries [53].
Integrating Unity with MoveIt provides a powerful development environment for robotics applications. By combining the advanced simulation capabilities of Unity with the powerful motion-planning tools provided by MoveIt using ROS, developers can rapidly develop and test complex robot behaviours in a virtual environment before deploying them on physical hardware. This integration not only accelerates the development process but also enhances the reliability and safety of robotic systems by enabling extensive testing and refinement in a controlled environment. ROS ensures that the DT can not only mirror its physical twin in real time but also adapt and evolve based on continuous data flow [54]. The synergy of Unity’s visualization strengths and ROS’s robotic control capabilities paves the way for advanced DT applications, where real-time feedback and adaptive responses are crucial. The fusion of Unity, ROS, and MoveIt opens a robust development avenue for robotics applications, fortifying the groundwork for a transition towards Industry 5.0. The case study encapsulated in this paper accentuates the essential role of game engines in optimizing operations and bolstering efficiency across industries. This integrated approach also underscores the importance of real-time data processing and adaptive control in modern manufacturing environments.
Latency is a crucial factor as it influences the DT’s responsiveness. In a manufacturing context, low latency ensures that the DT can react in real time to changes in the physical environment, which is vital for applications requiring immediate feedback and adjustment. On the other hand, accuracy is vital for ensuring that the DT accurately mirrors its physical twin. High accuracy in the DT translates to its ability to simulate the physical system and its performance reliably, which is essential for optimizing manufacturing processes and achieving significant improvements in efficiency and quality. Combining low latency and high accuracy in DTs can significantly improve manufacturing practices by enabling more efficient and precise operations. Real-time data synchronization and accurate simulations allow manufacturers to optimize processes, minimize downtime, and enhance product quality [55]. Furthermore, the capability to simulate and test scenarios virtually before physical implementation can conserve time and resources, fostering greater efficiency and innovation in the manufacturing sector [3]. Furthermore, the consistent and reliable performance of the DTs, as evidenced by the accuracy and latency tests, confirms their potential to revolutionize not just manufacturing but also other sectors where robotics plays a critical role. Since DT accurately depicts the physical assets in real time, it can be implemented to respond to unexpected situations or abnormalities during operation, including sensor failures, unforeseen environmental disruptions, and other anomalies that can affect the system’s performance. This can be achieved by continuously monitoring and comparing the expected performance of the physical twin with its actual performance. Thus, by integrating DTs with ML, it is possible to develop automatic self-correcting systems. This exploration paves the way for a more nuanced understanding of the potential harboured by DTs in redefining the landscape of intelligent automation and smart manufacturing.
To achieve the successful integration of DTs into existing workflows, it is necessary to consider socio-technical challenges. One major socio-technical issue is corporate culture, where decisions are often made based on gut feelings rather than data-driven insights. Addressing this requires fostering a culture of data-driven decision-making and ensuring that all stakeholders understand the value and benefits of DT technology. Additionally, political competition among different stakeholders within a company can create resistance to new technologies like DTs [56]. Fostering a culture of innovation with strong leadership support and open communication about the benefits and goals of the new technology can help in alleviating such hindrances [57]. Defining clear strategic goals and objectives to align with DTs’ capabilities with organizational needs and stakeholder expectations is equally important for the same [58]. Another issue is the hype around DTs being presented as a solution to all problems leading to skepticism and distrust within organizations. To navigate this, understanding and managing the hype around DTs with trust-building strategies is crucial for its effective adoption and utilization within organizations [59]. Promoting realistic expectations and providing clear evidence of DTs’ benefits through pilot projects and case studies can help build trust and acceptance. Implementing systematic guidelines and methods for creating DTs is also needed to alleviate hesitancy, particularly among small- and medium-sized enterprises, in adopting DTs [60].
Additionally, comprehensive training programs that cover both technical and the broader implications of changes are crucial to provide to the workforce. These programs can address the concerns of unfamiliarity and uncertainties about adaptation along with closing the skills gap and minimizing resistance [61]. Regulatory compliance, particularly in data security and privacy, is another critical aspect [1,62]. Implementing robust security protocols and conducting regular audits can ensure compliance with relevant regulations and standards. Since DT technology is used in critical systems, organizations must implement a defense-in-depth approach, considering legal, technical, and organizational aspects throughout the DT lifecycle, thereby fostering trust among stakeholders and mitigating potential threats [63]. This comprehensive approach to security and compliance is essential for protecting sensitive data and maintaining the integrity of DT systems.
To promote broad acceptance and implementation, demonstrating the value of DT systems through small-scale pilot projects like ours and sharing success stories can build momentum. Actively engaging stakeholders and developing user-friendly interfaces can help ease the transition. Addressing technical challenges alone is not sufficient; it is also crucial that we tackle socio-technical issues to facilitate the successful adoption and utilization of DT systems by companies. Engaging stakeholders early in the process and maintaining open lines of communication can help in addressing concerns and building trust to ensure that the DT systems meet the needs and expectations of all users.
To thoroughly understand the robustness of the DT system, future research should examine its performance under different operational conditions. While this study offers valuable insights into the latency of the DT system under standard conditions, it is important to recognize that performance metrics may vary under different system loads and network environments. As the size and complexity of the system increase, so does the amount of data that needs to be processed and the computational resources required. This limitation is significant because the real-world deployment of DTs often involves dynamic conditions where the operational demands and network quality can fluctuate. While the current work focuses on assessing DTs under simulated operating conditions, further research in this area would be beneficial for enhancing the reliability and scalability of DT systems, particularly in environments with highly variable operational demands and network conditions. Additionally, the inherent latency of the system, which is partly determined by the underlying communication protocols and hardware configurations, could lead to variations in performance. This aspect was not fully explored in this study and warrants further investigation.
Another limitation of the current study is that the experiments, conducted over an eight-hour period, were performed on a relatively new robotic arm with minimal wear. As the robot undergoes wear and tear over time, it is expected to see wider variations in performance, including potential increases in latency and decreases in accuracy. Future studies should consider long-term testing to capture the effects of mechanical wear on the DT’s performance and reliability. Moreover, the experiments conducted in this study involved the robotic arm operating in isolation, without interfacing with other machines. In real-world manufacturing environments, robots often work in conjunction with other automated systems, such as additional robotic arms. Future research should focus on examining the DT’s performance in such integrated environments, where variations in timing and synchronization become more critical.
Future research should focus on addressing the scalability of DTs by coordinating the robotic arm with other automated systems, such as conveyor belts or additional robotic arms, to simulate a fully integrated smart manufacturing process, as well as improve data processing algorithms to facilitate DT implementation across different industries. Additionally, exploring the human factor in DT interaction, such as developing user-friendly interfaces that facilitate the interaction between operators and DTs, is crucial for ensuring successful deployment.

5. Conclusions

The DT presented in this study currently simulates the robotic arm’s joint states, laying the groundwork for a more comprehensive model. Future iterations will aim to incorporate additional parameters, such as speed, acceleration, effort, etc., to enhance the DT’s complexity and realism. By expanding the range of simulated parameters, we can achieve a more detailed and accurate representation of the physical system, enabling better optimization and control. The architecture’s modularity paves the way for seamless integration with other elements within the manufacturing environment, further expanding the DT’s scope. This flexibility ensures that the DT can adapt to various industrial applications, providing a scalable solution for diverse manufacturing needs.
The convergence of this DT with other technologies such as VR, MR, RL, etc. is the way forward to realizing the full potential of DT technology. Exploring the integration of additional sensing modalities and other cutting-edge Industry 4.0/5.0 technologies like Digital Threads and Blockchain can further enrich the DT’s realism and functionality, setting the stage for a comprehensive, modular, and scalable DT architecture adaptable to a myriad of industrial applications. These advancements will not only enhance the DT’s capabilities but also provide new opportunities for innovation and efficiency in manufacturing processes. The modular nature of our proposed architecture bodes well for the incorporation of these advanced technologies, potentially ushering in a new era of intelligent automation underpinned by highly accurate and responsive DTs.
In conclusion, this paper provides a compelling argument for the broader adoption of DTs, particularly those developed using game engines like Unity in conjunction with ROS and MoveIt. The seamless integration of these technologies creates a powerful framework for developing highly detailed and interactive DTs, which are essential for modern smart manufacturing environments. Its role, characterized by the seamless melding of virtual and physical realms, is where continuous innovation is not just a possibility but a necessity. However, in the spirit of Industry 5.0, future enhancements must also consider the human factor. Developing interfaces that are more intuitive and user-friendly will empower workers, offering them a deeper interaction with the DT and the robotic systems it represents. By taking a human-centric approach, we can focus on creating a synergy between the valuable human touch and digital advancements. Overall, the integration of DTs into manufacturing workflows promises to drive significant improvements in productivity, efficiency, and flexibility, setting the stage for the next generation of smart manufacturing solutions.

Author Contributions

Conceptualization, M.S. and E.F.; software, M.S. and J.K.; resources, M.S., J.K. and E.L.S.G.; methodology, validation, formal analysis, data curation, and writing—original draft preparation, M.S.; writing—review and editing and supervision, E.F., Y.Q., N.M. and D.D. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Science Foundation Ireland under grant number 16/RC/3918.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The dataset is available upon request from the authors.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Singh, M.; Fuenmayor, E.; Hinchy, E.; Qiao, Y.; Murray, N.; Devine, D. Digital Twin: Origin to Future. Appl. Syst. Innov. 2021, 4, 36. [Google Scholar] [CrossRef]
  2. Kritzinger, W.; Karner, M.; Traar, G.; Henjes, J.; Sihn, W. Digital Twin in manufacturing: A categorical literature review and classification. IFAC-PapersOnLine 2018, 51, 1016–1022. [Google Scholar] [CrossRef]
  3. Singh, M.; Srivastava, R.; Fuenmayor, E.; Kuts, V.; Qiao, Y.; Murray, N.; Devine, D. Applications of Digital Twin across Industries: A Review. Appl. Sci. 2022, 12, 5727. [Google Scholar] [CrossRef]
  4. Bratchikov, S.; Abdullin, A.; Demidova, G.L.; Lukichev, D.V. Development of Digital Twin for Robotic Arm. In Proceedings of the 2021 IEEE 19th International Power Electronics and Motion Control Conference, Gliwice, Poland, 25–29 April 2021. [Google Scholar] [CrossRef]
  5. González-Herbón, R.; González-Mateos, G.; Rodríguez-Ossorio, J.R.; Domínguez, M.; Alonso, S.; Fuertes, J.J. An Approach to Develop Digital Twins in Industry. Sensors 2024, 24, 998. [Google Scholar] [CrossRef] [PubMed]
  6. Zhang, C.; Zhou, G.; He, J.; Li, Z.; Cheng, W. A data- and knowledge-driven framework for digital twin manufacturing cell. Procedia CIRP 2019, 83, 345–350. [Google Scholar] [CrossRef]
  7. Tao, F.; Cheng, J.; Qi, Q.; Zhang, M.; Zhang, H.; Sui, F. Digital twin-driven product design, manufacturing and service with big data. Int. J. Adv. Manuf. Technol. 2018, 94, 3563–3576. [Google Scholar] [CrossRef]
  8. Renard, D.; Saddem, R.; Annebicque, D.; Riera, B. From Sensors to Digital Twins toward an Iterative Approach for Existing Manufacturing Systems. Sensors 2024, 24, 1434. [Google Scholar] [CrossRef]
  9. Li, L.; Lei, B.; Mao, C. Digital twin in smart manufacturing. J. Ind. Inf. Integr. 2022, 26, 100289. [Google Scholar] [CrossRef]
  10. Qi, Q.; Tao, F.; Zuo, Y.; Zhao, D. Digital Twin Service towards Smart Manufacturing. Procedia CIRP 2018, 72, 237–242. [Google Scholar] [CrossRef]
  11. Zhang, Z.; Wen, F.; Sun, Z.; Guo, X.; He, T.; Lee, C. Artificial Intelligence-Enabled Sensing Technologies in the 5G/Internet of Things Era: From Virtual Reality/Augmented Reality to the Digital Twin. Adv. Intell. Syst. 2022, 4, 2100228. [Google Scholar] [CrossRef]
  12. Laaki, H.; Miche, Y.; Tammi, K. Prototyping a Digital Twin for Real Time Remote Control Over Mobile Networks: Application of Remote Surgery. IEEE Access 2019, 7, 20325–20336. [Google Scholar] [CrossRef]
  13. Liang, C.-J.; McGee, W.; Menassa, C.; Kamat, V. Bi-Directional Communication Bridge for State Synchronization between Digital Twin Simulations and Physical Construction Robots. In Proceedings of the 2020 Proceedings of the 37th International Symposium on Automation and Robotics in Construction, Kitakyushu, Japan, 27–28 October 2020. [CrossRef]
  14. Wang, X.; Liang, C.-J.; Menassa, C.C.; Kamat, V.R. Interactive and Immersive Process-Level Digital Twin for Collaborative Human–Robot Construction Work. J. Comput. Civil. Eng. 2021, 35, 04021023. [Google Scholar] [CrossRef]
  15. Luca, L.; Cristina, C.; Daniele, M.; Sébastien, B.; Lépine, P.; Marcello, P. Geometrical calibration of a 6-axis robotic arm for high accuracy manufacturing task. Int. J. Adv. Manuf. Technol. 2020, 111, 1813–1829. [Google Scholar] [CrossRef]
  16. Liu, Y.K.; Ong, S.K.; Nee, A.Y.C. State-of-the-art survey on digital twin implementations. Adv. Manuf. 2022, 10, 1–23. [Google Scholar] [CrossRef]
  17. Al-Geddawy, T. A Digital Twin Creation Method for an Opensource Low-cost Changeable Learning Factory. Procedia Manuf. 2020, 51, 1799–1805. [Google Scholar] [CrossRef]
  18. Sharma, A.; Kosasih, E.; Zhang, J.; Brintrup, A.; Calinescu, A. Digital Twins: State of the art theory and practice, challenges, and open research questions. J. Ind. Inf. Integr. 2022, 30, 100383. [Google Scholar] [CrossRef]
  19. Baidya, S.; Das, S.K.; Uddin, M.H.; Kosek, C.; Summers, C. Digital Twin in Safety-Critical Robotics Applications: Opportunities and Challenges. In Proceedings of the 2022 IEEE International Performance, Computing, and Communications Conference, Austin, TX, USA, 11–13 November 2022. [Google Scholar] [CrossRef]
  20. Kousi, N.; Gkournelos, C.; Aivaliotis, S.; Lotsaris, K.; Bavelos, A.C.; Baris, P.; Michalos, G.; Makris, S. Digital Twin for Designing and Reconfiguring Human–Robot Collaborative Assembly Lines. Appl. Sci. 2021, 11, 4620. [Google Scholar] [CrossRef]
  21. Garg, G.; Kuts, V.; Anbarjafari, G. Digital Twin for FANUC Robots: Industrial Robot Programming and Simulation Using Virtual Reality. Sustainability 2021, 13, 10336. [Google Scholar] [CrossRef]
  22. Erdei, T.I.; Krakó, R.; Husi, G. Design of a Digital Twin Training Centre for an Industrial Robot Arm. Appl. Sci. 2022, 12, 8862. [Google Scholar] [CrossRef]
  23. Wang, Z.; OuYang, Y.; Kochan, O. Bidirectional Linkage Robot Digital Twin System Based on ROS. In Proceedings of the 2023 17th International Conference on the Experience of Designing and Application of CAD Systems, Jaroslaw, Poland, 22–25 February 2023. [Google Scholar] [CrossRef]
  24. Diachenko, D.; Partyshev, A.; Pizzagalli, S.L.; Bondarenko, Y.; Otto, T.; Kuts, V. Industrial Collaborative Robot Digital Twin integration and Control Using Robot Operating System. J. Mach. Eng. 2022, 22, 57–67. [Google Scholar] [CrossRef]
  25. Kousi, N.; Gkournelos, C.; Aivaliotis, S.; Giannoulis, C.; Michalos, G.; Makris, S. Digital twin for adaptation of robots’ behavior in flexible robotic assembly lines. Procedia Manuf. 2019, 28, 121–126. [Google Scholar] [CrossRef]
  26. Havard, V.; Jeanne, B.; Lacomblez, M.; Baudry, D. Digital twin and virtual reality: A co-simulation environment for design and assessment of industrial workstations. Prod. Manuf. Res. 2019, 7, 472–489. [Google Scholar] [CrossRef]
  27. Pérez, L.; Rodríguez-Jiménez, S.; Rodríguez, N.; Usamentiaga, R.; García, D.F. Digital Twin and Virtual Reality Based Methodology for Multi-Robot Manufacturing Cell Commissioning. Appl. Sci. 2020, 10, 3633. [Google Scholar] [CrossRef]
  28. Liu, C.; Gao, J.; Bi, Y.; Shi, X.; Tian, D. A Multitasking-Oriented Robot Arm Motion Planning Scheme Based on Deep Reinforcement Learning and Twin Synchro-Control. Sensors 2020, 20, 3515. [Google Scholar] [CrossRef]
  29. Matulis, M.; Harvey, C. A robot arm digital twin utilising reinforcement learning. Comput. Graph 2021, 95, 106–114. [Google Scholar] [CrossRef]
  30. Hassel, T.; Hofmann, O. Reinforcement Learning of Robot Behavior based on a Digital Twin. In Proceedings of the 9th International Conference on Pattern Recognition Applications and Methods, Valletta, Malta, 22–24 February 2020. [Google Scholar] [CrossRef]
  31. Dröder, K.; Bobka, P.; Germann, T.; Gabriel, F.; Dietrich, F. A Machine Learning-Enhanced Digital Twin Approach for Human-Robot-Collaboration. Procedia CIRP 2018, 76, 187–192. [Google Scholar] [CrossRef]
  32. Mullican, K. How Video Game Development Drives Digital Twins Technology for Manufacturers. Available online: https://accelerationeconomy.com/cloud-wars/how-video-game-development-drives-digital-twins-technology-for-manufacturers/ (accessed on 31 August 2023).
  33. Jungherr, A.; Schlarb, D.B. The Extended Reach of Game Engine Companies: How Companies Like Epic Games and Unity Technologies Provide Platforms for Extended Reality Applications and the Metaverse. Soc. Media Soc. 2022, 8, 20563051221107640. [Google Scholar] [CrossRef]
  34. Wang, Z.; Han, K.; Tiwari, P. Digital Twin Simulation of Connected and Automated Vehicles with the Unity Game Engine. In Proceedings of the 2021 IEEE 1st International Conference on Digital Twins and Parallel Intelligence, Beijing, China, 15 July–15 August 2021. [Google Scholar] [CrossRef]
  35. Liu, Y.; Wang, Z.; Han, K.; Shou, Z.; Tiwari, P.; Hansen, J.H.L. Sensor Fusion of Camera and Cloud Digital Twin Information for Intelligent Vehicles. In Proceedings of the 2020 IEEE Intelligent Vehicles Symposium, Las Vegas, NV, USA, 19 October–13 November 2020. [Google Scholar] [CrossRef]
  36. Kuts, V.; Otto, T.; Tähemaa, T.; Bondarenko, Y. Digital twin based synchronised control and simulation of the industrial robotic cell using virtual reality. J. Mach. Eng. 2019, 19, 128–145. [Google Scholar] [CrossRef]
  37. White, G.; Zink, A.; Codecá, L.; Clarke, S. A digital twin smart city for citizen feedback. Cities 2021, 110, 103064. [Google Scholar] [CrossRef]
  38. Sta. Ana, R.R.; Escoto, J.E.; Fargas, D., Jr.; Panlilio, K.; Jerez, M.; Sarmiento, C.J. Development of A Digital Twin for The Monitoring of Smart Cities Using Open-Source Software. Int. Arch. Photogramm. Remote Sens. Spatial Inf. Sci. 2021, 46, 281–288. [Google Scholar] [CrossRef]
  39. Matsas, E.; Vosniakos, G.-C. Design of a virtual reality training system for human–robot collaboration in manufacturing tasks. Int. J. Interact. Des. Manuf. 2017, 11, 139–153. [Google Scholar] [CrossRef]
  40. Katara, P.; Khanna, M.; Nagar, H.; Panaiyappan, A. Open Source Simulator for Unmanned Underwater Vehicles using ROS and Unity3D. In Proceedings of the 2019 IEEE Underwater Technology, Kaohsiung, Taiwan, 16–19 April 2019. [Google Scholar] [CrossRef]
  41. Singh, M.; Srivastava, R.; Lee, S.D.; Murray, N.; Qiao, Y.; Devine, D. Digital Twin of Polymer Processing Pilot Line. In Proceedings of the 37th International Manufacturing Conference by Irish Manufacturing Council, Athlone, Ireland, 7–8 September 2021. [Google Scholar]
  42. Product specification IRB 1200. Available online: https://search.abb.com/library/Download.aspx?DocumentID=3HAC081417-001&LanguageCode=en&DocumentPartId=&Action=Launch (accessed on 10 August 2023).
  43. Unity Technologies. Available online: https://github.com/Unity-Technologies (accessed on 18 January 2024).
  44. Allspaw, J.; LeMasurier, G.; Yanco, H. Comparing Performance between Different Implementations of ROS for Unity. 2023. Available online: https://openreview.net/forum?id=WH3yhsbBjj (accessed on 15 August 2023).
  45. Joseph, L.; Cacace, J. Mastering ROS for Robotics Programming: Design, Build, and Simulate Complex Robots Using the Robot Operating System; Packt Publishing Ltd.: Birmingham, UK, 2018; ISBN 178847452X. [Google Scholar]
  46. O’Kane, J.M. A Gentle Introduction to ROS. 2014. Available online: https://www.cs.rpi.edu/~trink/Courses/AlgorithmicRobotics/fall2017/agitr-letter.pdf (accessed on 27 July 2023).
  47. Gallala, A.; Kumar, A.A.; Hichri, B.; Plapper, P. Digital Twin for Human–Robot Interactions by Means of Industry 4.0 Enabling Technologies. Sensors 2022, 22, 4950. [Google Scholar] [CrossRef]
  48. XML Robot Description Format (URDF). Available online: http://wiki.ros.org/urdf/XML/model (accessed on 31 August 2023).
  49. Unity Robotics Hub. Available online: https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/pick_and_place/2_ros_tcp.md (accessed on 31 August 2023).
  50. ROS–Unity Integration. Available online: https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/ros_unity_integration/README.md (accessed on 24 December 2023).
  51. Coleman, D.M.; Sucan, I.A.; Chitta, S.; Correll, N. Reducing the Barrier to Entry of Complex Robotic Software: A MoveIt! Case Study. arXiv 2014. [Google Scholar] [CrossRef]
  52. Mazumder, A.; Sahed, M.; Tasneem, Z.; Das, P.; Badal, F.; Ali, M.; Ahamed, M.H.; Abhi, S.; Sarker, S.; Das, S.; et al. Towards Next Generation Digital Twin in Robotics: Trends, Scopes, Challenges, and Future. Heliyon 2023, 9, e13359. [Google Scholar] [CrossRef] [PubMed]
  53. Mihai, S.; Yaqoob, M.; Hung, D.; Davis, W.; Towakel, P.; Raza, M.; Karamanoglu, M.; Barn, B.; Shetve, D.; Prasad, R.; et al. Digital Twins: A Survey on Enabling Technologies, Challenges, Trends and Future Prospects. IEEE Commun. Surv. Tutor. 2022, 24, 2255–2291. [Google Scholar] [CrossRef]
  54. Saavedra Sueldo, C.; Perez Colo, I.; De Paula, M.; Villar, S.A.; Acosta, G.G. ROS-based architecture for fast digital twin development of smart manufacturing robotized systems. Ann. Oper. Res. 2023, 322, 75–99. [Google Scholar] [CrossRef]
  55. Tao, F.; Zhang, M.; Liu, Y.; Nee, A.Y.C. Digital twin driven prognostics and health management for complex equipment. CIRP Ann. 2018, 67, 169–172. [Google Scholar] [CrossRef]
  56. Kober, C.; Fette, M.; Wulfsberg, J.P. Challenges of Digital Twin Application in Manufacturing. In Proceedings of the 2022 IEEE International Conference on Industrial Engineering and Engineering Management, Kuala Lumpur, Malaysia, 7–10 December 2022. [Google Scholar] [CrossRef]
  57. Nayernia, H.; Bahemia, H.; Papagiannidis, S. A systematic review of the implementation of industry 4.0 from the organisational perspective. Int. J. Prod. Res. 2022, 60, 4365–4396. [Google Scholar] [CrossRef]
  58. Rebentisch, E.; Rhodes, D.H.; Soares, A.L.; Zimmerman, R.; Tavares, S. The digital twin as an enabler of digital transformation: A sociotechnical perspective. In Proceedings of the 2021 IEEE 19th International Conference on Industrial Informatics, Palma de Mallorca, Spain, 21–23 July 2021. [Google Scholar] [CrossRef]
  59. Korotkova, N.; Benders, J.; Mikalef, P.; Cameron, D. Maneuvering between skepticism and optimism about hyped technologies: Building trust in digital twins. Inf. Manag. 2023, 60, 103787. [Google Scholar] [CrossRef]
  60. Fett, M.; Wilking, F.; Goetz, S.; Kirchner, E.; Wartzack, S. A Literature Review on the Development and Creation of Digital Twins, Cyber-Physical Systems, and Product-Service Systems. Sensors 2023, 23, 9786. [Google Scholar] [CrossRef]
  61. Zafar, M.H.; Langås, E.F.; Sanfilippo, F. Exploring the synergies between collaborative robotics, digital twins, augmentation, and industry 5.0 for smart manufacturing: A state-of-the-art review. Robot Comput. Integr. Manuf. 2024, 89, 102769. [Google Scholar] [CrossRef]
  62. Khan, L.U.; Han, Z.; Saad, W.; Hossain, E.; Guizani, M.; Hong, C.S. Digital Twin of Wireless Systems: Overview, Taxonomy, Challenges, and Opportunities. IEEE Commun. Surv. Tutor. 2022, 24, 2230–2254. [Google Scholar] [CrossRef]
  63. Alcaraz, C.; Lopez, J. Digital Twin: A Comprehensive Survey of Security Threats. Commun. Surv. Tutor. 2022, 24, 1475–1503. [Google Scholar] [CrossRef]
Figure 1. The contrast between the two-simulations graphics in Unity (a) vs. Visual Components (b).
Figure 1. The contrast between the two-simulations graphics in Unity (a) vs. Visual Components (b).
Sensors 24 05680 g001
Figure 2. Illustration of the DT system using ROS and Unity; includes physical hardware, ROS communication, and Unity simulation layers for real-time data exchange and synchronization.
Figure 2. Illustration of the DT system using ROS and Unity; includes physical hardware, ROS communication, and Unity simulation layers for real-time data exchange and synchronization.
Sensors 24 05680 g002
Figure 3. Illustration of server Endpoint sending and receiving messages between ROS nodes and Unity (adapted from [50]).
Figure 3. Illustration of server Endpoint sending and receiving messages between ROS nodes and Unity (adapted from [50]).
Sensors 24 05680 g003
Figure 4. DT latency over 5000+ trajectory (X-axis: number of trajectories; Y-axis: latency in milliseconds).
Figure 4. DT latency over 5000+ trajectory (X-axis: number of trajectories; Y-axis: latency in milliseconds).
Sensors 24 05680 g004
Figure 5. Actual error of joints in Cycle (a) 1, (b) 2, and (c) 3 as indicated (X-axis: number of trajectories; Y-axis: actual error in degrees).
Figure 5. Actual error of joints in Cycle (a) 1, (b) 2, and (c) 3 as indicated (X-axis: number of trajectories; Y-axis: actual error in degrees).
Sensors 24 05680 g005aSensors 24 05680 g005b
Figure 6. Normalized error of joints in Cycle (a) 1, (b) 2, and (c) 3 as indicated (X-axis: number of trajectories; Y-axis: normalized error in degrees).
Figure 6. Normalized error of joints in Cycle (a) 1, (b) 2, and (c) 3 as indicated (X-axis: number of trajectories; Y-axis: normalized error in degrees).
Sensors 24 05680 g006aSensors 24 05680 g006b
Table 1. Summarized contributions of ROS-based DT developed by researchers.
Table 1. Summarized contributions of ROS-based DT developed by researchers.
Engine UsedKey ContributionsProsConsReference
GazeboAutonomous and remote operations for safetyManages environmental uncertaintiesLimited to specific robot models[19]
GazeboImproved efficiency with multitasking mobile dual-arm robotsEnhances factory productivityComplexity in integration[20]
UnityTrajectory programming and data for ML applicationsSuitable for complex environmentsHigh computational requirements[21]
GazeboSafe training environment for studentsCost-effective trainingLimited to educational use[22]
Unreal Engine 4Real-time monitoring and control for educational purposesEnhances learning experienceHigh system requirements[23]
UnitySynchronization and advanced user interfacesImproved teleoperationInitial setup complexity[24]
GazeboReconfigurable assembly systems for automotive industryFacilitates human–robot collaborationHigh complexity in dynamic environments[25]
Table 2. ABB IRB 1200 5/0.9 Robot Specifications [42].
Table 2. ABB IRB 1200 5/0.9 Robot Specifications [42].
Robot SpecificationsAxis Max. SpeedWorking RangeRange of Motion
Axes: 6
Payload: 5 kgAxis 1: 288°/sAxis 1: +170° to −170°Axis 1: 340°
Armload: 0.3 kgAxis 2: 240°/sAxis 2: +130° to −100°Axis 2: 230°
Reach: 0.9 mAxis 3: 300°/sAxis 3: +70° to −200°Axis 3: 270°
Position repeatability: 0.025 mmAxis 4: 400°/sAxis 4: +270° to −270°Axis 4: 540°
Robot weight: 54 kgAxis 5: 405°/sAxis 5: +130° to −130°Axis 5: 260°
Robot height: 967 mmAxis 6: 600°/sAxis 6: +400° to −400°Axis 6: 800°
Mounting: Any angle
Table 3. Unity packages used for making digital model and connecting with ROS.
Table 3. Unity packages used for making digital model and connecting with ROS.
PackageFunctionality
ROS-TCP-ConnectorUnity package for sending, receiving, and visualizing messages from ROS
ROS TCP-EndpointROS node for sending/receiving messages from Unity
URDF-ImporterUnity package for loading URDF files
Table 4. Mean values of actual (MAE) and normalized (MNE) errors.
Table 4. Mean values of actual (MAE) and normalized (MNE) errors.
JointsCycle 1Cycle 2Cycle 3Overall
MAEMNEMAEMNEMAEMNEMAEMNE
Joint_10.00240.00000.00220.00000.00180.00000.00210.0000
Joint_20.16330.00070.16500.00070.17200.00070.16660.0007
Joint_30.00730.00000.00750.00000.00710.00000.00730.0000
Joint_40.00220.00000.00220.00000.00240.00000.00230.0000
Joint_50.00050.00000.00050.00000.00040.00000.00050.0000
Joint_60.00020.00000.00030.00000.00020.00000.00020.0000
Table 5. Standard deviation of actual (SDAE) and normalized errors (SDNE).
Table 5. Standard deviation of actual (SDAE) and normalized errors (SDNE).
JointsCycle 1Cycle 2Cycle 3Overall
SDAESDNESDAESDNESDAESDNESDAESDNE
Joint_10.02060.00010.02030.00010.01130.00000.01810.0001
Joint_20.10720.00050.10650.00050.10660.00050.10690.0005
Joint_30.00840.00000.01480.00010.00700.00000.01050.0000
Joint_40.01440.00000.01160.00000.01940.00000.01540.0000
Joint_50.00440.00000.00300.00000.00300.00000.00360.0000
Joint_60.00380.00000.00240.00000.00120.00000.00280.0000
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Singh, M.; Kapukotuwa, J.; Gouveia, E.L.S.; Fuenmayor, E.; Qiao, Y.; Murry, N.; Devine, D. Unity and ROS as a Digital and Communication Layer for Digital Twin Application: Case Study of Robotic Arm in a Smart Manufacturing Cell. Sensors 2024, 24, 5680. https://doi.org/10.3390/s24175680

AMA Style

Singh M, Kapukotuwa J, Gouveia ELS, Fuenmayor E, Qiao Y, Murry N, Devine D. Unity and ROS as a Digital and Communication Layer for Digital Twin Application: Case Study of Robotic Arm in a Smart Manufacturing Cell. Sensors. 2024; 24(17):5680. https://doi.org/10.3390/s24175680

Chicago/Turabian Style

Singh, Maulshree, Jayasekara Kapukotuwa, Eber Lawrence Souza Gouveia, Evert Fuenmayor, Yuansong Qiao, Niall Murry, and Declan Devine. 2024. "Unity and ROS as a Digital and Communication Layer for Digital Twin Application: Case Study of Robotic Arm in a Smart Manufacturing Cell" Sensors 24, no. 17: 5680. https://doi.org/10.3390/s24175680

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop