Is it the right technique to get forces at positions?


#1

I want to get the force for each contact.

This is how I plan to do it. Does it seem the right way to go?

A. In FRAME_CONTENT_CONTACTS_MASK:

  1. Get the number of contacts.
  2. Get IDs and positions for those contacts.
  3. Convert positions to indexes in force_array.
    B. In FRAME_CONTENT_PRESSURE_MASK:
  4. Get forces at matching indexes.

Thank you in advance.


#2

Hello,

Each contact comes with a value called total_force, which is the force of the contact in grams.

You can learn more about what information you can get from a contact from this API primer: guide.sensel.com/api/.

You can see all the possible elements in the contact struct here: (guide.sensel.com/sensel_h/#SenselContact). But if you need some of the more complex data (deltas, bounding box) look into senselSetContactsMask (guide.sensel.com/sensel_h/#senselSetContactsMask) which is detailed in the primer.

Hope this helps.


#3

Hello Alex,

I misunderstood the way the force tracking functions because of the SenselForces example and its use of force_array.
Thanks!