Cannot import `omni` related modules

Hi,

I cannot import omni modules at isaac_sim-2022.2.1.
There are ImportErrors and ModuleNotFoundError from all codes.
However, It works well at isaac_sim-2022.2.0.

I saw another import error. I think this is the same issue. Is their another way which works well without adding lines into the original codes?

In my case, omniisaacgym also was not found from my RL code.

Can you provide a code snippet where this issue happens so we can test it? Thanks!

Some basic standalone examples work well but the following codes did not run. I am using an anaconda environment.
First of all, I share you my launch.json (2.3 KB) file.

[1.702s] Simulation App Startup Complete
Traceback (most recent call last):
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/OmniIsaacGymEnvs/omniisaacgymenvs/reaching_franka_omniverse_isaacgym_skrl_train.py", line 67, in <module>
    from reaching_franka_omniverse_isaacgym_env import ReachingFrankaTask, TASK_CFG
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/OmniIsaacGymEnvs/omniisaacgymenvs/reaching_franka_omniverse_isaacgym_env.py", line 6, in <module>
    from omniisaacgymenvs.tasks.base.rl_task import RLTask
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/OmniIsaacGymEnvs/omniisaacgymenvs/tasks/base/rl_task.py", line 39, in <module>
    from omniisaacgymenvs.utils.domain_randomization.randomize import Randomizer
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/OmniIsaacGymEnvs/omniisaacgymenvs/utils/domain_randomization/randomize.py", line 32, in <module>
    import omni.replicator.core as rep
ModuleNotFoundError: No module named 'omni.replicator'

↑OmniIsaacGymEnvs/omniisaacgymenvs/reaching_franka_omniverse_isaacgym_skrl_train.py from the Simulation (Omniverse Isaac Gym) of Real-world examples.

[2023. 03.26. 19:06 added]
I can run sample codes at skrl examples with Isaac Sim 2022.2.0 at a vscode but, cannot run with a terminal. There are additional error lines that are just below the message.

2023-03-26 10:04:34 [1,896ms] [Warning] [carb.audio.context] 1 contexts were leaked
Segmentation fault (core dumped)

(tool-mani) bak@bak-ubuntu:~/.local/share/ov/pkg/isaac_sim-2022.2.1$  cd /home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1 ; /usr/bin/env /home/bak/anaconda3/envs/tool-mani/bin/python /home/bak/.vscode/extensions/ms-python.python-2023.4.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 52421 -- /home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/OmniIsaacGymEnvs/omniisaacgymenvs/scripts/rlgames_train.py task=FrankaCabinet num_envs=2 headless=False 
Traceback (most recent call last):
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/OmniIsaacGymEnvs/omniisaacgymenvs/scripts/rlgames_train.py", line 30, in <module>
    from omniisaacgymenvs.utils.hydra_cfg.hydra_utils import *
ModuleNotFoundError: No module named 'omniisaacgymenvs'

↑The Franka Cabinet example of the Omni Isaac Gym example. Due to visualization, I only changed the configs to horizon_lenghth: 4 and minibatch_size: 8 from FrankaCabinetPPO.yaml.


Traceback (most recent call last):
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/standalone_examples/user_example/view_optimizer/UR5e_version/view_optimization.py", line 15, in <module>
    from omni.isaac.examples.base_sample import BaseSample
ModuleNotFoundError: No module named 'omni.isaac.examples'

↑My custom example. custom_example.zip (3.4 MB)

I guess there are problems to get a local package which are related to omni, omniisaacgymenvs etc.

Thanks!

I am facing the same issue. I cannot import omni.isaac, but i can import omni. Similarly, I cannot import omni.ui either.

I am using isaac_sim-2022.2.1 as well.

Hi @psh9002 - Can you refer this forum chat and see if the issue gets resolved or not?

1 Like

Thanks.

Though I solved the problem, I don’t know why it works. However, the main problem was that I did not type source setup_conda_env.sh in at the proper location.

What I did was

  1. Set up environment variables by source setup_conda_env.sh.
  2. Launch Isaac Sim 2022.2.1.

Then the both RL scripts(reaching_franka_omniverse_isaacgym_skrl_train.py , rlgames_train.py) works well.

However, In my custom example, I have to add

import sys
sys.path.append("/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/exts/omni.isaac.examples")

I can go to the definition at vscode but, without the above additional lines the ModuleNotFoundError still exists.

Hi, @ahaidu
Under the present conditions, I still cannot run the SKRL codes. To elaborate, both of the codes I attached don’t work with headless, and one of them (reaching_ur5e) at least works with headless=False.

