When recording in sim, also record the complete state of the mujoco simulation to be able to replay and rerecord the trajectories later.