Joint positions save file to allow SIM to real

I have developed a 6 dof bipedal robot that walks in omniverse using reinforcement learning.
I want to record the joint positions for 1 of the robots over time and save it to a file so I can test it on the actual robot without having to run inference, or test it in a different simulation environment so can assess for robustness, or even fit the joint position-time data to a curve so can compress the data so it can be output non inference endpoint such as an arduino

How do i extract the joint position data over time efficiently or over GPU? either during training or during inference i.e, test=True?