RTX Lidar 'get_current_frame()' returns data at inconsistent intervals despite render_dt and scan rate alignment #674
|
I'm encountering a strange issue where 'LidarRtx._current_frame' is not receiving data at the expected rate. I drive physics and rendering manually. The RTX lidar is set to a 20 Hz scan and I render at 60 Hz, so I expect System
Sim settings
Stepping loopI run physics/rendering as follows, causing world.render() to be called after exactly every 2 world.step() calls under current settings. def _advance(world, lifecycle, do_render):
world.step(render=False)
lifecycle.update_physics(world.get_physics_dt())
if do_render:
world.render()
lifecycle.update_render(world.get_rendering_dt()) # LidarRtx.get_current_frame() in hereLidar setupself._lidar = LidarRtx(prim_path=lidar_prim_path)
self._lidar.initialize()
self._lidar.attach_annotator(
"IsaacCreateRTXLidarScanBuffer",
outputTimestamp=True,
outputIntensity=True,
)
At 60 Hz render and 20 Hz rotation, a full revolution accumulates over 3 rendered frames, so I expect a populated buffer every 3rd SymptomColumns: my count of Longer window from the same run: The LidarRtx contains data after the rendering_frame numerator has incremented by 3, but it does not increment in a consistent or aligned manner with world.render() calls. Questions
Happy to provide more information if needed, thank you. |
Replies: 2 comments 1 reply
|
Hi @aidan073 ! The empty rows are expected between complete scans for a 20 Hz full-scan lidar rendered at 60 Hz. The unsafe assumption is using For your 5.1 workaround, I would publish downstream of the RTX lidar render product instead of polling |
Hi @aidan073 !
get_current_frame()is a cached-frame accessor. In 5.1,LidarRtxrefreshes_current_framefrom anomni.kit.app.GLOBAL_EVENT_UPDATEcallback. That callback samples the SDGPostProcessDispatcherreference time and then calls each attached annotator'sget_data(). It is not synchronized as "the data for the immediately precedingworld.render()call".The empty rows are expected between complete scans for a 20 Hz full-scan lidar rendered at 60 Hz. The unsafe assumption is using
rendering_frame % 3, or the Python render-call count, as the scan clock while polling_current_frame.For your 5.1 workaround, I would publish downstream of the RTX lidar render product instead of polling
L…