IsaacLab icon indicating copy to clipboard operation
IsaacLab copied to clipboard

[Question] ModuleNotFoundError: No module named 'omni.client'

Open nowionlyseedaylight opened this issue 1 year ago • 2 comments

Question

I was running the code from orbit_tasks. However, I keep getting the error message that the module 'omni.client' cannot be imported. How can I solve this problem? I thought that I installed all packages provided by orbit.

vision@vision-Z690-AORUS-PRO-DDR4:~/orbit$ ./orbit.sh -p source/extensions/omni.isaac.orbit_tasks/omni/isaac/orbit_tasks/manipulation/reach/reach_env_cfg.py

[INFO] Using python from: /home/vision/.local/share/ov/pkg/isaac_sim-2023.1.0-hotfix.1/python.sh Traceback (most recent call last): File "/home/vision/orbit/source/extensions/omni.isaac.orbit_tasks/omni/isaac/orbit_tasks/manipulation/reach/reach_env_cfg.py", line 10, in import omni.isaac.orbit.sim as sim_utils File "/home/vision/orbit/source/extensions/omni.isaac.orbit/omni/isaac/orbit/sim/init.py", line 29, in from .converters import * # noqa: F401, F403 File "/home/vision/orbit/source/extensions/omni.isaac.orbit/omni/isaac/orbit/sim/converters/init.py", line 20, in from .asset_converter_base import AssetConverterBase File "/home/vision/orbit/source/extensions/omni.isaac.orbit/omni/isaac/orbit/sim/converters/asset_converter_base.py", line 17, in from omni.isaac.orbit.utils.assets import check_file_path File "/home/vision/orbit/source/extensions/omni.isaac.orbit/omni/isaac/orbit/utils/assets.py", line 23, in import omni.client ModuleNotFoundError: No module named 'omni.client' There was an error running python

nowionlyseedaylight avatar Feb 27 '24 09:02 nowionlyseedaylight

The files in Python modules are not directly runnable since they depend on Omniverse to be running first. This is because Omniverse extensions are hot-reloaded when the application is launched. They aren't available directly as Python modules.

There are ideas on how to make this possible but right now they are in the works (which may or may not become a thing). To verify your configs, you will first need to launch the simulation application.

Please check here for more info: https://isaac-orbit.github.io/orbit/source/setup/developer.html#standalone-applications

Mayankm96 avatar Feb 29 '24 08:02 Mayankm96

@Mayankm96 Thanks for your response. However, I'm pretty sure it's runnable in python modules (through ./orbit.sh -p ....), since it worked with the last version of orbit. My colleague made the additional folder in the orbit/source/extensions/omni.isaac.orbit_tasks/omni/isaac/orbit_tasks/manipulation to implement the customized code. And it was possible to run the code file via local terminal.

But now, with this new version (or I'm not sure whether it's the problem of my situation) I continually get the error message like above. Is there any possibility for the reason of that error to be the orbit installation process? (for example, the module like omni.client may have been omitted)

If not, could it be implemented through standalone applications?

nowionlyseedaylight avatar Mar 05 '24 01:03 nowionlyseedaylight

I'm also confused about this problem. How did you solve it? Could you please give me some advice?

pengxiangzang avatar Sep 16 '24 01:09 pengxiangzang

Are you able to run the demos mentioned here?

https://isaac-sim.github.io/IsaacLab/source/setup/sample.html#showroom

As mentioned in the docs, you can't execute module-level code since it expects hot-reloading of Omniverse extensions. This only happens after you launch the simulation app.

To execute a standalone script, it should do the following:

"""Launch Isaac Sim Simulator first."""

import argparse

from omni.isaac.lab.app import AppLauncher

# add argparse arguments
parser = argparse.ArgumentParser(description="My dummy script.")
# append AppLauncher cli args
AppLauncher.add_app_launcher_args(parser)
# parse the arguments
args_cli = parser.parse_args()

# launch omniverse app
app_launcher = AppLauncher(args_cli)
simulation_app = app_launcher.app

"""Rest everything follows."""

# INSERT YOUR PYTHON CODE

Mayankm96 avatar Sep 16 '24 04:09 Mayankm96

I can run the demos in standalone , but when it comes to franka.py in omni.isaac.orbit_assets of extensions, this problem comes up. So the problem is that I didn't understand the structure of the codes.Thank you for your reply and sorry to take up your time.I'm just starting to learn how to use the isaac lab. Did you follow some video tutorials? The official documentation really confuses me.

pengxiangzang avatar Sep 17 '24 03:09 pengxiangzang