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