Adding a New Manipulator example doesn't work

Isaac Sim Version

4.1.0

Operating System

Ubuntu 22.04

Topic Description
Problem when running the control_gripper.py example with the cobotta
Detailed Description

I am encountering an issue while following the “Adding a New Manipulator” example provided with Isaac Sim. Specifically, I get the following error when trying to execute the gripper control script. Details are below:
Error

Traceback (most recent call last):
File “/home/theobloesch/Tuto_Cobotta/cobotta_pro_900/script/gripper_control.py”, line 17, in
gripper = ParallelGripper(
File “/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.1.0/exts/omni.isaac.manipulators/omni/isaac/manipulators/grippers/parallel_gripper.py”, line 37, in init
Gripper.init(self, end_effector_prim_path=end_effector_prim_path)
File “/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.1.0/exts/omni.isaac.manipulators/omni/isaac/manipulators/grippers/gripper.py”, line 24, in init
RigidPrim.init(self, prim_path=end_effector_prim_path, name=“gripper”)
File “/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.1.0/exts/omni.isaac.core/omni/isaac/core/prims/rigid_prim.py”, line 115, in init
self._rigid_prim_view = RigidPrimView(
File “/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.1.0/exts/omni.isaac.core/omni/isaac/core/prims/rigid_prim_view.py”, line 145, in init
XFormPrimView.init(
File “/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.1.0/exts/omni.isaac.core/omni/isaac/core/prims/xform_prim_view.py”, line 137, in init
raise Exception(
Exception: Prim path expression [‘/World/cobotta/onrobot_rg6_base_link’] is invalid, a prim matching the expression needs to created before wrapping it as view

I expected the gripper to initialize successfully and be ready for control, but this error seems to indicate that the specified prim path does not exist or is invalid.

Steps to Reproduce

Follow the steps in the "Adding a New Manipulator" example.
Add a new gripper to the robot.
Run the gripper control script.

Error Messages

See the “Error” section above.

[Include any screenshots or videos if applicable]
Additional Information
What I’ve Tried

Verified that the prim path /World/cobotta/onrobot_rg6_base_link exists in the scene.
Ensured that the prim is loaded before the gripper initialization.
An other USD file from a xarm6 robot

Related Issues

I am using Ubuntu 22.04 with Isaac Sim 4.1.0.

Tanks in advance for your help

I’ve successfully run the following relevant standalone script on Isaac Sim 4.2.0. Please upgrade to the latest version and give it a try.

Hi, thank you for your prompt response.
I followed all the steps again using Isaac Sim 4.2.0, but I am still encountering the same issue.I have converted the cobotta_pro_900.urdf to usd using the urdf converter I’m not using the usd file located here :

asset_path = assets_root_path + "/Isaac/Robots/Denso/cobotta_pro_900.usd"

With this file, the code works.But not with the one generated by Isaac Sim

Traceback (most recent call last):
  File "/home/theobloesch/Tuto_Cobotta/cobotta_pro_900/script/gripper_control.py", line 66, in <module>
    my_world.reset()
  File "/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/world/world.py", line 389, in reset
    self._scene._finalize(self.physics_sim_view)
  File "/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/scenes/scene.py", line 365, in _finalize
    articulated_system.initialize(physics_sim_view)
  File "/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.manipulators/omni/isaac/manipulators/manipulators/single_manipulator.py", line 110, in initialize
    self._end_effector = RigidPrim(prim_path=self._end_effector_prim_path, name=self.name + "_end_effector")
  File "/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/prims/rigid_prim.py", line 115, in __init__
    self._rigid_prim_view = RigidPrimView(
  File "/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/prims/rigid_prim_view.py", line 145, in __init__
    XFormPrimView.__init__(
  File "/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/prims/xform_prim_view.py", line 137, in __init__
    raise Exception(
Exception: Prim path expression ['/World/cobotta/root_joint/onrobot_rg6_base_link'] is invalid, a prim matching the expression needs to created before wrapping it as view

I am not running the script from the Isaac Sim folder. Instead, I created my own folder and copied the necessary files into it and I run it using an alias in the bashrc file :

alias omni_python_4.0='~/.local/share/ov/pkg/isaac-sim-4.0.0/python.sh'
alias omni_python_4.1='~/.local/share/ov/pkg/isaac-sim-4.1.0/python.sh'
alias omni_python_4.2='~/.local/share/ov/pkg/isaac-sim-4.2.0/python.sh'

Could this be causing the issue?
Here is my folder configuration:

Tuto_Cobotta/
└── cobotta_pro_900
    ├── cobotta_pro_900
    │   └── cobotta_pro_900.usd
    ├── cobotta_pro_900.urdf
    ├── cobotta_pro_900_visualization
    │   ├── meshes
    │   │   ├── collision
    │   │   │   ├── base_link.dae
    │   │   │   ├── J1.dae
    │   │   │   ├── J2.dae
    │   │   │   ├── J3.dae
    │   │   │   ├── J4.dae
    │   │   │   ├── J5.dae
    │   │   │   └── J6.dae
    │   │   └── visual
    │   │       ├── base_link.dae
    │   │       ├── J1.dae
    │   │       ├── J2.dae
    │   │       ├── J3.dae
    │   │       ├── J4.dae
    │   │       ├── J5.dae
    │   │       └── J6.dae
    │   └── urdf
    │       └── cobotta_pro_900.xacro
    ├── onrobot_rg6_visualization
    │   ├── images
    │   │   ├── collision.png
    │   │   └── visual.png
    │   ├── meshes
    │   │   ├── collision
    │   │   │   ├── base_link.stl
    │   │   │   ├── inner_finger.stl
    │   │   │   ├── inner_knuckle.stl
    │   │   │   └── outer_knuckle.stl
    │   │   └── visual
    │   │       ├── base_link.stl
    │   │       ├── inner_finger.stl
    │   │       ├── inner_knuckle.stl
    │   │       └── outer_knuckle.stl
    │   └── urdf
    │       ├── onrobot_rg6_model_macro.xacro
    │       ├── onrobot_rg6_model.xacro
    │       ├── onrobot_rg6_transmission.xacro
    │       └── onrobot_rg6.xacro
    └── script
        ├── controllers
        │   ├── pick_place.py
        │   ├── __pycache__
        │   │   ├── pick_place.cpython-310.pyc
        │   │   └── rmpflow.cpython-310.pyc
        │   └── rmpflow.py
        ├── gripper_control.py
        ├── pick_place_example.py
        ├── rmpflow
        │   └── denso_rmpflow_common.yaml
        └── tasks
            ├── pick_place.py
            └── __pycache__
                └── pick_place.cpython-310.pyc

I also have changed the usd file path in the gripper_control.py script to match my folder config:

from isaacsim import SimulationApp


simulation_app = SimulationApp({"headless": False})


from omni.isaac.core import World

from omni.isaac.manipulators import SingleManipulator

from omni.isaac.manipulators.grippers import ParallelGripper

from omni.isaac.core.utils.stage import add_reference_to_stage

from omni.isaac.core.utils.types import ArticulationAction

import numpy as np


my_world = World(stage_units_in_meters=1.0)

#TODO: change this to your own path

asset_path = "/home/theobloesch/Tuto_Cobotta/cobotta_pro_900/cobotta_pro_900/cobotta_pro_900.usd"

add_reference_to_stage(usd_path=asset_path, prim_path="/World/cobotta")

#define the gripper

gripper = ParallelGripper(

    #We chose the following values while inspecting the articulation

    end_effector_prim_path="/World/cobotta/onrobot_rg6_base_link",

    joint_prim_names=["finger_joint", "right_outer_knuckle_joint"],

    joint_opened_positions=np.array([0, 0]),

    joint_closed_positions=np.array([0.628, -0.628]),

    action_deltas=np.array([-0.628, 0.628]),

)

#define the manipulator

my_denso = my_world.scene.add(SingleManipulator(prim_path="/World/cobotta", name="cobotta_robot",

                                                end_effector_prim_name="onrobot_rg6_base_link", gripper=gripper))

#set the default positions of the other gripper joints to be opened so

#that its out of the way of the joints we want to control when gripping an object for instance.

joints_default_positions = np.zeros(12)

joints_default_positions[7] = 0.628

joints_default_positions[8] = 0.628

my_denso.set_joints_default_state(positions=joints_default_positions)

my_world.scene.add_default_ground_plane()

my_world.reset()


i = 0

while simulation_app.is_running():

    my_world.step(render=True)

    if my_world.is_playing():

        if my_world.current_time_step_index == 0:

            my_world.reset()

        i += 1

        gripper_positions = my_denso.gripper.get_joint_positions()

        if i < 500:

            #close the gripper slowly

            my_denso.gripper.apply_action(

                ArticulationAction(joint_positions=[gripper_positions[0] + 0.1, gripper_positions[1] - 0.1]))

        if i > 500:

            #open the gripper slowly

            my_denso.gripper.apply_action(

                ArticulationAction(joint_positions=[gripper_positions[0] - 0.1, gripper_positions[1] + 0.1]))

        if i == 1000:

            i = 0


simulation_app.close()

I tried checking if any of the joints were misnamed, but I didn’t find any misspellings. However, I don’t understand why the prim_path includes a root_joint folder: ['/World/cobotta/root_joint/onrobot_rg6_base_link']. It doesn’t seem to match the structure in the USD file.


Usd file open in Isaac Sim

Thank you in advance for any assistance you can provide in resolving this issue.
Best regards,
Théo Bloesch

I have tried several approaches, and the error seems to originate from the URDF importer.

Here are the steps I followed and their results:

The usd file from isaac sim works so I tried to convert it to urdf and then back to usd :

usd->urdf->usd : the file doesn't work anymore

The urdf file from isaac sim convert

urdf->usd : the file doesn't work

It also print the same error :

Traceback (most recent call last):
  File "/home/theobloesch/Tuto_Cobotta/cobotta_pro_900/script/gripper_control.py", line 61, in <module>
    my_world.reset()
  File "/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/world/world.py", line 389, in reset
    self._scene._finalize(self.physics_sim_view)
  File "/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/scenes/scene.py", line 365, in _finalize
    articulated_system.initialize(physics_sim_view)
  File "/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.manipulators/omni/isaac/manipulators/manipulators/single_manipulator.py", line 110, in initialize
    self._end_effector = RigidPrim(prim_path=self._end_effector_prim_path, name=self.name + "_end_effector")
  File "/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/prims/rigid_prim.py", line 115, in __init__
    self._rigid_prim_view = RigidPrimView(
  File "/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/prims/rigid_prim_view.py", line 145, in __init__
    XFormPrimView.__init__(
  File "/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/prims/xform_prim_view.py", line 137, in __init__
    raise Exception(
Exception: Prim path expression ['/World/cobotta/root_joint/onrobot_rg6_base_link'] is invalid, a prim matching the expression needs to created before wrapping it as view

I would greatly appreciate it if you could provide a solution to this issue, as it is critical for my project.

Thank you in advance for your help!
Best regards
Théo Bloesch

Please provide the original USD and URDF files you used, their location in Isaac Sim 4.2.0, and the conversion methods/commands.

All the file are in this Github :

I use this urdf file:

cobotta_pro_900.urdf

located at :
/home/theobloesch/.local/share/ov/pkg/isaac-sim-4.2.0/extscache/omni.importer.urdf-1.14.1+106.0.0.lx64.r.cp310/data/urdf/robots/cobotta_pro_900

that I copied in another folder easier to reach.

Then I followed the step provided in this tutorial:
https://docs.omniverse.nvidia.com/isaacsim/latest/advanced_tutorials/tutorial_advanced_adding_new_manipulator.html

  1. copy the urdf assets (cobotta_pro_900.urdf, cobotta_pro_900_visualization and onrobot_rg6_visualization) under a new folder URDF_Folder_Path/cobotta_pro_900. These assets could be found at /extscache/omni.importer.urdf-*/data/urdf/robots/cobotta_pro_900
  2. Launch Omniverse Isaac Sim using the launcher.
  3. Open the URDF Importer through Isaac Utils > Workflows > URDF Importer
  4. In the extension window, choose the URDF file under Import > Input File, check Create Physics Scene and Fix Base Link, choose the Joint Drive Type to be Position, and uncheck the Parse Mimic Joint tag.
  5. Click on Import in the extension window.

Which gave me this usd file :

cobotta_pro_900.usd

Hope that could help identify the problem let me know if you need anything else.

Best regards
Théo Bloesch

Did you encounter any problem with my file ?

Thank you for providing the detailed information, and I apologize for the delayed response.
I have successfully reproduced the issue you’re experiencing with the gripper_control.py example for the Cobotta robot. An internal ticket has been created to thoroughly investigate and resolve this problem.

Thank you for bringing this to our attention, and I’ll keep you updated on any progress.

1 Like

Hi, did you have any updates ?
I believe I’ve found a workaround to use until the bug is resolved. I’ve explained it here :

feel free to reach out if it doesn’t work! or if it could cause some problems in the code.

Best regards
Theo Bloesch

The USD imported from the URDF has a different structure compared to the robot in our asset browser. The URDF is intended for a different purpose and should not be used in this tutorial. We will update our documentation, so please refer to the documentation of the 4.5.0 version.

I’ve successfully worked around this problem using this step:

  1. The problem is primarily due to the articulation root is set to world/cobotta/root_joint by default when we imported the urdf, therefore, the gain tuner picked up this as the articulation robot, and the problem carried away when we want to test the gripping fingers.
  2. before we go to gain Tunner, select the root_joint prim and navigate to physics in property window and delete the articulation root.
  3. select the cobotta_pro_900 xform and click add->physics->Articulation root.
  4. redo the gain tuner and save the usd file.
2 Likes

Thanks your solution seems cleaner than mine I will test it and see if its works with my robots !

I’ve tried using the URDF importer in IsaacSim 4.5.0, but I’m no longer able to import the xArm6 URDF file. I’ve created a new topic as this issue doesn’t seem to be related to this version of IsaacSim.

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