IsaacLabRerunLogger¶
- class IsaacLabRerunLogger(scene, logged_envs=0, recording_stream=None, save_path=None, application_id=None)[source]¶
Bases:
objectLogs Isaac Lab scenes to Rerun.io for visualization.
This logger is specifically designed for Isaac Lab’s
InteractiveScene, which contains articulations and rigid objects in a multi-environment setup. It reads body poses directly from Isaac Lab’s physics simulation data rather than from USD transforms, ensuring accurate visualization of the simulated scene.The logger supports multi-environment Isaac Lab scenes and allows selecting which environment indices to log via the
logged_envsparameter.The recording stream can either be provided directly via
recording_stream, or a new recording stream can be created that saves tosave_path. If neither is provided, it will try to find it usingrr.get_data_recording().save_pathtakes precedence overrecording_stream.- Parameters:
scene (InteractiveScene) – The Isaac Lab
InteractiveSceneto log. This scene contains the articulations and rigid objects that will be visualized.logged_envs (int | list[int]) – Indices of environments to log (for multi-env Isaac Lab scenes). If an
int, it is treated as a single environment index. If a list, those indices are logged. Defaults to0(the first environment).recording_stream (RecordingStream | None) – The Rerun recording stream to use. Ignored if
save_pathis provided.save_path (Path | str | None) – Path where the Rerun recording will be saved as an
.rrdfile. If provided, a new recording stream is created that saves to this path.application_id (str | None) – Application ID for the Rerun recording. Used when creating a new recording stream (either via
save_pathor when falling back to a new stream).
- scene¶
The Isaac Lab scene being logged.
- Type:
InteractiveScene
- recording_stream¶
The Rerun recording stream used for logging.
- Type:
rr.RecordingStream
Notes
Body poses are read from Isaac Lab’s simulation data (
body_pose_w), not from USD transforms. This is because Isaac Lab updates physics internally without reflecting changes in the USD stage transforms.Visual geometry (meshes) is logged only once on first encounter and cached.
Transforms are only re-logged when they change between calls to
log_scene().Scale information is preserved from the original USD transforms.
Prims with
purposeset toguideare skipped along with their children.
Examples
Log an Isaac Lab scene directly:
import rerun as rr from usd_rerun_logger import IsaacLabRerunLogger rr.init("isaac_lab_scene", spawn=True) logger = IsaacLabRerunLogger(scene) logger.log_scene()
Log multiple environments:
# Log environments 0, 1, and 2 logger = IsaacLabRerunLogger(scene, logged_envs=[0, 1, 2]) logger.log_scene()
Save the recording to a file:
logger = IsaacLabRerunLogger(scene, save_path="simulation.rrd") logger.log_scene()
Continuous logging during simulation:
rr.init("simulation", spawn=True) logger = IsaacLabRerunLogger(scene) for step in range(1000): # Step the simulation scene.step() # Log current state - only changed transforms are re-logged rr.set_time_sequence("step", step) logger.log_scene()
See also
LogRerunGymnasium wrapper that uses this logger for episode recording.
UsdRerunLoggerLogger for generic USD stages (non-Isaac Lab).
- __init__(scene, logged_envs=0, recording_stream=None, save_path=None, application_id=None)[source]¶
Create the Isaac Lab Rerun logger.
- Parameters:
scene (InteractiveScene)
logged_envs (int | list[int])
recording_stream (RecordingStream | None)
save_path (Path | str | None)
application_id (str | None)
- log_scene()[source]¶
Log the current state of the Isaac Lab scene to Rerun.
Iterates over all articulations and rigid objects in the scene, reading their body poses from the simulation and logging them to Rerun. Visual geometry is logged only on the first call; subsequent calls only update transforms that have changed.
This method is safe to call even if the scene or stage is
None; in that case, it returns immediately without logging anything.
- property recording_stream: RecordingStream¶
The Rerun recording stream used for logging.
- property scene: InteractiveScene¶
The Isaac Lab scene being logged.