Skip to content

No documentation or API for aligning physics-step sensors (IMU, joints) with RTX camera and lidar samples #960

Backlog

Description

@ycpss91255

Description

Isaac Sim exposes physics-side sensors (IMU, joint state) and RTX render-side sensors (camera, RTX lidar), but there is no documented way to know which physics step a render-side sample belongs to, and no API to align them. In a controlled experiment, IMU and joint-state timestamps always equal the simulation time, while camera and lidar samples lag it by a variable number of physics steps that depends on how the application is driven. We could not find documentation of this, or of the intended way to timestamp or align samples from the two groups (for example for sensor fusion or for a ROS bridge that stamps messages).

This is a documentation / feature request: a statement of the guarantees (and non-guarantees), and ideally a supported way to read the sim time that a camera frame or lidar scan represents.

Environment

  • Isaac Sim 6.2.0.1 (nvcr.io/nvidia/isaac-sim:6.2.0.1), headless, Ubuntu 24.04 host, NVIDIA RTX GPU, PhysX, physics dt 1/60 s

Method

A dynamic wall moves at a constant 0.6 m/s (0.01 m per physics step, gravity off). Its position is a known function of simulation time, so the measured distance from the RTX camera (distance_to_image_plane) and from the RTX lidar (generic-model-output, Example_Solid_State) can be decoded back into the sim time of the state each sensor actually saw. IMU and joint-state samples carry their own time and physics_step fields. Each iteration advances one step; 30 warm-up iterations, then 200 recorded, two runs per driver. The full script is at the end of this issue.

Results

Driver (one iteration) IMU / joint time equals sim time Camera lag (physics steps) RTX lidar
simulation_app.update() 200 of 200 1 to 3 steps, 17 to 25 repeated frames per 200 34 new GMO per 200 steps
SimulationManager.step() then RenderingManager.render() 200 of 200 1 step in 194 to 198 of 200 34 new GMO per 200 steps
rep.orchestrator.step(rt_subframes=1, pause_timeline=False, delta_time=1/60) 200 of 200 0 or 1 (the split differs between two runs: 106 zeros in one run, 5 in the other) all 200 empty (see the separate orchestrator/lidar report)
  • The RTX lidar GMO updates only every 6 physics steps. Its timestampNs is the scan start. At the moment of reading, the lidar scene content lags sim time by 4 to 11 steps (about 67 to 183 ms) when driven by simulation_app.update() or by SimulationManager.step() plus RenderingManager.render().
  • omni.timeline.get_timeline_interface().get_current_time() is behind the simulation time by 2 physics steps in every iteration of every run.
  • Increasing rt_subframes to 4 or 16 for rep.orchestrator.step did not make the camera lag exactly 0 (194 of 200 and 196 of 200 iterations were still lag 1).
  • RenderingManager NEW_FRAME events per iteration vary (0 to 5 under simulation_app.update()), so a render does not map one-to-one to a physics step either.

Expected

Documentation in the sensor / replicator sections that states: (1) which sensors are sampled at the physics step and which at render time, (2) whether a render-side sample has a defined sim time and how to obtain it, (3) the expected lag range for each driving method, and (4) the recommended way to align physics-side and render-side data. If an API exists for the sim time of a camera frame or lidar scan, a pointer to it. If not, this is a feature request for one.

Actual

We found no statement of these guarantees. Related but narrower reports: #672 (closed, RTX lidar timestamp lag vs simulation time, reported as not reproducible from 6.0.1) and #933 (open, rep.orchestrator.step() takes four application updates).

Not verified

Newton, multiple cameras or lidars, other lidar configurations, the cause of the run-to-run difference in the orchestrator camera lag, and whether the lidar scene content corresponds to the middle of the scan (a guess, not measured).

Full script (timing.py)

Run inside the container as /isaac-sim/python.sh timing.py --mode {app_update,manual,orchestrator} --steps 200 --warmup 30 --out out.json. Camera lag in physics steps is the difference between the decoded sim time (cam_t, lidar_t) and the sim time at read.

timing.py
"""Cross-sensor timing experiment (official Isaac Sim 6.2 API only).

Scene: a physics-driven wall (gravity off, constant velocity v along +X) is seen by an RTX
camera (distance_to_image_plane) and an RTX lidar (generic-model-output).  Wall position is a
known function of simulation time, so decoding the measured range gives the SIM TIME of the
state each render sensor actually captured.  IMU / JointState (physics sensors) carry their own
'time' stamp.  Compare all of them per iteration.

Usage (inside the isaac-sim container):
  /isaac-sim/python.sh timing.py --mode {app_update,manual,orchestrator} --steps 200 --out out.json
"""
import argparse
import json
import sys

parser = argparse.ArgumentParser()
parser.add_argument("--mode", default="app_update", choices=["app_update", "manual", "orchestrator"])
parser.add_argument("--steps", type=int, default=200)
parser.add_argument("--warmup", type=int, default=30)
parser.add_argument("--rt", type=int, default=1, help="rt_subframes for orchestrator mode")
parser.add_argument("--out", default="timing_out.json")
args, _ = parser.parse_known_args()

from isaacsim import SimulationApp

simulation_app = SimulationApp({"headless": True})

import carb
import functools
print = functools.partial(print, flush=True)
print('MARK imports start')
import numpy as np
import omni.kit.app
import omni.replicator.core as rep
import omni.timeline
import isaacsim.core.experimental.utils.app as app_utils
import isaacsim.core.experimental.utils.stage as stage_utils
from isaacsim.core.experimental.objects import Cube, DistantLight, GroundPlane
from isaacsim.core.experimental.prims import Articulation
from isaacsim.core.rendering_manager import RenderingEvent, RenderingManager
from isaacsim.core.simulation_manager import SimulationManager
from isaacsim.sensors.experimental.physics import IMU, IMUSensor, JointStateSensor
from isaacsim.sensors.experimental.rtx import (CameraSensor, Lidar, LidarSensor, RtxCamera,
                                               parse_generic_model_output_data)
from isaacsim.storage.native import get_assets_root_path
from pxr import Gf, PhysxSchema, UsdPhysics
import omni.usd

DT = 1.0 / 60.0
V = 0.6          # wall speed m/s  (0.01 m per physics step)
X0 = 3.0         # wall centre x at t=0
HALF_T = 0.1     # measured by calib.py: experimental Cube(size default) scaled 0.1 -> face at X0-0.1
CAM_Z = 1.5
FACE0 = X0 - HALF_T  # front face x at t=0

print('MARK stage')
stage_utils.create_new_stage()
SimulationManager.set_physics_dt(DT)
GroundPlane("/World/GroundPlane")
DistantLight("/World/Light").set_intensities(1000)

# wall: dynamic rigid body, no gravity, constant velocity
wall = Cube("/World/Wall", positions=np.array([X0, 0.0, CAM_Z]), scales=np.array([0.1, 10.0, 1.0]))
stage = omni.usd.get_context().get_stage()
wp_ = stage.GetPrimAtPath("/World/Wall")
UsdPhysics.CollisionAPI.Apply(wp_)
rb = UsdPhysics.RigidBodyAPI.Apply(wp_)
rb.CreateVelocityAttr(Gf.Vec3f(V, 0, 0))
UsdPhysics.MassAPI.Apply(wp_).CreateMassAttr(1.0)
PhysxSchema.PhysxRigidBodyAPI.Apply(wp_).CreateDisableGravityAttr(True)

# robot (official asset) for IMU + joint state, parked out of the sensors' view
print('MARK assets')
root = get_assets_root_path()
stage_utils.add_reference_to_stage(usd_path=root + "/Isaac/Robots/NVIDIA/Jetbot/jetbot.usd", path="/World/Robot")
stg = omni.usd.get_context().get_stage()
art_root, body = None, None
for p in stg.Traverse():
    ps = p.GetPath().pathString
    if not ps.startswith("/World/Robot"):
        continue
    if art_root is None and p.HasAPI(UsdPhysics.ArticulationRootAPI):
        art_root = ps
    if body is None and p.HasAPI(UsdPhysics.RigidBodyAPI):
        body = ps
print("MARK discovered", art_root, body)
robot = Articulation(art_root, positions=np.array([[0.0, -15.0, 0.3]]), reset_xform_op_properties=True)
print("MARK dofs", robot.dof_names)
imu = IMUSensor(IMU.create(body + "/imu_sensor", translations=np.array([[0.0, 0.0, 0.0]])))
jsens = JointStateSensor(art_root)

# RTX camera + lidar looking +X
q = np.array([0.5, 0.5, -0.5, -0.5])
cam = RtxCamera("/World/camera", translations=np.array([0.0, 0.0, CAM_Z]), orientations=q)
RES = (120, 160)
csensor = CameraSensor(cam, resolution=RES, annotators=["distance_to_image_plane"])
lidar = Lidar.create("/World/lidar", config="Example_Solid_State",
                     translations=np.array([0.0, 0.0, CAM_Z]), aux_output_level="BASIC")
