Virtual Reality for Shoulder Rehabilitation: Accuracy Evaluation of Oculus Quest 2

Virtual reality (VR) systems are becoming increasingly attractive as joint kinematics monitoring systems during rehabilitation. This study aimed to evaluate the accuracy of the Oculus Quest 2 in measuring translational and rotational displacements. As the Oculus Quest 2 was chosen for future applications in shoulder rehabilitation, the translation range (minimum: ~200 mm, maximum: ~700 mm) corresponded to the forearm length of the 5th percentile female and the upper limb length of the 95th percentile male. The controller was moved on two structures designed to allow different translational displacements and rotations in the range 0–180°, to cover the range of motion of the upper limb. The controller measures were compared with those of a Qualisys optical capture system. The results showed a mean absolute error of 13.52 ± 6.57 mm at a distance of 500 mm from the head-mounted display along the x-direction. The maximum mean absolute error for rotational displacements was found to be 1.11 ± 0.37° for a rotation of 40° around the z-axis. Oculus Quest 2 is a promising VR tool for monitoring shoulder kinematics during rehabilitation. The inside-out movement tracking makes Oculus Quest 2 a viable alternative to traditional motion analysis systems.


Introduction
Recent developments in Virtual Reality (VR) have been applied in medical and rehabilitation areas and different devices have been used to detect and monitor human movement [1,2]. Gaming technologies, such as Microsoft Kinect and Nintendo Wii, have been included in the patient's rehabilitation protocol, having positive results [3][4][5][6]. Furthermore, there has been a rapid increase in the use of VR systems as they have become more affordable [7]. In VR, the user is fully immersed in a virtual space and can interact with virtual objects, in simulated environments, using controllers [7]. These technologies can also track human movements and could engage the patient to increase their adherence to the rehabilitation protocol [8]. The immersivity of these devices allows to experience different virtual contexts, fostering an interactive patient experience. This could make long-term rehabilitation more enjoyable and fun [7]. In fact, VR has been used for the recovery of different clinical conditions [9][10][11][12]. In the orthopedic field, rehabilitation has a crucial importance after surgery or traumatic events for the recovery of the compromised functionalities [8]. Among shoulder musculoskeletal disorders, rotator cuff tears have  The two Miqus Video cameras were used to have synchronized videos available for use in subsequent analyses as a reference. The OMC was employed to capture the pose (position and orientation) of the geometric center of the rigid body defined in Qualisys Track Manager (QTM) software (v. 2021.2, Build 6720). In particular, five photo-reflective markers (diameter, 8 mm) were positioned on the controller A as shown in Figure 2a,b. A single marker was positioned on controller B ( Figure 2c). As explained later, this marker was used for the synchronization of Oculus Quest 2 and OMC signals. A custom 3D support was printed in polylactic acid (PLA) filaments by using the 3D printer Ultimaker S2+ (Figure 2d). The support has been designed and appropriately sized to host the controller A during the experimental tests. Figure 2e,f show two structures designed for allowing translational and rotational movements.

Experimental Procedure
All measurements were performed by securing the left-hand controller (controller A) in the handmade holder, while a Healthy Volunteer (HV) held controller B during the experiments. Before each trial, the HV performed an initial calibration to set the 3D virtual space, i.e., the play area where they can safely move. Then, HV was asked to perform quick movements with the controller B (i.e., the one with the synchronization marker on it) at the beginning and end of each trial for signal synchronization.

Translational Movements
Measurements were run along each 3D axis (x-width, y-depth, and z-height). A custom structure was used to move controller A along each axis ( Figure 2e). As the Oculus Quest 2 was chosen for future applications in shoulder rehabilitation, the minimum (approximately 200 mm) and maximum (approximately 700 mm) distances analyzed were those corresponding to the forearm length of the 5th percentile female and the upper limb length of the 95th percentile male, respectively, and thus, hand length was not considered [26,27].  The two Miqus Video cameras were used to have synchronized videos available for use in subsequent analyses as a reference. The OMC was employed to capture the pose (position and orientation) of the geometric center of the rigid body defined in Qualisys Track Manager (QTM) software (v. 2021.2, Build 6720). In particular, five photo-reflective markers (diameter, 8 mm) were positioned on the controller A as shown in Figure 2a,b. A single marker was positioned on controller B ( Figure 2c). As explained later, this marker was used for the synchronization of Oculus Quest 2 and OMC signals. A custom 3D support was printed in polylactic acid (PLA) filaments by using the 3D printer Ultimaker S2+ (Figure 2d). The support has been designed and appropriately sized to host the controller A during the experimental tests. Figure 2e,f show two structures designed for allowing translational and rotational movements.

Experimental Procedure
All measurements were performed by securing the left-hand controller (controller A) in the handmade holder, while a Healthy Volunteer (HV) held controller B during the experiments. Before each trial, the HV performed an initial calibration to set the 3D virtual space, i.e., the play area where they can safely move. Then, HV was asked to perform quick movements with the controller B (i.e., the one with the synchronization marker on it) at the beginning and end of each trial for signal synchronization.

Translational Movements
Measurements were run along each 3D axis (x-width, y-depth, and z-height). A custom structure was used to move controller A along each axis ( Figure 2e). As the Oculus Quest 2 was chosen for future applications in shoulder rehabilitation, the minimum (approximately 200 mm) and maximum (approximately 700 mm) distances analyzed were those corresponding to the forearm length of the 5th percentile female and the upper limb length of the 95th percentile male, respectively, and thus, hand length was not considered [26,27]. All the translational displacements started with the HMD at 200 mm from the origin (P0) of the reference system until the maximum distance (P11 = 705 mm) at variable steps, as shown in Figure 3. At P0, controller A was left stationary for about 20 s and at subsequent positions Pi (i = 1,…,11) for about 10 s. At the positions P1 (5 mm), P6 (255 mm), and P11 (505 mm), an increment of 5 mm related to the previous positions (P0-0 mm, P5-250 mm, and P10-500 mm, respectively) was evaluated, to appreciate the Oculus Quest 2's capability to detect small variations at distances gradually increasing than the position of the HMD. Acquisitions were repeated seven times along each axis, for a total of N = 252 (12 positions × 7 repetitions × 3 axis) static samples.

Rotational Movements
A custom structure was realized to move controller A around each axis (x-roll, ypitch, and z-yaw) ( Figure 4). The selected rotation interval ranged from 0° to 180° to cover the range of motion of the upper limb [28]. All the rotational displacements were performed by placing the HMD at a distance of about 700 mm from controller A during all the rotational displacements in the range 0°-180°. A total of eight rotational displacements ( , with i = 0,…,7) were reached by controller A seven times in every task, returning at each repetition to the starting position , for a total of 14 rotational displacements. At each , controller A was left stationary for 5 s. A total of N = 294 (14 rotational displacements × 7 repetitions × 3 axes) static samples were acquired.

Data Analysis
Preprocessing (labeling and gap-filling) of markers trajectories was performed in QTM. A careful analysis of the recorded videos allowed the recognition of the start and end events of the i-th positions. As mentioned above, tracking the pose of controller A with the OMC was performed by defining a rigid body in QTM, and in this way, the 6 All the translational displacements started with the HMD at 200 mm from the origin (P 0 ) of the reference system until the maximum distance (P 11 = 705 mm) at variable steps, as shown in Figure 3. At P 0 , controller A was left stationary for about 20 s and at subsequent positions P i (i = 1, . . . ,11) for about 10 s. At the positions P 1 (5 mm), P 6 (255 mm), and P 11 (505 mm), an increment of 5 mm related to the previous positions (P 0 -0 mm, P 5 -250 mm, and P 10 -500 mm, respectively) was evaluated, to appreciate the Oculus Quest 2's capability to detect small variations at distances gradually increasing than the position of the HMD. Acquisitions were repeated seven times along each axis, for a total of N = 252 (12 positions × 7 repetitions × 3 axis) static samples.

