Unexpected exit code of Isaac Sim standalone script

Isaac Sim Version

4.5.0

Operating System

Ubuntu 20.04

GPU Information

  • Model: RTX 3060Ti
  • Driver Version: 535.230.02

Topic Description

Detailed Description

If an exception happens in the simulation, the script still exits with 0. I want to run the script in a test pipeline, so I cannot tell if the script has failed or not.

Steps to Reproduce

my_exit_code.py

from isaacsim import SimulationApp

# Simple example showing how to start and stop the helper
simulation_app = SimulationApp({'headless': True})

### Perform any omniverse imports here after the helper loads ###
i = 0

while i < 20:
    i += 1
    if i == 10:
        assert 1 == 0, 'bad assert'
    simulation_app.update()

simulation_app.close()

run the script with

cd isaac-sim-4.5.0 && ./python.sh my_exit_code.py

Screenshots or Videos

Could you try wrapping your main script logic in a try/except block and call sys.exit(1) on exceptions?

It works, thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.