Hello,
With version 2022.2.1 the import of the BaseSample does not work anymore if I want to run the script via Terminal. If I import it in my extension it does work though. Is there any reason this could happen?
I run my script with this command after opening the Terminal from the omniverse Isaac launcher:
python.bat extension_examples\Offl_Rep\offline_generation.py
After Starting the simulation App it could not import the BaseSample. I will paste the script until the line it fails:
from bezier import Surface
from omni.isaac.kit import SimulationApp
import os
# Set rendering parameters and create an instance of kit
CONFIG = {"renderer": "RayTracedLighting", "headless": False, "width": 1024, "height": 1024, "num_frames": 10}
simulation_app = SimulationApp(launch_config=CONFIG)
import carb
import random
import math
import numpy as np
from pxr import UsdGeom, Usd, Gf, UsdPhysics, PhysxSchema
from omni.isaac.examples.base_sample import BaseSample
from omni.isaac.core import World
...
I want to import the BaseSample Class and with version 2022.2.0 it did work quite well. I don’t get an flake8 error in my VisualStudio Code window aswell. But in the Terminal following error is shown:
....
[3.737s] [ext: omni.isaac.cortex-0.3.2] startup
[3.738s] [ext: omni.kit.window.stats-0.1.2] startup
[3.739s] [ext: omni.isaac.sim.python-2022.2.1] startup
[3.740s] Simulation App Starting
[11.397s] app ready
[11.592s] RTX ready
[11.786s] Simulation App Startup Complete
Traceback (most recent call last):
File "extension_examples\Offl_Rep\offline_generation.py", line 26, in <module>
from omni.isaac.examples.base_sample import BaseSample
ModuleNotFoundError: No module named 'omni.isaac.examples'
What did change? I can also see that the example module exists in the exts folder of my isaac installation.
Thank you for your help
EDIT:
Seems like the import problems appear for omni.isaac.core and omni.replicator.core aswell if I try to import them after running the python.bat. For omni.isaac.kit there was no problem importing it