moving_target.7z (2.1 MB)
reaching_ur5e.7z (2.1 MB)

At headless=True configuration, the error message is

....
.... # I skipped the above lines
....
[1.229s] [ext: omni.isaac.cloner-0.4.1] startup
[1.230s] [ext: omni.isaac.core-1.46.3] startup
[1.325s] [ext: omni.warp-0.6.3] startup
Warp 0.6.3 initialized:
   CUDA Toolkit: 11.5, Driver: 12.0
   Devices:
     "cpu"    | x86_64
     "cuda:0" | NVIDIA GeForce RTX 3090 (sm_86)
   Kernel cache: /home/bak/.cache/warp/0.6.3
[1.474s] [ext: omni.kit.window.title-1.1.2] startup
[1.474s] [ext: omni.isaac.gym-0.3.3] startup
[1.475s] [ext: omni.isaac.sim.python.gym.headless-2022.2.1] startup
[1.475s] Simulation App Starting
[1.684s] app ready
[1.694s] Simulation App Startup Complete
Traceback (most recent call last):
  File "moving_target_train.py", line 64, in <module>
    from moving_target_env import MovingTargetTask, TASK_CFG
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/OmniIsaacGymEnvs/omniisaacgymenvs/skrl_examples/moving_target/moving_target_env.py", line 5, in <module>
    from omniisaacgymenvs.tasks.base.rl_task import RLTask
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/OmniIsaacGymEnvs/omniisaacgymenvs/tasks/base/rl_task.py", line 39, in <module>
    from omniisaacgymenvs.utils.domain_randomization.randomize import Randomizer
  File "/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/OmniIsaacGymEnvs/omniisaacgymenvs/utils/domain_randomization/randomize.py", line 32, in <module>
    import omni.replicator.core as rep
ModuleNotFoundError: No module named 'omni.replicator'
2023-04-04 07:05:47 [1,873ms] [Warning] [carb.audio.context] 1 contexts were leaked
Segmentation fault (core dumped)

The Segmentation fault (core dumped) only occurred at terminal windows. It doesn’t occur running with vscode.

Another problem is when I run a moving_target_train.py with vscode, the Isaac Sim window automatically shut down without any errors. It occurred when just finished self._physx_interface.update_simulation(self.get_physics_dt(), 0.0) from ./isaac_sim-2022.2.1/exts/omni.isaac.core/omni/isaac/core/physics_context/physics_context.py.

    def warm_start(self):
        self._physx_interface.start_simulation()
        self._physx_interface.force_load_physics_from_usd()
        self._physx_interface.update_simulation(self.get_physics_dt(), 0.0)
        # self._physx_sim_interface.simulate(self.get_physics_dt(), 0.0) # This causes a hang
        self._physx_sim_interface.fetch_results()

Maybe the problem occurred from the main train file moving_target_train.py but, I cannot find any problems.

Both work well on 2022.2.0.

Hi there, have you tried grabbing the latest release of OIGE (GitHub - NVIDIA-Omniverse/OmniIsaacGymEnvs: Reinforcement Learning Environments for Omniverse Isaac Gym)? We recently made a change where omni.replicator is enabled at runtime, which is available in the latest OIGE release. Without this change, it’s likely you’ll hit the ModuleNotFoundError: No module named 'omni.replicator' error.

2 Likes

@kellyg
Hi,
I resynced my forked OmniIsaacGymEnvs repository and then did pip install -e . again, but the same problems still exist.

I see, I think the issue might be because the from moving_target_env import MovingTargetTask import comes before SimConfig() is created, which is where it loads the replicator extension. We can try moving the import after sim_config = SimConfig(TASK_CFG), or alternatively you can add "omni.replicator.isaac" = {} to the bottom of the omni.isaac.sim.python.gym.headless.kit file.

1 Like

Hi @psh9002 and @kellyg

Looking at this topic I realize that you are using the ReachingFrankaTask example provided with skrl.

As @kellyg indicates the problem is that in this script the configuration used to create a SimConfig instance is loaded from the same script where the task is located. And also the solution is the one provided by @kellyg, since the omni.replicator.isaac extension is loaded when creating the SimConfig instance.

Please note that, after the last OIGE release, skrl (and its examples) were also updated (version 0.10.2) to match the changes.


If you inspect the example you will find the next lines at the begging of the environment file:


If you have any problem with skrl in the future, you can tag me directly or open a new discussion in the repository :)

