newton.utils.BasicRecorder#
- class newton.utils.BasicRecorder[source]#
Bases:
object
A class to record and playback simulation body transforms.
- __init__()#
Initializes the Recorder.
- load_from_file(file_path, device=None)#
Loads recorded transforms from a file, replacing the current history.
- Parameters:
file_path (str) – The full path to the file from which to load the transforms.
device – The device to load the transforms onto. If None, uses CPU.
- playback(frame_id)#
Plays back a recorded frame by returning the stored body transforms and point cloud.
- record(body_transforms, point_clouds=None)#
Records a snapshot of body transforms.
- Parameters:
body_transforms (wp.array) – A warp array representing the body transforms. This is typically retrieved from state.body_q.
point_clouds (list[wp.array] | None) – An optional list of warp arrays representing point clouds.