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:
- Get the number of contacts.
- Get IDs and positions for those contacts.
- Convert positions to indexes in force_array.
B. In FRAME_CONTENT_PRESSURE_MASK:
- Get forces at matching indexes.
Thank you in advance.
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.
I misunderstood the way the force tracking functions because of the SenselForces example and its use of force_array.