Rotational Movements
A custom structure was realized to move controller A around each axis (x-roll, y-pitch, and z-yaw) ( Figure 4). The selected rotation interval ranged from 0 • to 180 • to cover the range of motion of the upper limb [28]. All the rotational displacements were performed by placing the HMD at a distance of about 700 mm from controller A during all the rotational displacements in the range 0 • -180 • . A total of eight rotational displacements (R i , with i = 0, . . . ,7) were reached by controller A seven times in every task, returning at each repetition to the starting position R 0 , for a total of 14 rotational displacements. At each R i , controller A was left stationary for 5 s. A total of N = 294 (14 rotational displacements × 7 repetitions × 3 axes) static samples were acquired. Data analyzed in QTM were processed using MATLAB. As sampling rates of data acquisition systems were different (Qualisys-100 Hz, Oculus Quest 2-200 Hz), resampling at the minimum sampling rate was performed. As Unity uses a left-handed coordinate system, while Qualisys uses a right-handed coordinate system, data from controllers were expressed with respect to the OMC coordinate system. Moreover, the orientation of the controller A was reported as a quaternion in Unity, so a conversion from quaternion to rotation matrix was performed.
A common event of quick upper limb elevation was used to synchronize the system under test (i.e., Oculus Quest 2) and the reference one (i.e., Qualisys™). In particular, the synchronization events were identified in correspondence with the maximum values of the trajectories of the Sync marker at the beginning and the end of all the trials. Maximum values corresponded to the maximum positions reached with controller B by the HV during the quick elevation movement of the upper limb.
After signals synchronization, both translations and rotations signals were windowed to select 3 s between two consecutive events. The selected windows of each position and rotation were defined assuming a steady-state condition reached by controller A without artifacts related to the movements required to move the controller.

Data Analysis
Preprocessing (labeling and gap-filling) of markers trajectories was performed in QTM. A careful analysis of the recorded videos allowed the recognition of the start and end events of the i-th positions. As mentioned above, tracking the pose of controller A with the OMC was performed by defining a rigid body in QTM, and in this way, the 6 degrees of freedom tracking were evaluated (i.e., translations and rotations along and around each 3D axes, respectively).
Data analyzed in QTM were processed using MATLAB. As sampling rates of data acquisition systems were different (Qualisys-100 Hz, Oculus Quest 2-200 Hz), resampling at the minimum sampling rate was performed. As Unity uses a left-handed coordinate system, while Qualisys uses a right-handed coordinate system, data from controllers were expressed with respect to the OMC coordinate system. Moreover, the orientation of the controller A was reported as a quaternion in Unity, so a conversion from quaternion to rotation matrix was performed.
A common event of quick upper limb elevation was used to synchronize the system under test (i.e., Oculus Quest 2) and the reference one (i.e., Qualisys™). In particular, the synchronization events were identified in correspondence with the maximum values of the trajectories of the Sync marker at the beginning and the end of all the trials. Maximum values corresponded to the maximum positions reached with controller B by the HV during the quick elevation movement of the upper limb.
After signals synchronization, both translations and rotations signals were windowed to select 3 s between two consecutive events. The selected windows of each position and rotation were defined assuming a steady-state condition reached by controller A without artifacts related to the movements required to move the controller.

Translational Accuracy
Data were averaged on the 3 s of recording to compute the mean measured positions at each translational displacement performed. The absolute positional error e P was calculated as follows: where p Q is the position measured by the Qualisys OMC system and p C is the position measured by the controller. The positional percentage error e P,% was evaluated as follows: The error e ∆ corresponding to the smaller step size (i.e., 5 mm) performed at P0 (0 mm), P5 (250 mm), and P10 (500 mm) was computed as follows: where ∆Q and ∆C were the steps measured by the Qualisys OMC system and the Oculus Quest 2, respectively, between the position P i+1 and P i .

Rotational Accuracy
The mean rotation matrix was computed at each rotational displacement reached by both Oculus Quest 2 and the OMC systems. The rotation matrix M relating the starting ( R 0,i ) and ending (R T i ) rotation matrices was computed as follows [23]: The final rotation angle Θ was computed as follows: then, The absolute rotational error e R was calculated as follows: where Θ Q is the rotation measured by the Qualisys OMC system and Θ C is the rotation angle measured by controller A. The rotational percentage error e R,% was evaluated as follows: For both translational and rotational displacements, Bland-Altman analysis was performed to quantify the degree of agreement between the two measurement systems by defining the 95% limits of agreement (LOA), which estimates the interval where 95% of the differences between both systems fall [29]. LOA were expressed as MOD ± 1.96·SD where MOD represents the mean of difference and SD the standard deviation of the difference between the Qualisys OMC and Oculus Quest 2.

