Skip to main content

Python package for visualizing OpenUSD based simulations (like NVIDIA Isaac Sim) with Rerun.io

Project description

Rerun.io logger for USD and NVIDIA Omniverse apps

Documentation PyPI

:construction: This is a development preview. Expect breaking changes before 1.0.0 :construction:

Contents

https://github.com/user-attachments/assets/82e33c38-f8a1-4f3b-8c7f-5c28904d86b5

Install

  1. You can install usd-rerun-logger from PyPI:
pip install usd-rerun-logger
  1. Install OpenUSD (pxr). This is a user-managed dependency to avoid version conflicts (e.g. with isaac-sim which bundles its own version).
    • If you use an Omniverse app like Isaac Sim or Isaac Lab: You can skip this step.
    • Otherwise, install the standard library from PyPI:
      pip install usd-core
      

Log generic USD Scenes

This utility can traverse any standard USD scene and log transforms, geometries and color textures to Rerun.io.

API reference

Executable examples

This is the lowest level logger. See IsaacLabRerunLogger or the LogRerun wrapper for higher level APIs

To log a simple scene:

from pxr import Usd
from usd_rerun_logger import UsdRerunLogger

# Init Rerun.io
rr.init("orange_example", spawn=True)
# Create the USD Stage
stage = Usd.Stage.Open("orange.usd")
# Log the stage
logger = UsdRerunLogger(stage)
logger.log_stage()

Log Isaac Sim scenes

from usd_rerun_logger import UsdRerunLogger

rr.init("IsaacSim", spawn=True)
logger = UsdRerunLogger(world.stage, path_filter=["!*BlackGrid*"])

while app_running:
    world.step()
    # Set the simulation time on the timeline (see the full examples)
    rr.set_time(timeline="sim", duration=sim_time)
    logger.log_stage()

Log Isaac Lab InteractiveScenes

To make training faster, Isaac Lab doesn't update the USD Stage and the latest transforms are only available through the InteractiveScene API. The IsaacLabRerunLogger will merge the 3D objects and initial poses from the USD stage with the transforms parsed from the InteractiveScene.

API reference

from usd_rerun_logger import IsaacLabRerunLogger

rr.init("IsaacLab", spawn=True)
logger = IsaacLabRerunLogger(env.scene)
while looping:
    env.step(action)
    rr.set_time(timeline="sim_steps", sequence=env.common_step_counter)
    logger.log_scene()

Log Gymnasium environments

LogRerun is a drop-in replacement for Gymnasium's RecordVideo wrapper. Using Rerun.io instead of recording videos has multiple benefits, like no need to worry about camera angles, and file size doesn't increase linearly with the length of the run.

API reference

Executable examples

from usd_rerun_logger import LogRerun

env = gym.make("Isaac-Reach-Franka-v0", cfg=FrankaReachEnvCfg())
rr.init("franka_example", spawn=True)
env = LogRerun(env)
env.reset()
for _ in range(100):
    action_np = env.action_space.sample()
    action = torch.as_tensor(action_np)
    env.step(action)

Known limitations

  • Not all shaders are supported. In OpenUSD, color textures can be represented in a wide variety of ways, many of them specific to certain implementations. We try to support as many shader formats as possible. Please open an issue when you have a .usd* file that we fail to parse properly.

Also, see the issues for features we're still working on.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

usd_rerun_logger-0.5.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

usd_rerun_logger-0.5.0-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file usd_rerun_logger-0.5.0.tar.gz.

File metadata

  • Download URL: usd_rerun_logger-0.5.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for usd_rerun_logger-0.5.0.tar.gz
Algorithm Hash digest
SHA256 e7414dbee74b7ad52278cfe912a4bd162f689a4beb15c57ab58a9a04c592d79b
MD5 d9acb696423536df41e3cf9eb131087a
BLAKE2b-256 3342f52d8d7c89fa83ad560faaee5af871a8989f2c56ce8c36393e5804333509

See more details on using hashes here.

File details

Details for the file usd_rerun_logger-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: usd_rerun_logger-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for usd_rerun_logger-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c0ca1057b47fef1adf45c71a9f73aad7293470c420417ebc6994cb67814e898
MD5 24a006687290a7cf3ad9a4f84d631c48
BLAKE2b-256 ad7000974b114538556120a885ef2536851d305cb70b7cf84fd352262126aa0e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page