1 Like

Thanks, @kellyg @toni.sm !

I can resolved the problem that cannont run with headless=True.

However, I still cannot run moving_target which I created though, the reaching_ur5e run well.

Hi @psh9002

Could you please share the errors, logs or updated version of moving_target code and assets?

Here is my moving_target code and errors.
moving_target.7z (2.1 MB)

python moving_target_train.py 
[skrl:INFO] Seed: 42
[Warning] [omni.isaac.kit.simulation_app] Modules: ['omni.isaac.kit.app_framework'] were loaded before SimulationApp was started and might not be loaded correctly.
[Warning] [omni.isaac.kit.simulation_app] Please check to make sure no extra omniverse or pxr modules are imported before the call to SimulationApp(...)
Starting kit application with the following args:  ['/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/exts/omni.isaac.kit/omni/isaac/kit/simulation_app.py', '/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/apps/omni.isaac.sim.python.kit', '--/app/tokens/exe-path=/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/kit', '--/persistent/app/viewport/displayOptions=3094', '--/rtx/materialDb/syncLoads=True', '--/rtx/hydra/materialSyncLoads=True--/omni.kit.plugin/syncUsdLoads=True', '--/app/renderer/resolution/width=1280', '--/app/renderer/resolution/height=720', '--/app/window/width=1440', '--/app/window/height=900', '--/renderer/multiGpu/enabled=True', '--/app/fastShutdown=True', '--ext-folder', '/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/exts', '--ext-folder', '/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/apps', '--/physics/cudaDevice=0', '--portable']
Passing the following args to the base kit application:  []
[Warning] [omni.kit.app.plugin] No crash reporter present, dumps uploading isn't available.
[Info] [carb] Logging to file: /home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/logs/Kit/Isaac-Sim/2022.2/kit_20230406_231129.log
2023-04-06 14:11:29 [16ms] [Warning] [omni.ext.plugin] [ext: omni.sensors.nv.lidar] Extensions config 'extension.toml' doesn't exist '/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/exts/omni.sensors.nv.lidar' or '/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/exts/omni.sensors.nv.lidar/config'
2023-04-06 14:11:29 [16ms] [Warning] [omni.ext.plugin] [ext: omni.sensors.nv.radar] Extensions config 'extension.toml' doesn't exist '/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/exts/omni.sensors.nv.radar' or '/home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/exts/omni.sensors.nv.radar/config'
[0.153s] [ext: omni.stats-0.0.0] startup
[0.164s] [ext: omni.rtx.shadercache-1.0.0] startup
[0.167s] [ext: omni.assets.plugins-0.0.0] startup
[0.168s] [ext: omni.gpu_foundation-0.0.0] startup
[0.171s] [ext: carb.windowing.plugins-1.0.0] startup
[0.175s] [ext: omni.kit.renderer.init-0.0.0] startup

|---------------------------------------------------------------------------------------------|
| Driver Version: 525.60.11     | Graphics API: Vulkan
|=============================================================================================|
| GPU | Name                             | Active | LDA | GPU Memory | Vendor-ID | LUID       |
|     |                                  |        |     |            | Device-ID | UUID       |
|---------------------------------------------------------------------------------------------|
| 0   | NVIDIA GeForce RTX 3090          | Yes: 0 |     | 24822   MB | 10de      | 0          |
|     |                                  |        |     |            | 2204      | be8d84b5.. |
|=============================================================================================|
| OS: Linux bak-ubuntu, Version: 5.15.0-69-generic
| XServer Vendor: The X.Org Foundation, XServer Version: 12013000 (1.20.13.0)
| Processor: 12th Gen Intel(R) Core(TM) i7-12700K | Cores: Unknown | Logical: 20
|---------------------------------------------------------------------------------------------|
| Total Memory (MB): 64085 | Free Memory: 19101
| Total Page/Swap (MB): 2047 | Free Page/Swap: 2047
|---------------------------------------------------------------------------------------------|
[0.670s] [ext: omni.kit.pipapi-0.0.0] startup
[0.673s] [ext: omni.kit.pip_archive-0.0.0] startup
[0.675s] [ext: omni.kit.loop-isaac-1.0.0] startup
[0.675s] [ext: omni.kit.async_engine-0.0.0] startup
[0.676s] [ext: omni.kit.test-0.0.0] startup
[0.686s] [ext: omni.usd.config-1.0.0] startup
[0.688s] [ext: omni.usd.libs-1.0.0] startup
[0.784s] [ext: omni.isaac.core_archive-2.0.1] startup
[0.788s] [ext: omni.pip.torch-1_13_1-0.1.4] startup
[0.789s] [ext: omni.isaac.ml_archive-1.1.0] startup
[0.790s] [ext: omni.client-0.1.1] startup
[0.795s] [ext: omni.appwindow-1.0.1] startup
[0.797s] [ext: omni.kit.renderer.core-0.0.0] startup
[1.101s] [ext: omni.kit.renderer.capture-0.0.0] startup
[1.106s] [ext: omni.kit.renderer.imgui-0.0.0] startup
[1.219s] [ext: carb.audio-0.1.0] startup
[1.220s] [ext: omni.ui-2.14.4] startup
[1.225s] [ext: omni.uiaudio-1.0.0] startup
[1.226s] [ext: omni.kit.mainwindow-1.0.0] startup
[1.227s] [ext: omni.kit.uiapp-0.0.0] startup
[1.227s] [ext: omni.usd.schema.physics-1.0.0] startup
[1.249s] [ext: omni.usd.schema.isaac-1.1.0] startup
[1.256s] [ext: omni.usd.schema.semantics-0.0.0] startup
[1.262s] [ext: omni.usd.schema.omnigraph-1.0.0] startup
[1.267s] [ext: omni.usd.schema.forcefield-0.0.0] startup
[1.271s] [ext: omni.usd.schema.omniscripting-1.0.0] startup
[1.275s] [ext: omni.usd.schema.geospatial-0.0.0] startup
[1.278s] [ext: omni.usd.schema.anim-0.0.0] startup
[1.311s] [ext: omni.usd.schema.audio-0.0.0] startup
[1.314s] [ext: omni.usd.schema.scene.visualization-1.0.0] startup
[1.314s] [ext: omni.usd.schema.physx-0.0.0] startup
[1.330s] [ext: omni.gpucompute.plugins-0.0.0] startup
[1.330s] [ext: omni.timeline-1.0.5] startup
[1.331s] [ext: omni.kit.search_core-1.0.2] startup
[1.331s] [ext: omni.hydra.scene_delegate-0.3.0] startup
[1.336s] [ext: omni.kit.widget.path_field-2.0.4] startup
[1.338s] [ext: omni.kit.widget.filebrowser-2.3.10] startup
[1.345s] [ext: omni.kit.widget.browser_bar-2.0.5] startup
[1.345s] [ext: omni.kit.window.popup_dialog-2.0.16] startup
[1.348s] [ext: omni.kit.actions.core-1.0.0] startup
[1.349s] [ext: omni.usd.core-1.0.4] startup
[1.351s] [ext: omni.kit.audiodeviceenum-1.0.0] startup
[1.351s] [ext: omni.kit.widget.nucleus_connector-1.0.3] startup
[1.352s] [ext: omni.kit.commands-1.4.5] startup
[1.355s] [ext: omni.hydra.usdrt_delegate-4.3.2] startup
[1.367s] [ext: omni.kit.notification_manager-1.0.5] startup
[1.397s] [ext: omni.usd-1.6.30] startup
[1.426s] [ext: omni.kit.widget.versioning-1.3.8] startup
[1.427s] [ext: omni.iray.libs-0.0.0] startup
[1.430s] [ext: omni.kit.window.filepicker-2.7.15] startup
[1.458s] [ext: omni.mdl.neuraylib-0.1.0] startup
[1.460s] [ext: omni.kit.collaboration.channel_manager-1.0.9] startup
[1.461s] [ext: omni.kit.window.file_importer-1.0.10] startup
[1.461s] [ext: omni.mdl-0.1.0] startup
[1.473s] [ext: omni.kit.usd.layers-2.0.11] startup
[1.478s] [ext: omni.kit.menu.utils-1.4.7] startup
[1.483s] [ext: omni.kit.material.library-1.3.21] startup
[1.486s] [ext: omni.kit.menu.create-1.0.8] startup
[1.487s] [ext: omni.kit.clipboard-1.0.0] startup
[1.487s] [ext: omni.kit.widget.graph-1.5.6-104_2] startup
[1.501s] [ext: omni.kit.context_menu-1.5.12] startup
[1.503s] [ext: omni.kit.window.extensions-1.1.1] startup
[1.506s] [ext: omni.inspect-1.0.1] startup
[1.511s] [ext: omni.kit.window.property-1.8.2] startup
[1.512s] [ext: omni.kit.primitive.mesh-1.0.8] startup
[1.514s] [ext: omni.graph.core-2.65.4] startup
[1.516s] [ext: omni.isaac.version-1.0.0] startup
[1.516s] [ext: omni.kit.stage_templates-1.1.13] startup
[1.517s] [ext: omni.kit.usd_undo-0.1.2] startup
[1.518s] [ext: omni.graph.tools-1.17.2] startup
[1.527s] [ext: omni.ui.scene-1.5.18] startup
[1.530s] [ext: omni.graph-1.50.2] startup
[1.556s] [ext: omni.ui_query-1.1.1] startup
[1.556s] [ext: omni.volume-0.1.0] startup
[1.558s] [ext: omni.kit.ui_test-1.2.9] startup
[1.559s] [ext: omni.hydra.rtx-0.1.0] startup
[1.563s] [ext: omni.kit.widget.searchfield-1.0.10] startup
[1.564s] [ext: omni.kit.graph.delegate.default-1.0.18] startup
[1.565s] [ext: omni.debugdraw-0.1.1] startup
[1.569s] [ext: omni.kit.graph.editor.core-1.4.7] startup
[1.570s] [ext: omni.hydra.pxr-1.1.2] startup
[1.574s] [ext: omni.activity.core-1.0.1] startup
[1.575s] [ext: omni.kit.hydra_texture-1.0.11] startup
[1.579s] [ext: omni.kit.viewport.legacy_gizmos-1.0.10] startup
[1.582s] [ext: omni.kit.viewport.registry-104.0.2] startup
[1.582s] [ext: omni.kit.widget.viewport-104.1.16] startup
[1.584s] [ext: omni.kit.window.drop_support-1.0.1] startup
[1.584s] [ext: omni.kit.window.file_exporter-1.0.10] startup
[1.585s] [ext: omni.hydra.engine.stats-1.0.0] startup
[1.588s] [ext: omni.kit.window.content_browser_registry-0.0.1] startup
[1.588s] [ext: omni.kit.window.file-1.3.32] startup
[1.590s] [ext: omni.kit.viewport.window-104.1.23] startup
[1.642s] [ext: omni.kit.widget.settings-1.0.1] startup
[1.645s] [ext: omni.kit.widget.stage-2.7.24] startup
[1.648s] [ext: omni.kit.window.content_browser-2.6.8] startup
[1.659s] [ext: omni.kit.viewport.utility-1.0.14] startup
[1.659s] [ext: omni.kit.window.preferences-1.3.8] startup
[1.678s] [ext: omni.kit.widget.text_editor-1.0.2] startup
[1.679s] [ext: omni.kit.widget.prompt-1.0.5] startup
[1.679s] [ext: omni.kit.property.usd-3.18.17] startup
[1.685s] [ext: omni.kit.graph.delegate.modern-1.6.5] startup
[1.686s] [ext: omni.graph.ui-1.24.2] startup
[1.707s] [ext: omni.physics.tensors-0.1.0] startup
[1.712s] [ext: omni.kit.graph.widget.variables-2.0.4] startup
[1.713s] [ext: omni.kit.graph.usd.commands-1.2.0] startup
[1.713s] [ext: omni.convexdecomposition-104.2.4-5.1] startup
[1.715s] [ext: omni.graph.window.core-1.43.3] startup
[1.720s] [ext: omni.kit.widget.zoombar-1.0.4] startup
[1.720s] [ext: omni.kvdb-0.0.0] startup
[1.722s] [ext: omni.usdphysics-104.2.4-5.1] startup
[1.724s] [ext: omni.localcache-0.0.0] startup
[1.725s] [ext: omni.graph.scriptnode-0.10.0] startup
[1.726s] [ext: omni.physx-104.2.4-5.1] startup
[1.773s] [ext: omni.command.usd-1.0.2] startup
[1.777s] [ext: omni.physx.tensors-0.1.0] startup
[1.785s] [ext: omni.graph.window.generic-1.3.15] startup
[1.787s] [ext: omni.kit.browser.core-2.2.2] startup
[1.790s] [ext: omni.graph.action-1.31.1] startup
[1.795s] [ext: omni.kit.browser.folder.core-1.7.3] startup
[1.797s] [ext: omni.kit.window.cursor-1.1.1] startup
[1.798s] [ext: omni.kit.widget.spinner-1.0.4] startup
[1.799s] [ext: omni.kit.browser.sample-1.2.5] startup
[1.800s] [ext: omni.graph.nodes-1.48.3] startup
[1.808s] [ext: omni.kit.viewport.menubar.core-104.4.3] startup
[1.819s] [ext: omni.kit.numpy.common-0.1.0] startup
[1.820s] [ext: omni.warp-0.6.3] startup
Warp 0.6.3 initialized:
   CUDA Toolkit: 11.5, Driver: 12.0
   Devices:
     "cpu"    | x86_64
     "cuda:0" | NVIDIA GeForce RTX 3090 (sm_86)
   Kernel cache: /home/bak/.cache/warp/0.6.3
