I got an error while running the import URDF tutorial (5.1.4. Importing URDF using Python)

I copied the code from the tutorial (5.1. Import URDF — Omniverse IsaacSim latest documentation) and pasted it to vscode, but an error occurred with the following screen.

How can I get the robot to follow the target like the video in the tutorial?

2024-01-07 10:33:34 [390,343ms] [Error] [asyncio] Task exception was never retrieved
future: <Task finished name='Task-692' coro=<BaseSampleExtension._on_load_world.<locals>._on_load_world_async() done, defined at c:/users/jeonghyoengyo/appdata/local/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.examples/omni/isaac/examples/base_sample/base_sample_extension.py:152> exception=AttributeError("'NoneType' object has no attribute 'is_homogeneous'")>
Traceback (most recent call last):
  File "c:/users/jeonghyoengyo/appdata/local/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.examples/omni/isaac/examples/base_sample/base_sample_extension.py", line 153, in _on_load_world_async
    await self._sample.load_world_async()
  File "c:/users/jeonghyoengyo/appdata/local/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.examples/omni/isaac/examples/base_sample/base_sample.py", line 47, in load_world_async
    await self._world.reset_async()
  File "c:/users/jeonghyoengyo/appdata/local/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.core/omni/isaac/core/world/world.py", line 520, in reset_async
    await self.reset_async_no_set_up_scene(soft=soft)
  File "c:/users/jeonghyoengyo/appdata/local/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.core/omni/isaac/core/world/world.py", line 481, in reset_async_no_set_up_scene
    self._scene._finalize(self.physics_sim_view)
  File "c:/users/jeonghyoengyo/appdata/local/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.core/omni/isaac/core/scenes/scene.py", line 322, in _finalize
    robot.initialize(physics_sim_view)
  File "c:/users/jeonghyoengyo/appdata/local/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.franka/omni/isaac/franka/franka.py", line 118, in initialize
    super().initialize(physics_sim_view)
  File "c:/users/jeonghyoengyo/appdata/local/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.core/omni/isaac/core/articulations/articulation.py", line 294, in initialize
    self._articulation_view.initialize(physics_sim_view=physics_sim_view)
  File "c:/users/jeonghyoengyo/appdata/local/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.core/omni/isaac/core/articulations/articulation_view.py", line 349, in initialize
    assert self._physics_view.is_homogeneous
  File "c:/users/jeonghyoengyo/appdata/local/ov/pkg/isaac_sim-2023.1.1/extsphysics/omni.physics.tensors-105.1.12-5.1/omni/physics/tensors/impl/api.py", line 170, in is_homogeneous
    return self._backend.is_homogeneous
AttributeError: 'NoneType' object has no attribute 'is_homogeneous'

Hi @gusry159 - The error message you’re seeing indicates a problem within the initialization sequence of the robot within the Isaac Sim environment. Specifically, the attribute error 'NoneType' object has no attribute 'is_homogeneous' suggests that an object expected to exist is None, meaning it hasn’t been properly instantiated or assigned.

Without the full context or the ability to debug directly, I can offer some general advice to troubleshoot this issue:

  1. Check Stage and Assets: Ensure that the stage is properly set and all the necessary assets are correctly loaded before the script executes. Sometimes, assets or prims not being available at runtime can cause initialization to fail.
  2. Review Dependencies: Verify that all the required extensions, packages, or dependencies are installed and enabled. The error could result from a missing or improperly configured extension.
  3. Correct Version: Ensure that you’re using the correct version of Isaac Sim and related extensions that the tutorial was designed for. Version mismatches can lead to incompatibility issues like the one you’re experiencing.
  4. Follow the Tutorial Steps Carefully: Revisit the tutorial and make sure you have followed all the steps in the correct order. A missed step or misconfiguration can easily lead to an error at runtime.
  5. Examine the Script: There could be an issue with the script that you’ve copied. Ensure that it matches the tutorial exactly, including any initial setup that might be required for the environment.

Let us know if you are still having any issues.

Hi,

I’m having the same issue. I followed the tutorial (5.1.4. Importing URDF using Python) exactly. It worked in Isaac sim 1.0 but not in Isaac sim 1.1.

I also wrote up a standalone python script that imports ur10.urdf. It reported the same error in Isaac sim 1.1 but worked flawlessly in Isaac sim 1.0. You can check out the python script below.

from omni.isaac.kit import SimulationApp

# URDF import, configuration and simulation sample
simulation_app = SimulationApp({"headless": False})

import omni.kit.commands
from omni.isaac.core import World
from omni.isaac.core.articulations import Articulation
from omni.isaac.core.utils.extensions import get_extension_path_from_name
from omni.importer.urdf import _urdf



urdf_interface = _urdf.acquire_urdf_interface()

# Setting up import configuration:
import_config = _urdf.ImportConfig()
import_config.merge_fixed_joints = False
import_config.convex_decomp = False
import_config.fix_base = True
import_config.make_default_prim = True
import_config.self_collision = False
import_config.create_physics_scene = True
import_config.import_inertia_tensor = False
import_config.default_drive_strength = 1000
import_config.default_position_drive_damping = 0
import_config.default_drive_type = _urdf.UrdfJointTargetType.JOINT_DRIVE_VELOCITY
import_config.distance_scale = 1
import_config.density = 0.0

# parse and import file
extension_path = get_extension_path_from_name("omni.importer.urdf")
urdf_path = extension_path + "/data/urdf/robots/ur10/urdf/ur10.urdf"

# import URDF
result, stage_path = omni.kit.commands.execute(
    "URDFParseAndImportFile",
    urdf_path=urdf_path,
    import_config=import_config,
)
my_world = World()
my_world.scene.add_default_ground_plane()
ur10 = my_world.scene.add(
    Articulation(prim_path=stage_path)
)   

my_world.reset()


while simulation_app.is_running():
    my_world.step(render=True)
    print(ur10.dof_properties)


simulation_app.close()

I understand it might be the initialization sequence is different in Isaac Sim 1.1 but I couldn’t pinpoint the issue.

Please let me know.

Thanks in advance.

Summary

This text will be hidden