Translational Accuracy
The absolute and percentage errors corresponding to all the translational displacements performed along the x-, y-, and z-directions are reported in Table 2. The maximum absolute error-expressed as mean ± standard deviation-was found to be 13.52 ± 6.57 mm along the x-axis at a distance of about 700 mm from the HMD, corresponding to a translational displacement of 500 mm from the starting position of controller A (i.e., at about 200 mm from the HMD). Along x-, y-, and z-directions, the absolute errors increased as the distance of the controller A from the HMD raised ( Figure 5). The highest percentage errors were found to be 29.5%, 11.8%, and 16.7% for the x-, y-, and z-axes, respectively (Table 2, Figure 6). These results corresponded to the smallest increments (i.e., 5 mm) from the starting position, at which an absolute error of 1.38 mm, 0.55 mm, and 0.81 mm was found for the x-, y-, and z-axes, respectively. The results showed that the Oculus Quest 2 was able to discriminate the smallest step size of 5 mm at the distances of 205 mm, 455 mm, and 705 mm from the HMD, although the performance was better at shorter distances ( Figure 7). Bland-Altman analysis for the translational displacements confirmed that the performances of Oculus Quest 2 decreased at higher distances, as shown in Figure 8 by the increasing dispersion of the differences between the two measurement systems as the distance of controller A from the HMD increases.

Rotational Accuracy
The absolute and percentage errors corresponding to all the rotational displacements performed around the three axes are reported in Table 3. The maximum absolute errorexpressed as mean ± standard deviation-was found to be 1.11 ± 0.37 • for a rotation of 40 • around the z-axis (Figure 9). The higher percentage errors were found to be 5.9%, 42.9%, and 42.6% for a rotation of 1 • around the x-, y-, and z-axis, respectively (Table 3, Figure 10). The rotational displacements of 1 • around all axes corresponded to a small absolute error of 0.10 ± 0.05 mm, 0.31 ± 0.25 mm, and 0.43 ± 0.19 mm for the x-, y-, and z-axes, respectively. Bland-Altman analysis showed acceptable agreement between the two measurement systems with LOAs within 1.7 • and MOD equal to −0.08 • (Figure 11). Table 3. Errors for all the rotational displacements around the x-, y-, and z-axes.  Figure 9. Absolute error corresponding to rotational displacements around the x-, y-, and z-axes. Figure 9. Absolute error corresponding to rotational displacements around the x-, y-, and z-axes. Figure 9. Absolute error corresponding to rotational displacements around the x-, y-, and z-axes.