[1.973s] [ext: omni.syntheticdata-0.2.4] startup
2023-04-06 14:11:31 [1,974ms] [Warning] [omni.kit.viewport.menubar.core.menu_item.viewport_menu_item] ViewportMenuItem order argument is deprecated, use order_setting_path
[1.983s] [ext: omni.isaac.dynamic_control-1.2.3] startup
[1.989s] [ext: omni.replicator.core-1.7.8] startup
2023-04-06 14:11:31 [1,995ms] [Warning] [omni.replicator.core.scripts.annotators] Annotator PostProcessDispatch is already registered, overwriting annotator template
[2.065s] [ext: omni.isaac.core-1.46.3] startup
[2.121s] [ext: omni.kit.manipulator.viewport-104.0.7] startup
[2.122s] [ext: omni.isaac.core_nodes-0.23.2] startup
[2.130s] [ext: omni.isaac.cloner-0.4.1] startup
[2.131s] [ext: omni.isaac.lula-1.2.1] startup
[2.136s] [ext: omni.graph.visualization.nodes-2.0.0] startup
[2.140s] [ext: omni.isaac.debug_draw-0.2.3] startup
[2.144s] [ext: omni.isaac.gym-0.3.3] startup
[2.144s] [ext: omni.graph.window.action-1.5.5] startup
[2.145s] [ext: omni.isaac.ui-0.8.0] startup
[2.147s] [ext: usdrt.scenegraph-4.3.2] startup
[2.158s] [ext: omni.isaac.motion_planning-0.2.2] startup
[2.163s] [ext: omni.isaac.surface_gripper-0.4.0] startup
[2.166s] [ext: omni.isaac.range_sensor-0.8.1] startup
[2.186s] [ext: omni.isaac.motion_generation-4.5.6] startup
[2.189s] [ext: omni.isaac.manipulators-1.1.0] startup
[2.190s] [ext: omni.isaac.sensor-5.6.3] startup
2023-04-06 14:11:31 [2,184ms] [Warning] [omni.ext.plugin] [ext: omni.isaac.sensor-5.6.3] Native plugin search dir contains several files: /home/bak/.local/share/ov/pkg/isaac_sim-2022.2.1/exts/omni.isaac.sensor/bin . It makes dir walk slow, replace with the exact path to the plugin instead of a wildcard.
[2.217s] [ext: omni.isaac.dofbot-0.3.0] startup
[2.217s] [ext: omni.isaac.occupancy_map-0.2.7] startup
[2.226s] [ext: omni.isaac.quadruped-1.3.0] startup
[2.389s] [ext: omni.isaac.scene_blox-0.1.0] startup
[2.389s] [ext: omni.isaac.synthetic_utils-0.4.3] startup
[2.390s] [ext: omni.isaac.universal_robots-0.3.2] startup
[2.391s] [ext: omni.isaac.isaac_sensor-2.0.0] startup
2023-04-06 14:11:31 [2,385ms] [Warning] [omni.isaac.isaac_sensor] omni.isaac.isaac_sensor is deprecated and was renamed; use omni.isaac.sensor
[2.391s] [ext: omni.kit.widget.live_session_management-1.1.3] startup
[2.393s] [ext: omni.kit.hotkeys.core-1.0.8] startup
[2.395s] [ext: omni.isaac.wheeled_robots-0.6.3] startup
[2.399s] [ext: omni.kit.widget.stage_icons-1.0.2] startup
[2.400s] [ext: omni.kit.widget.layers-1.6.11] startup
[2.407s] [ext: omni.kit.selection-0.1.0] startup
[2.408s] [ext: omni.isaac.mjcf-0.3.1] startup
[2.413s] [ext: omni.kit.window.stage-2.3.12] startup
[2.415s] [ext: omni.kit.property.layer-1.1.4] startup
[2.416s] [ext: omni.kit.menu.edit-1.1.6] startup
[2.417s] [ext: omni.kit.menu.file-1.1.4] startup
[2.418s] [ext: omni.kit.menu.stage-1.2.1] startup
[2.418s] [ext: omni.kit.property.audio-1.0.6] startup
[2.419s] [ext: omni.kit.property.camera-1.0.3] startup
[2.419s] [ext: omni.kit.property.geometry-1.2.2] startup
[2.421s] [ext: omni.kit.property.light-1.0.6] startup
[2.421s] [ext: omni.hydra.scene_api-0.1.1] startup
[2.426s] [ext: omni.kit.property.material-1.8.19] startup
[2.428s] [ext: omni.kit.property.render-1.1.0] startup
[2.428s] [ext: omni.kit.property.skel-1.0.1] startup
[2.429s] [ext: omni.kit.property.transform-1.3.5] startup
[2.431s] [ext: omni.kit.manipulator.transform-104.6.12] startup
[2.432s] [ext: omni.kit.widget.toolbar-1.4.0] startup
[2.436s] [ext: omni.kit.profiler.window-2.0.5] startup
[2.473s] [ext: omni.kit.property.bundle-1.2.6] startup
[2.474s] [ext: omni.kit.manipulator.selector-1.0.1] startup
[2.475s] [ext: omni.kit.manipulator.tool.snap-1.2.4] startup
[2.478s] [ext: omni.kit.window.toolbar-1.4.0] startup
[2.480s] [ext: omni.kit.property.isaac-0.2.0] startup
[2.480s] [ext: omni.kit.stage_column.payload-1.0.8] startup
[2.482s] [ext: omni.kit.manipulator.camera-104.0.23] startup
[2.482s] [ext: omni.kit.manipulator.prim-104.10.7] startup
[2.485s] [ext: omni.kit.manipulator.selection-104.0.6] startup
[2.485s] [ext: omni.kit.viewport.menubar.display-104.1.11] startup
[2.486s] [ext: omni.kit.viewport.menubar.camera-104.1.9] startup
[2.489s] [ext: omni.rtx.window.settings-0.6.2] startup
[2.492s] [ext: omni.kit.viewport.menubar.settings-104.3.5] startup
[2.494s] [ext: omni.kit.viewport.menubar.render-104.0.20] startup
[2.496s] [ext: omni.physx.commands-104.2.4-5.1] startup
[2.498s] [ext: omni.kit.stage_column.variant-1.0.9] startup
[2.499s] [ext: omni.hydra.pxr.settings-1.0.3] startup
[2.500s] [ext: omni.kit.viewport.bundle-104.0.2] startup
[2.500s] [ext: omni.physx.ui-104.2.4-5.1] startup
[2.541s] [ext: omni.kit.viewport.menubar.lighting-104.0.9] startup
[2.542s] [ext: omni.kit.viewport.pxr-104.0.1] startup
[2.542s] [ext: omni.kit.viewport.ready-1.0.2] startup
[2.543s] [ext: omni.physx.demos-104.2.4-5.1] startup
[2.544s] [ext: omni.kit.property.physx-0.1.0] startup
[2.575s] [ext: omni.isaac.urdf-0.5.9] startup
[2.594s] [ext: omni.kit.widget.highlight_label-1.0.0] startup
[2.595s] [ext: omni.physx.supportui-104.2.4-5.1] startup
[2.604s] [ext: omni.physx.vehicle-104.2.4-5.1] startup
[2.612s] [ext: omni.physx.cct-104.2.4-5.1] startup
[2.617s] [ext: omni.physx.camera-104.2.4-5.1] startup
[2.621s] [ext: omni.kit.actions.window-1.1.0] startup
[2.623s] [ext: omni.kit.window.commands-0.2.4] startup
[2.624s] [ext: omni.kit.window.console-0.2.3] startup
[2.631s] [ext: omni.physx.bundle-104.2.4-5.1] startup
[2.631s] [ext: omni.graph.bundle.action-1.3.0] startup
[2.631s] [ext: omni.kit.window.script_editor-1.7.2] startup
[2.632s] [ext: omni.kit.hotkeys.window-1.1.3] startup
[2.635s] [ext: omni.kit.window.status_bar-0.1.5] startup
[2.638s] [ext: omni.kit.window.title-1.1.2] startup
[2.639s] [ext: omni.replicator.composer-1.2.10] startup
[2.641s] [ext: omni.replicator.isaac-1.7.4] startup
[2.649s] [ext: omni.resourcemonitor-1.0.0] startup
[2.653s] [ext: omni.rtx.settings.core-0.5.8] startup
[2.656s] [ext: omni.isaac.franka-0.4.0] startup
[2.657s] [ext: omni.kit.viewport.rtx-104.0.0] startup
[2.657s] [ext: semantics.schema.editor-0.3.3] startup
[2.659s] [ext: omni.kit.widget.live-2.0.3] startup
[2.660s] [ext: omni.isaac.utils-0.2.4] startup
[2.663s] [ext: omni.isaac.kit-1.4.1] startup
[2.663s] [ext: omni.isaac.cortex-0.3.2] startup
[2.663s] [ext: omni.kit.window.stats-0.1.2] startup
[2.664s] [ext: omni.isaac.sim.python-2022.2.1] startup
[2.665s] Simulation App Starting
[4.908s] app ready
[4.982s] RTX ready
[5.041s] Simulation App Startup Complete
Sim params does not have attribute:  physx
Sim params does not have attribute:  robot
Sim params does not have attribute:  target
Pipeline:  GPU
Pipeline Device:  cuda:0
Sim Device:  GPU
Task Device: cuda:0
RL device:  cuda:0
/home/bak/anaconda3/envs/isaac-sim_22.2.1/lib/python3.7/site-packages/gym/spaces/box.py:74: UserWarning: WARN: Box bound precision lowered by casting to float32
  "Box bound precision lowered by casting to {}".format(self.dtype)
