isaac-sim / urdf-importer-extension

URDF Importer
Apache License 2.0
53 stars 2 forks source link

Inconsistent interface of `import_robot` in URDFParseAndImportFile #8

Open Maverobot opened 2 months ago

Maverobot commented 2 months ago

I could not get the command URDFParseAndImportFile working. I tried with

        result, prim_path = omni.kit.commands.execute(
            "URDFParseAndImportFile",
            urdf_path=urdf_path,
            dest_path=dest_path,
            import_config=import_config,
        )

After this line, the result became True and prim_path became /my_robot_name. However, the robot has NOT been added to the stage in the omniverse app.

After checking the source code, I found something quite strange.

In https://github.com/isaac-sim/urdf-importer-extension/blob/b161d55f4bcabe266b8db6707b5c2768aedcde21/source/extensions/omni.importer.urdf/python/scripts/commands.py#L136-L152, the 5th argument of import_robot is "path to USD file" but 5th argument should be stage according to https://github.com/isaac-sim/urdf-importer-extension/blob/b161d55f4bcabe266b8db6707b5c2768aedcde21/source/extensions/omni.importer.urdf/bindings/BindingsUrdfPython.cpp#L411-L429, where the docstring also seems to be outdated.