Isaac Sim Version
4.5.0
Operating System
Ubuntu 22.04
GPU Information
- Model: RTX A6000
- Driver Version: 550.127.05
Topic Description
Our Isaac Sim simulations, which run smoothly on a local server, experience significant slowdowns in simulation progress when executed in headless mode and streamed via WebRTC.
Detailed Description
We primarily use Python scripts to simulate various scenarios in Isaac Sim. Our script architecture involves two main processes:
- Rendering Process: This process continuously calls
SimulationApp.update(). It runs irrespective of active flags or signals, essentially simulating a static environment when no specific actions are being performed. - Signal Process: This process is responsible for defining and executing the simulation scenario. It sends commands such as
set_joint_velocities(),GetTargetVelocityAttr().Set(), orset_angular_velocity. Temporal pauses between operations (e.g., moving ‘robot A’ then turning it) are currently implemented usingtime.sleep(), as the rendering process is separated.
We are encountering the following issues when running the script in headless mode and connecting via WebRTC, which are not present in local, non-headless execution:
- Early Operation Starts: Subsequent operations in the
Signal Processoften begin before previous actions (e.g., a robot reaching its target position) have visually or physically completed in the simulation. While this is partly expected due totime.sleep()not being a robust synchronization mechanism, the problem is significantly exacerbated in headless mode. Increasingtime.sleep()values temporarily mitigates this, but it’s not a sustainable solution and points to an underlying performance issue.
- Note: Currently, we cannot use
SimulationApp.update()for several iteration to wait for the finish of previous operation because we are using the separated restless rendering process.
- Severe Rendering Latency (Main Problem): The primary concern is the drastically reduced rendering speed compared to local execution. This slowdown directly contributes to the first problem, as the physical simulation time steps appear to increase due to the rendering bottleneck. We suspect that
SimulationApp.update()might be incurring significant overhead by continuously sending every frame to the WebRTC client for streaming, thereby heavily impacting overall simulation performance.
We are seeking solutions or suggestions to address the slow simulation phenomenon when using headless Isaac Sim with WebRTC, particularly concerning rendering speed and its impact on simulation progression.
Steps to Reproduce
- Please provide a minimal reproducible example (e.g., a simplified script that demonstrates the slowdown). This is crucial for debugging. For example:
- Start Isaac Sim in headless mode with WebRTC enabled.
- Load a simple scene (e.g., a single robot).
- Execute a script that continuously calls
SimulationApp.update()in one process and attempts to move the robot withtime.sleep()pauses in another process. - Observe the rendering performance and the desynchronization between planned actions and visual completion via the WebRTC client.
(Add more steps as needed)
Additional Information
What I’ve Tried
We tried connecting the headless server with different client computers. But it shows the same phenomenon.