[5.705s] [ext: omni.physx.flatcache-104.2.4-5.1] startup
Actor params does not have attribute:  fixed_base
Actor params does not have attribute:  fixed_base
Segmentation fault (core dumped)

Thanks!

Hi @psh9002

For some reason that needs to be investigated in depth, the simulation breaks when the .usd of the robot is loaded.

In any case, I have adapted the skrl’s iiwa example for ur5e.
The example works, and also includes the .urdf files for ur5e with a cylindrical peg attached as the end-effector. The practice I typically follow is to create/adapt the urdf for my case and then use the URDF Importer to bring my robot into Isaac Sim.

You can adjust the peg dimensions and pose in the ur5e/urdf/ur5e_peg.urdf file:

  <!-- peg -->
  <link name="peg">
    <visual>
      <geometry>
        <cylinder length="0.15" radius="0.015"/>
      </geometry>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.15" radius="0.015"/>
      </geometry>
    </collision>
  </link>
  <joint name="peg_fixed_joint" type="fixed">
    <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.075"/>
    <parent link="tool0"/>
    <child link="peg"/>
  </joint>

In addition, the example includes the ur5e .usd files as instanceable assets (for both cases: merged fixed joint and not). Note that the use of Instanceable Assets is the recommended practice for massive parallel reinforcement learning, thus reducing memory usage in the overall simulation environment.


