Add Contact Sensor on Franka Gripper Tip

Is there any way to add contact sensor on finger tip of panda robot?
I have tried to modify the position property, but exact position of finger tips seems hard to get

I have managed to add contact sensor to cover entire “/World/Franka/panda_rightfinger/geometry/ID27” part, but the sensor reading keeps 0 even I close the finger

This is the code I use to attach sensor

self.cs = _contact_sensor.acquire_contact_sensor_interface()
props = _contact_sensor.SensorProperties()
props.radius = -1  # Cover the entire body 
props.minThreshold = 0
props.maxThreshold = 1000000000000
body_path = "/World/Franka/panda_rightfinger/geometry/ID27"
self.sensor_handle = self.cs.add_sensor_on_body(body_path, props)

Try switching to body_path = "/World/Franka/panda_rightfinger". Bear in mind you may also need to apply a position offset / rotation to the gripper , as that is the point the gripper will search for the object being attached, and the direction is always in the X axis. to make your life easier, you can drag an xform inside the gripper and move it around to make sure the gripper position is correct and the x axis is aligned with the direction you want to attach. See Surface Gripper — Omniverse Robotics documentation for reference.

Thanks for reply, Let me try and report you how it goes

What do you mean by everything is in X axis?
Franka gripper coordinate is like this.
Screenshot from 2022-01-28 17-46-59

I have also tried to drag a mesh inside gripper, and the correct position offset (tip of the finger) seems to be (0.0, 0.0, 5 cm). However, It does not give any contact information even I attach the contact sensor

Hi, if I add contact sensor to body_path = "/World/Franka/panda_rightfinger" the simulator gives error and shut down.

The error disappeared whan I set body_path = "/World/Franka/panda_rightfinger/" it needs one “/” at the end

How to set orientation offset for contact sensor? I can set position offset, but sensor properties provide no orientation offset.

Sorry, that was a confusion on my end… In my head for some reason I read contact sensor (That does not have a proper orientation to be inserted), but at the same time I thought it was the surface gripper (which does need proper orientation)

I even mistakenly added the surface gripper documentation. My apologies for the confusion.

I will look into the Contact Sensor to check for the extra “/”. it should not need that, and quite to the contrary it should give an error if one is present, and not the opposite.

Here’s a link to the right documentation.

1 Like

@736978497 Hi, dou you get contact sensor readings of gripper tip successfully?

Nope, I couldn’t.
I tried to cover contacted objects with a contact sensor instead.