Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

omni.isaac.core import problem #22

Open
percypeng5221 opened this issue Sep 12, 2024 · 1 comment
Open

omni.isaac.core import problem #22

percypeng5221 opened this issue Sep 12, 2024 · 1 comment

Comments

@percypeng5221
Copy link

In h1_humanoid.py, there's this codeblock at the start of the program:

from grutopia.core.env import BaseEnv
from grutopia.core.util.container import is_in_container

file_path = './GRUtopia/demo/configs/h1_locomotion.yaml'
sim_config = SimulatorConfig(file_path)

headless = False
webrtc = False

if is_in_container():
    headless = True
    webrtc = True

env = BaseEnv(sim_config, headless=headless, webrtc=webrtc)

import numpy as np
from omni.isaac.core.utils.rotations import euler_angles_to_quat, quat_to_euler_angles

It works well like this. But if you get rid of the code constructing the BaseEnv and only do:

import numpy as np
from omni.isaac.core.utils.rotations import euler_angles_to_quat, quat_to_euler_angles

It's going to have this problem:

Traceback (most recent call last):
  File "/home/percy/princeton/GRUtopia/set_physics/preprocess_for_interaction_new.py", line 26, in <module>
    from omni.isaac.core.utils.semantics import add_update_semantics
ModuleNotFoundError: No module named 'omni.isaac.core'

I suspect there's some path setting bug related to isaaclab/isaacsim. Could you guys take a look?

@HanqingWangAI
Copy link
Collaborator

Hi @percypeng5221, to import any omni.** packages, you need to launch the standalone app first to include the omni extensions into your python path environment.
In GRUtopia, we launch the standalone app in BaseEnv.

self._simulation_app = SimulationApp({'headless': self.headless, 'anti_aliasing': 0})

You can import the omni packages after launching the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants