Toni-SM / semu.robotics.ros2_bridge

ROS2 Bridge (external extension) for NVIDIA Omniverse Isaac Sim
MIT License
5 stars 0 forks source link

Isaac 2022.2.1 support #2

Open spirosperos opened 1 year ago

spirosperos commented 1 year ago

Hello! I tried importing the extension into Isaac 2022.2.1 however I get this error when I try to enable the usd.schemas dependency:

[220.589s] [ext: semu.usd.schemas-0.0.3] startup
>>>> [DEVELOPMENT] import rosBridgeSchema
2023-04-10 13:52:54 [220,601ms] [Error] [omni.ext._impl.custom_importer] Failed to import python module semu.usd.schemas.RosBridgeSchema. Error: cannot import name 'rosBridgeSchema' from 'semu.usd.schemas.RosBridgeSchema' (/home/nikola/.local/share/ov/data/Kit/Isaac-Sim/2022.2/exts/3/semu.usd.schemas-0.0.3+linu.r.-/semu/usd/schemas/RosBridgeSchema/__init__.py). Traceback:
Traceback (most recent call last):
  File "/home/nikola/.local/share/ov/data/Kit/Isaac-Sim/2022.2/exts/3/semu.usd.schemas-0.0.3+linu.r.-/semu/usd/schemas/RosBridgeSchema/__init__.py", line 4, in <module>
    from . import _rosBridgeSchema
  File "semu/usd/schemas/RosBridgeSchema/rosBridgeSchema.py", line 2, in init _rosBridgeSchema
ModuleNotFoundError: No module named 'omni.isaac.RosBridgeSchema'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/kernel/py/omni/ext/_impl/custom_importer.py", line 76, in import_module
    return importlib.import_module(name)
  File "/home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/nikola/.local/share/ov/data/Kit/Isaac-Sim/2022.2/exts/3/semu.usd.schemas-0.0.3+linu.r.-/semu/usd/schemas/RosBridgeSchema/__init__.py", line 7, in <module>
    from . import rosBridgeSchema as _rosBridgeSchema
ImportError: cannot import name 'rosBridgeSchema' from 'semu.usd.schemas.RosBridgeSchema' (/home/nikola/.local/share/ov/data/Kit/Isaac-Sim/2022.2/exts/3/semu.usd.schemas-0.0.3+linu.r.-/semu/usd/schemas/RosBridgeSchema/__init__.py)

2023-04-10 13:52:54 [220,601ms] [Error] [carb.scripting-python.plugin] Exception: Extension python module: 'semu.usd.schemas.RosBridgeSchema' in '/home/nikola/.local/share/ov/data/Kit/Isaac-Sim/2022.2/exts/3/semu.usd.schemas-0.0.3+linu.r.-' failed to load.

At:
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/kernel/py/omni/ext/_impl/_internal.py(189): startup
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/kernel/py/omni/ext/_impl/_internal.py(285): startup_extension
  PythonExtension.cpp::startup()(2): <module>
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.kit.window.extensions/omni/kit/window/extensions/ext_commands.py(29): do
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/extscore/omni.kit.commands/omni/kit/undo/undo.py(80): execute
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/extscore/omni.kit.commands/omni/kit/commands/command.py(459): execute
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.kit.window.extensions/omni/kit/window/extensions/common.py(287): toggle_extension
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.kit.window.extensions/omni/kit/window/extensions/ext_components.py(89): toggle

2023-04-10 13:52:54 [220,601ms] [Error] [omni.ext.plugin] [ext: semu.usd.schemas-0.0.3] Failed to startup python extension.
>>>> [DEVELOPMENT] import rosBridgeSchema
2023-04-10 13:52:55 [220,885ms] [Error] [omni.ext.python] ImportError: cannot import name 'rosBridgeSchema' from 'semu.usd.schemas.RosBridgeSchema' (/home/nikola/.local/share/ov/data/Kit/Isaac-Sim/2022.2/exts/3/semu.usd.schemas-0.0.3+linu.r.-/semu/usd/schemas/RosBridgeSchema/__init__.py)

At:
  /home/nikola/.local/share/ov/data/Kit/Isaac-Sim/2022.2/exts/3/semu.usd.schemas-0.0.3+linu.r.-/semu/usd/schemas/RosBridgeSchema/__init__.py(7): <module>
  <frozen importlib._bootstrap>(219): _call_with_frames_removed
  <frozen importlib._bootstrap_external>(728): exec_module
  <frozen importlib._bootstrap>(677): _load_unlocked
  <frozen importlib._bootstrap>(967): _find_and_load_unlocked
  <frozen importlib._bootstrap>(983): _find_and_load
  <frozen importlib._bootstrap>(1006): _gcd_import
  <frozen importlib._bootstrap>(219): _call_with_frames_removed
  <frozen importlib._bootstrap>(953): _find_and_load_unlocked
  <frozen importlib._bootstrap>(983): _find_and_load
  <frozen importlib._bootstrap>(1006): _gcd_import
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/python/lib/python3.7/importlib/__init__.py(127): import_module
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.graph/omni/graph/core/_impl/extension.py(81): on_after_ext_enabled
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.kit.window.extensions/omni/kit/window/extensions/ext_commands.py(29): do
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/extscore/omni.kit.commands/omni/kit/undo/undo.py(80): execute
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/extscore/omni.kit.commands/omni/kit/commands/command.py(459): execute
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.kit.window.extensions/omni/kit/window/extensions/common.py(287): toggle_extension
  /home/nikola/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/exts/omni.kit.window.extensions/omni/kit/window/extensions/ext_components.py(89): toggle

ROS UI and ROS2 Bridge extension also produce errors when I try enabling them. Do you plan to support newer Isaac Sim versions? Thank you.

Toni-SM commented 1 year ago

Hi @spirosperos

The current implemented version is based on prim schemas prior to the Isaac Sim 2022.1.0.

Sorry for the inconvenience but unfortunately I have not had time, nor will I have until next month, to upgrade the extension to OmniGraph (like the Isaac Sim implementations since version 2022.1.0 and the semu.robotics.ros_bridge version for ROS 1).

You can however contribute by moving the current implementation to OmniGraph looking at the semu.robotics.ros_bridge extension code :)