(
world: Any,
*,
step_physics: bool,
physics_steps_per_render: int,
)
| 1095 | |
| 1096 | |
| 1097 | def _render_frame( |
| 1098 | world: Any, |
| 1099 | *, |
| 1100 | step_physics: bool, |
| 1101 | physics_steps_per_render: int, |
| 1102 | ) -> None: |
| 1103 | if step_physics: |
| 1104 | for _ in range(max(1, int(physics_steps_per_render))): |
| 1105 | world.step(render=True, step_sim=True) |
| 1106 | return |
| 1107 | # Articulation state restored through Isaac APIs is not reliably pushed to |
| 1108 | # Hydra/Fabric by world.render() alone. Keep physics paused, but use the |
| 1109 | # World step path to synchronize robot joint poses first. In Isaac Sim 5, |
| 1110 | # step_sim=False does not always produce a fresh Camera RGB annotator frame, |
| 1111 | # so follow with world.render() for sensor output. |
| 1112 | world.step(render=True, step_sim=False) |
| 1113 | if hasattr(world, "render"): |
| 1114 | world.render() |
| 1115 | |
| 1116 | |
| 1117 | def _render_startup( |
no test coverage detected