-
Notifications
You must be signed in to change notification settings - Fork 7
Description
The current Python binding for the SDK provides a large number of granular get_... functions to retrieve specific state values for devices like controllers, headsets, and body trackers. While this design is convenient for accessing individual data points, it presents several critical issues when an application needs a complete snapshot of the device state at a single point in time.
Problem Description:
Data Atomicity and Synchronization Issues:
To get a full state snapshot, the user must make multiple sequential calls to various get functions. Since each piece of data is protected by a separate mutex, it's possible for the underlying OnPXREAClientCallback to process a new message and update the global state between these calls. This can result in a "mixed" state where the retrieved data comes from different timestamps (e.g., the left controller pose is from time T1, while the right controller pose is from a newer message at time T2). This data inconsistency is unacceptable for applications requiring high-fidelity synchronization, such as robotics and VR simulations.
Performance Overhead:
Acquiring a full state snapshot requires dozens of Python-to-C++ function calls. Each call incurs overhead from context switching and repeated mutex locking/unlocking. Consolidating this into a single call would significantly reduce this overhead and improve performance.