Repository navigation
Makes Newton path truly kitless - #4849
Conversation
Greptile SummaryThis PR fixes a kitless execution path by removing three Isaac Sim / Omniverse Kit top-level imports that were loaded unconditionally at module import time, even when the simulation never needed to launch Kit. Key changes:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[launch_simulation called] --> B{needs_kit?}
B -- No --> C[Kitless / Newton path\nno isaacsim import]
B -- Yes --> D{importlib.util.find_spec\nisaacsim found?}
D -- No --> E[print error + SystemExit 1]
D -- Yes --> F[from isaaclab.app import AppLauncher\nAppLauncher created]
F --> G[AppLauncher.__init__\n→ _create_app\n→ SimulationApp loaded from isaacsim]
G --> H[yield — user code runs]
C --> H
H --> I[finally: close_fn if Kit was launched]
|
| print( | ||
| "\n[ERROR] Isaac Sim is not installed or not found on PYTHONPATH.\n" | ||
| "\n" | ||
| " This environment requires Isaac Sim and Omniverse Kit.\n" | ||
| " PhysX backend and Kit visualizer currently requires Isaac Sim.\n" | ||
| "\n" | ||
| " To fix this, ensure Isaac Sim is installed and available in the current environment.\n" | ||
| "\n" | ||
| " See https://isaac-sim.github.io/IsaacLab/main/source/setup/installation for details.\n" | ||
| ) |
There was a problem hiding this comment.
Use logger.error instead of print for error reporting
The file already has a logger = logging.getLogger(__name__) instance defined at module level (line 20), and uses logger.info elsewhere (e.g., lines 148 and 153). Using a bare print() here for the error message is inconsistent with the established logging pattern and bypasses any log-level controls the caller may have configured.
| print( | |
| "\n[ERROR] Isaac Sim is not installed or not found on PYTHONPATH.\n" | |
| "\n" | |
| " This environment requires Isaac Sim and Omniverse Kit.\n" | |
| " PhysX backend and Kit visualizer currently requires Isaac Sim.\n" | |
| "\n" | |
| " To fix this, ensure Isaac Sim is installed and available in the current environment.\n" | |
| "\n" | |
| " See https://isaac-sim.github.io/IsaacLab/main/source/setup/installation for details.\n" | |
| ) | |
| if importlib.util.find_spec("isaacsim") is None: | |
| logger.error( | |
| "\n[ERROR] Isaac Sim is not installed or not found on PYTHONPATH.\n" | |
| "\n" | |
| " This environment requires Isaac Sim and Omniverse Kit.\n" | |
| " PhysX backend and Kit visualizer currently requires Isaac Sim.\n" | |
| "\n" | |
| " To fix this, ensure Isaac Sim is installed and available in the current environment.\n" | |
| "\n" | |
| " See https://isaac-sim.github.io/IsaacLab/main/source/setup/installation for details.\n" | |
| ) |
Signed-off-by: Kelly Guo <[email protected]>
Description
We still had an isaac sim import in the code that was forcing isaac sim to be installed even when not requiring to launch isaac sim. This fix ensures that in a kitless path, we can fully remove the isaac sim dependency and run in environments that do not have isaac sim installed.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there