Discussion
VR has been proven to be a promising technological tool for clinical applications and rehabilitation treatments, as demonstrated by the growing number of publications in cases of stroke (25.8%), brain injury (15.3%), musculoskeletal disorders (14.9%), and cerebral palsy (10.5%) [30]. Clinical interest in VR is justified by the positive impacts on patients' motivation and engagement compared to the traditional methods for kinematics analysis [31].
Since Oculus Quest 2 is a VR tool originally designed for video games, before being used in clinical scenarios, the evaluation of its performance in terms of translational and rotational accuracy is mandatory. The performed measurements were intended to determine if Oculus Quest 2, which employs inside-out tracking, is accurate enough to measure position and orientation, as they would like to apply this VR system in the future during rehabilitation sessions of patients with shoulder musculoskeletal disorders.
Regarding the validity of our results, we approached this analysis as previous works in the literature, which assessed the rotational and translational tracking accuracy of the controllers of VR devices, defining experimental setups in which the position and orientation of the controller can be varied by known increments [23,24,32]. The common denominator of these studies is the future application of VR devices in industrial, research, or clinical settings. The authors provide a preliminary assessment of the device performance (e.g., accuracy and precision) before they can be translated into real-world application contexts. A recent study investigating the performance of Oculus Rift S, based on the same inside-out tracking of the Oculus Quest 2, showed a translational accuracy of 4.36 ± 2.91 mm and a rotational accuracy of 1.13 ± 1.23 • for the controller [23]. These results are comparable with those obtained in our study, although we obtained a larger absolute error than the translational accuracy obtained in [23]. In particular, the higher absolute error of 13.52 ± 6.57 mm was registered at a distance of 500 mm from the HMD along the x-direction, corresponding approximately to the length achieved by a full elbow extension. This absolute error corresponds to a percentage error equals to 2.7%. Because the functioning of Oculus Quest 2 controllers depends on the camera sensors embedded within the HMD, such results were expected. The authors in [23] stated that the HMD's wearer observed the controller from a close position to achieve the best performance for the controller in terms of tracking [23], contrary to our study in which the distance between HMD and controller varied. Translational increments were chosen to cover as much of the anthropometric measurements of the target population as possible, i.e., from a minimum distance corresponding to the forearm length of the 5th percentile female to a distance corresponding to the upper limb length, excluding the hand, of the 95th percentile male [26,27]. In our study, the maximum absolute error for rotational displacements was found to be 1.11 ± 0.37 • for a rotation of 40 • around the z-axis. During the experimental tests for rotational accuracy evaluation, we kept the controller at a distance of about 700 mm from the HMD worn by the HV, i.e., placing ourselves in the worst case (maximum distance) so as not to invalidate the results if we had considered shorter distances. In addition, the maximum error value found for the translational accuracy of the Oculus Quest 2 controller (i.e., 13.52 ± 6.57 mm) seems to be acceptable for monitoring shoulder joint angles. Indeed, considering that the user holds the controller as a hand-effector, if we consider the 95th percentile male upper arm length of 700 mm (i.e., arm fully extended), a displacement of about 20 mm of the hand-effector corresponds to an angular value of 1.64 • . This value is comparable with the maximum mean absolute error for rotational accuracy obtained in our study, and it is inferior to error values found for Oculus Rift S controller and shoulder joint angles accuracy determined with a Kinect-based motion capture system [23,33]. The results of our study are acceptable for the final application of interest, namely performing rehabilitation exercises for patients with shoulder joint diseases (e.g., rotator cuff tear, frozen shoulder, scapular dyskinesis). In particular, the good accuracy obtained in both translational and rotational displacements in static conditions can be considered a solid baseline for future works in which the assessment of the VR device in dynamic conditions during upper limb movements will be performed.
Prior studies have investigated the positional and translational accuracy of other VR systems, such as the HTC VIVE and Oculus Touch controllers, which use an inside-in tracking system [24,32,34]. If compared with the results of our study, the rotational and translational accuracy of the inside-in VR systems are superior. For example, Spitzley et al. [32] reported a rotational and translational accuracy of the HTC Vive controller below 0.4 • and 3 mm, respectively. Although these results are better than those obtained for the Oculus Quest 2 controller, the latter remains a viable alternative for upper limb tracking in clinical settings. Indeed, being a VR device that uses an inside-out tracking technology, Oculus Quest 2 does not require external devices for tracking the HMD and controllers, and it is a wireless VR system. For this reason, Oculus Quest 2 ensures high mobility of use without needing a limited workspace.
Obtaining quantitative information about the kinematics of patients with shoulder musculoskeletal impairments is of great interest to clinicians and patients themselves [13,14,35]. In recent years, a growing interest has been devoted to unobtrusive wearable systems for joint kinematics monitoring [36][37][38]. The quantitative evaluation and tracking of human joint movements could be relevant in different applications fields ranging from rehabilitation to sports medicine to provide data about rehabilitation progress or athlete's performance. Thanks to the technological advancements in electronics, hardware, and computational software, the future of VR in clinical settings is spreading rapidly because of its low invasiveness and, at the same time, high user involvement. Indeed, the gamification offered by the VR-based rehabilitation systems could intensify patients' motivation to participate in rehabilitation actively by having a clear goal to achieve during therapy [8,39]. The immersive experience offered by VR devices can provide patients with visual, vibrotactile, or auditory feedback on the performance or achievement of a given task [7]. The difficulty level of the rehabilitative exercises should be tuned based on the patients' joint function to provide a satisfying virtual experience and, at the same time, adapted to the type of pathology being treated. Future studies on Oculus Quest 2 for VR applications in clinical settings will be devoted to evaluating motion and rehabilitation exercises in subjects with restricted movement patterns, such as those of patients following traumatic or degenerative events affecting the shoulder joint.

Conclusions
In conclusion, our study assessed the accuracy of the Oculus Quest 2 in measuring translational and rotational displacements within a range covering the whole values of interest for applications in shoulder rehabilitation. Data are promising, since the accuracy was acceptable for future measurements of upper limb movements during rehabilitative exercises performed by patients with shoulder musculoskeletal diseases. The inside-out movement tracking of Oculus Quest 2 yields an easy virtual experience, because the user's movements are not hindered by external tracking devices during immersion in the virtual environment; in addition, the excellent cost-performance ratio makes Oculus Quest 2 a viable alternative to traditional motion analysis systems used in clinical settings to evaluate patients progress during rehabilitation.