With all of them, I encourage you to start from this example to develop your implementation.


ur5e_target.zip (8.7 MB)

1 Like

Thanks, @toni.sm !
I will change the USD files with your files.

However, I cannot apply gravity and cannot change dynamic primitive shapes to DynamicCylinder. The strange thing is that I can import DynamicCuboid. I just changed target in def get_target(self): in the environment file.

        target = DynamicCylinder(
                    prim_path=self.default_zero_env_path + "/target",
                    name="target",
                    scale=np.array([0.03, 0.03, 0.03]),
                    color=torch.tensor([1, 0, 0]),
                    density=100,
                    # mass=0.1,
                    )
        target = DynamicCuboid(
                    prim_path=self.default_zero_env_path + "/target",
                    name="target",
                    scale=np.array([0.03, 0.03, 0.03]),
                    color=torch.tensor([1, 0, 0]),
                    density=100,
                    # mass=0.1,
        )

I also cannot apply gravity even if I add target.enable_rigid_body_physics() and set "fixed_base": False,.

Here is what I tried at def get_target(self):.

    def get_target(self):
        target = DynamicSphere(prim_path=self.default_zero_env_path + "/target",
                               name="target",
                               radius=0.025,
                               color=torch.tensor([1, 0, 0]),
                               )

        target.set_density(0.5)
        target.set_mass(0.1)
        target.set_collision_enabled(True)
        target.enable_rigid_body_physics()
        self._sim_config.apply_articulation_settings("target", get_prim_at_path(target.prim_path), self._sim_config.parse_actor_config("target"))

At version 22.2.0, I can change shape and apply gravity with "fixed_base": False, from the config setup.

@toni.sm
Thanks for your answers on the SKRL discussions page.

If someone has the same issue, please refer to the SKRL discussions page below.

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