-
Notifications
You must be signed in to change notification settings - Fork 339
Description
Description
We have some users who want/have to use the SurfaceGripper heavily. There is some magic going on with the joint setup which we probably do not fully understand so this bug report needs to be taken with a grain of salt.
When testing the surface gripper we always had a push back once close was called. So the object was not staying at the same position but it was always pushed like 2x the distance to the d6 joint. So close grips were fine. But sometimes we need the distance because we cannot rely on the stability of parallel grippers and just want a guaranteed lock and done.
Setup:
Our scene usually consists of a articulation for a robot and on the last link we have a tool as rigid body attached and a d6 joint with all the configuration for the surface gripper. On creation of the d6 joint the tool usually lands on body1 so we remove it and set it as body 0 and keep the local position adjustments made by Isaac Sim. Exclude it from articulation is enabled.
For debugging the max grip distance is 1m to make sure we make contact. Clearence of the d6 joint is 0 since we can simply test with an "empty" xfrom as tool body
Workaround:
I played around with the SurfaceGripperComponent.cpp and figured that on Line 681 the offset correction seems to be off. I am not really understanding the purpose, but just using relative pose of the object seems to do the trick.
So I changed
physx::PxVec3 offsetTranslation =
-physx::PxVec3(direction[0], direction[1], direction[2]) * (result.distance - clearanceOffset);
physx::PxTransform offsetTransform(offsetTranslation, physx::PxQuat(physx::PxIdentity));
physx::PxTransform adjustedWorldTransform = offsetTransform * worldTransform;
physx::PxTransform hitLocalTransform = hitWorldTransform.transformInv(adjustedWorldTransform);to
physx::PxTransform hitLocalTransform = hitWorldTransform.transformInv(worldTransform)Is the object supposed to snap to the location of the d6 joint or whats the purpose of the offset correction?
btw I put this into an issue since PRs cannot be merged anyways
Update:
I played around more and the direction for the correction seems to be inverted, so just removing the sign fixes the snapping to the joint
physx::PxVec3 offsetTranslation =
physx::PxVec3(direction[0], direction[1], direction[2]) * (result.distance - clearanceOffset);
physx::PxTransform offsetTransform(offsetTranslation, physx::PxQuat(physx::PxIdentity));
physx::PxTransform adjustedWorldTransform = offsetTransform * worldTransform;
physx::PxTransform hitLocalTransform = hitWorldTransform.transformInv(adjustedWorldTransform);
But I would love to have both options. We have some usecases where simple fix a this position is enough to get the job done
Isaac Sim version
5.1.0
Operating System (OS)
Ubunut 24.04
GPU Name
RTX 5090
GPU Driver and CUDA versions
570
Logs
No response
Additional information
No response