lsensor = LidarSensor(lidar, annotators=["generic-model-output"])

render_events = []
RenderingManager.register_callback(RenderingEvent.NEW_FRAME,
                                   callback=lambda ev: render_events.append(SimulationManager.get_num_physics_steps()))
post_phys = []
SimulationManager.register_callback(lambda dt, ctx: post_phys.append(
    (SimulationManager.get_num_physics_steps(), SimulationManager.get_simulation_time())),
    __import__("isaacsim.core.simulation_manager", fromlist=["IsaacEvents"]).IsaacEvents.POST_PHYSICS_STEP)

wheel_idx = list(range(robot.num_dofs))
timeline = omni.timeline.get_timeline_interface()
app = omni.kit.app.get_app()
print('MARK play')
app_utils.play()


def advance():
    if args.mode == "app_update":
        simulation_app.update()
    elif args.mode == "manual":
        SimulationManager.step()
        RenderingManager.render()
    else:
        rep.orchestrator.step(rt_subframes=args.rt, pause_timeline=False, delta_time=DT)


def decode_cam():
    d, _ = csensor.get_data("distance_to_image_plane")
    if d is None:
        return None
    a = d.numpy()
    c = float(a[RES[0] // 2, RES[1] // 2, 0])
    return c if np.isfinite(c) and c > 0 else None


gmo_fields = {}
def _sc(v):
    try:
        return float(v)
    except Exception:
        return None


def decode_lidar():
    """Return (wall_x or None, diag dict)."""
    raw, info = lsensor.get_data("generic-model-output")
    if raw is None:
        return None, {"raw": None}
    gmo = parse_generic_model_output_data(raw)
    if not gmo_fields:
        gmo_fields["fields"] = [n for n in dir(gmo) if not n.startswith("_")]
    diag = dict(n=int(gmo.numElements), ts_ns=_sc(gmo.timestampNs), frame_start=_sc(gmo.frameStart),
                frame_end=_sc(gmo.frameEnd), frame_id=_sc(gmo.frameId), scan_idx=_sc(gmo.scanIdx),
                scan_complete=bool(gmo.scanComplete))
    if gmo.numElements == 0:
        return None, diag
    x, y, z = np.asarray(gmo.x), np.asarray(gmo.y), np.asarray(gmo.z)
    diag.update(xmin=float(x.min()), xmax=float(x.max()), ymin=float(y.min()), ymax=float(y.max()),
                zmin=float(z.min()), zmax=float(z.max()))
    # Solid-state GMO here is SPHERICAL: x=azimuth[deg], y=elevation[deg], z=range[m] (see diag ranges)
    m = (np.abs(x) < 3.0) & (np.abs(y) < 3.0)
    diag["n_sel"] = int(m.sum())
    diag["coords_type"] = str(gmo.elementsCoordsType)
    if m.sum() < 5:
        return None, diag
    return float(np.median(z[m])), diag


rows = []
print('MARK loop')
for k in range(args.warmup + args.steps):
    n_phys_before = SimulationManager.get_num_physics_steps()
    n_render_before = len(render_events)
    n_upd_before = app.get_update_number()
    advance()
    n_phys = SimulationManager.get_num_physics_steps()
    sim_t = SimulationManager.get_simulation_time()
    im = imu.get_data()
    js = jsens.get_data()
    dc = decode_cam()
    dl, ldiag = decode_lidar()
    wall_pos = wall.get_world_poses()[0].numpy()[0]
    print('K', k, dc, dl)
    rows.append(dict(
        k=k, phys_before=n_phys_before, phys_after=n_phys, sim_time=sim_t,
        d_phys=n_phys - n_phys_before, d_render=len(render_events) - n_render_before,
        d_update=app.get_update_number() - n_upd_before,
        imu_time=im["time"], imu_step_field=im["physics_step"],
        js_time=js["time"], js_step_field=js["physics_step"], js_valid=js["is_valid"],
        cam_depth=dc, lidar_x=dl, lidar_diag=ldiag,
        cam_t=None if dc is None else (dc + 0.0 - FACE0) / V,
        lidar_t=None if dl is None else (dl - FACE0) / V,
        wall_x_usd=float(wall_pos[0]), tl_time=timeline.get_current_time(),
    ))

app_utils.stop()
json.dump(dict(mode=args.mode, dt=DT, v=V, face0=FACE0, gmo=gmo_fields, rows=rows,
               n_render_events=len(render_events), n_post_phys=len(post_phys)), open(args.out, "w"))
print("DONE", args.mode, len(rows))
simulation_app.close()

Activity

  1. lhuang-svg commented on Dec 1, 2026

    @lhuang-svg

    Thanks for the detailed report and the reproducible script, @ycpss91255 . The experiment is clear and the measurements are useful.

    You're right that this isn't documented today. Your results match how we understand the pipeline: IMU and joint state are sampled in the physics step and stamped with sim time, while camera and RTX lidar output is produced by the render pipeline, so its content can trail the latest physics state by a variable amount depending on how the app is driven. The lidar's 6-step update cadence and the NEW_FRAME events not mapping 1:1 to physics steps are consistent with that.

    I've triaged this as both a documentation gap and a feature request,

    • Documentation: a section in the sensors/Replicator docs covering which sensors sample at the physics step versus at render time, the expected lag for each driving method (simulation_app.update(), SimulationManager.step() + RenderingManager.render(), rep.orchestrator.step()), and the recommended way to align physics-side and render-side data.

    • API: we'll look into exposing the sim time that a camera frame or lidar scan represents, so users don't have to infer it.

    A few things that would help us:

    • Whether the run-to-run difference in orchestrator camera lag (106 zeros vs 5) reproduces consistently on your side.

    • Whether your end goal is ROS bridge message stamping or offline fusion, since that affects which timestamp semantics matter most.

    For now, as a workaround, treat render-side samples as lagging sim time by the ranges you measured, and stamp them with the sim time at capture minus the measured lag. Note that this lag depends on the driving method.

    I'll follow up here as the doc and API work progresses.

  2. ycpss91255 commented on Dec 2, 2026

    @ycpss91255
    Author

    Thanks for the triage. Answers to both questions:

    1. Camera lag varied between launches on both hosts. The largest lag-0 count in eight new orchestrator runs was 5 of 200, compared with 106 of 200 in the original high-count run. The RTX 5090 counts ranged from 0 to 5 and the RTX 2000 Ada counts from 0 to 1. All six control runs had zero lag-0 frames.

    We used the same moving-wall experiment in Isaac Sim 6.2.0.1. Each run was a fresh launch with 30 warm-up iterations and 200 recorded iterations. The orchestrator used rt_subframes=1, pause_timeline=False and delta_time=1/60. Four additional RTX 5090 orchestrator launches crashed during warm-up and were retried.

    Driver Run Workstation · RTX 5090: lag 0 / 1 / other First change Host 2 · RTX 2000 Ada: lag 0 / 1 / other First change
    Orchestrator 1 0 / 200 / 0 none 0 / 200 / 0 none
    Orchestrator 2 3 / 195 / 2 18 0 / 200 / 0 none
    Orchestrator 3 3 / 196 / 1 88 1 / 199 / 0 12
    Orchestrator 4 5 / 195 / 0 71 0 / 199 / 1 163
    simulation_app.update() 1 0 / 98 / 102 3 0 / 2 / 198 1
    simulation_app.update() 2 0 / 125 / 75 1 — —
    Step + render 1 0 / 152 / 48 2 0 / 4 / 196 2
    Step + render 2 — — 0 / 26 / 174 3

    “First change” is the first recorded index whose camera lag differs from the preceding iteration, with index 0 immediately after warm-up. Every “other” frame had lag 2. A dash marks an unscheduled run. Step + render calls SimulationManager.step() followed by RenderingManager.render().

    2. Our goal is offline sensor fusion. An API that returns each camera frame or RTX lidar scan together with the simulation time or physics-step index of the state rendered would meet our need. We would use each sample’s own timestamp to align it with IMU and joint-state samples, which can come from different steps. We derive ROS message stamps downstream from that aligned simulation time.

  3. lhuang-svg commented on Dec 2, 2026

    @lhuang-svg

    Thanks @ycpss91255 , this is very helpful.

    Your requirement is clear: each camera frame and lidar scan should carry the sim time or physics-step index of the state it rendered. We've filed two internal tracking items, one for the docs update (timing behavior and alignment guidance) and one for the new API request. The docs item will state that camera lag varies per launch and per GPU, as your data shows.

    We'll also look at the run-to-run variation in orchestrator camera lag.

    For the four orchestrator launches that crashed during warm-up, could you open a separate issue? Please include the logs, your Isaac Sim version, GPU and driver versions, and the launch command. This may relate to #933, so link it there. Keeping it separate makes it easier to track and fix.

    Until the API exists, aligning with the per-sample lag you measured is the best option, though it can change between launches.

    Will update here as we make progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions