Fail to create a surface gripper fully on code following the documentation

Isaac Sim Version

[√] 4.5.0

Operating System

[√] Windows 11
[√] Windows 10

Topic Description

Detailed Description

Hi, I want to create a surface gripper fully on code and I am following the documentation :

async def _create_scenario(self, task):
    # [...]

    # Create the Gripper Properties
    self.sgp = Surface_Gripper_Properties()
    self.sgp.d6JointPath = ""
    self.sgp.parentPath = "/GripperCone"                # Set the Cone as the parent object
    self.sgp.offset = dc.Transform()                    # Offset the transform to the base of the Cone
    self.sgp.offset.p.x = 0
    self.sgp.offset.p.z = -0.1001                       # Offset the transform to the base of the Cone
    self.sgp.offset.r = [0.7171, 0, 0.7171, 0]          # Rotate to point gripper in Z direction
    self.sgp.gripThreshold = 0.02                       # Set attachment to within 2cm of the base of the Cone
    self.sgp.forceLimit = 1.0e2                         # Set other limits of the gripper ...
    self.sgp.torqueLimit = 1.0e3
    self.sgp.bendAngle = np.pi / 4
    self.sgp.stiffness = 1.0e4
    self.sgp.damping = 1.0e3
    self.sgp.retryClose = False                         # If set to True, surface gripper will keep trying to close until it picks up an object




    self.surface_gripper = Surface_Gripper(self._dc)    # Create the Gripper
    self.surface_gripper.initialize(self.sgp)           # Initialize the Gripper with these Properties

    # [...]

I am new to Isaac Sim so I am not sure what is dc in dc.Transform(). But I assume it is related to dynamic_control. So I wrote my code as shown below to initialize the surface gripper:

from isaacsim.robot.surface_gripper._surface_gripper import Surface_Gripper, Surface_Gripper_Properties
from omni.isaac.dynamic_control import _dynamic_control

dc = _dynamic_control.acquire_dynamic_control_interface()

gripper_properties = Surface_Gripper_Properties()
gripper = Surface_Gripper(dc)
gripper_properties.forceLimit = 100
gripper_properties.gripThreshold = 0.01
tr = omni.physics.tensors.Transform()
tr.p.y = 0.251000
tr.r.x = 0.0
tr.r.y = 0.70710678
tr.r.z = 0.0
tr.r.w = 0.70710678
gripper_properties.offset = tr
gripper_properties.parentPath = "/World/Gripper"
gripper.initialize(gripper_properties)

and got the error.

I know the Surface_Gripper() constructor doesn’t actually accept any parameters from surface_gripper’s API. So I wonder why in the documentation, the Surface_Gripper is construct with the parameter “self._dc”. Or do I understand the dc completely wrong?

Error Messages

2025-04-22 09:24:45 [12,899ms] [Error] [omni.kit.app._impl] [py stderr]: Traceback (most recent call last):
2025-04-22 09:24:45 [12,899ms] [Error] [omni.kit.app._impl] [py stderr]: File “c:\isaacsim\control_cone_gripper.py”, line 44, in
2025-04-22 09:24:45 [12,900ms] [Error] [omni.kit.app._impl] [py stderr]: gripper = Surface_Gripper(dc)
2025-04-22 09:24:45 [12,900ms] [Error] [omni.kit.app._impl] [py stderr]: TypeError: init(): incompatible constructor arguments. The following argument types are supported:
1. isaacsim.robot.surface_gripper._surface_gripper.Surface_Gripper()

Invoked with: <omni.isaac.dynamic_control._dynamic_control.DynamicControl object at 0x000001B42C1E46B0>

I checked the source code of the surface gripper extension, and it seems like the code in the documentation wasn’t updated.

@terence0tan i am just another user and haven’t worked with gripper, but i wonder if it’s at all related to the deprecation of dynamic control extension altogether since 4.5.0:

[omni.isaac.dynamic_control] Isaac Sim Dynamic Control — Isaac Sim

perhaps the devs/mods can elaborate on this and/or provide a solution.

Thanks for the notice. And yes, you are right. The source code of the previous software version can prove that.

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