How to read contact sensor readings

Hey,
I’m currently working with the contact sensor in Isaac Sim for my bachelor thesis.

I found the “Output Types” section in the API, but I’m still confused.
https://docs.omniverse.nvidia.com/py/isaacsim/source/extensions/omni.isaac.isaac_sensor/docs/index.html

I got two problems:

1) get_sensor_readings

The Order in the API is diffrent to the Output order in Isaac sim. I figured out which value is which output.
But what does “Value - sensor force reading value” actually mean?
I understood it, as the force meassured in direction of the x-axis. Is that correct?

2) get_contact_sensor_raw_data
Here I lost it completly.
This method produces an array with 4 elements and each element has 7 elements.
I see the diffrent outputs in the API but I can’t figure out how to interpret the values.

Here an example of my output:

[(1769.55, 0.01666667, 445415896, 445175368, (-1.2844094, -4.44703 , 3.1296086), (-0.00183242, -0.00090104, 0.9999976), (-0.        , -0.        ,   0.      ))
 (1769.55, 0.        , 445415896, 445175368, (-1.2411792, -4.545627, 3.1295629), (-0.00183242, -0.00090104, 0.9999976), (-0.11149172, -0.05482317,  60.843887))
 (1769.55, 0.        , 445415896, 445175368, (-1.1598302, -4.39112 , 3.1295764), (-0.00183242, -0.00090104, 0.9999976), (-0.21032718, -0.10342294, 114.78092 ))
 (1769.55, 0.        , 445415896, 445175368, (-1.1265872, -4.514685, 3.1295273), (-0.00183242, -0.00090104, 0.9999976), (-0.17403138, -0.08557542,  94.97337 ))]

Thanks for your help

Hello!

1) get_sensor_readings
For the force value, it’s a scalar, just like a real force/pressure sensor would provide. to get the direction, it’d most likely be the normal of the contact surface.

2) get_contact_sensor_raw_data
For the raw data, it’s the CsRawData structure. Each row in the output is one contact point.
You can read each row by doing something like (and this also applies to CsSensorReading):

single_reading = all_contacts[0]
print(single_reading["impulse"])
print(single_reading["normal"])
print(single_reading["body0"])

and so on.

1 Like