Error when picking up DynamicCuboid with Surface Gripper

When picking up a DynamicCuboid with the surface-gripper I get the following error twice:

2023-09-23 13:11:18  [Error] [omni.physx.plugin] PhysX error: PxJoint::setLocalPose: transform is invalid, FILE /buildAgent/work/16dcef52b68a730f/source/physxextensions/src/ExtJoint.h, LINE 241

This is perhaps related to this issue:

However, the fix of adding a sink is no longer available in the create menu.

I’m using the surface-gripper with retryClose true.

Any ideas how to prevent this?

I have no idea why, but commenting out the following two lines from the surface-gripper example seemed to make everything work great:

sgp = Surface_Gripper_Properties()
sgp.d6JointPath = f"{prim_path}/gripper"
sgp.parentPath = prim_path                # The parent is a dynamic cuboid
# sgp.offset = _dynamic_control.Transform()
sgp.offset.p.x = 0
sgp.offset.p.y = 0
sgp.offset.p.z = -0.055 
# sgp.offset.r = [0.7171, 0, 0.7171, 0]          # Rotate to point gripper in Z direction
sgp.gripThreshold = 0.01                          # Set attachment to within 1cm of the base of the Cone

Note that the proper offset.p.z seems to depend on both the scaling of the prim the gripper is attached to and also the gripThreshold.

If someone can explain what’s going on here I’d love to understand it! Also, is there a way to visually see which way the gripper is facing? Perhaps it was facing the wrong way and that’s why it wasn’t working well before?

1 Like

You can try using the Omnigraph version of the Surface Gripper - That lets yo set the gripper offset through a Transform on screen.

The second commented line essentially rotates your gripper in the Y direction by 90 degrees, so probably that’s why it was not grasping before.

The gripper should always have a local direction pointing forward with its X axis, that’s why in some cases you need to apply a rotation offset to make sure it’s pointing in the right direction.

I was able to “vacuum grip” other objects on all sides of a cube without changing the rotation angle. In other words, the gripper seems to work fine on all six sides of a cube while the rotation angle is unspecified. This was in the last version of Isaac Sim, though I’d imagine it applies in the new one as well.