Overview
tactile_binary is one of the outputs of tactile calibration: a contact-or-not verdict per taxel. This example lays it out as a 24x31 terminal grid. The grid shows the contact location in real time.
It’s an observation tool, not another calibration workflow. Use it to verify calibration results, tune sensitivity, and track down a region that doesn’t respond.
Matching examples: examples/python/wuji_glove/8.tactile_contact_view.py and examples/c/wuji_glove/6_tactile_contact_view.c.
For tactile field definitions, see Tactile. This page covers only how to run it and what the measurements show.
Prerequisites
Hardware
Software
- Python
- C
Before You Start
Run tactile calibration first. On an uncalibrated glove,tactile_binary is exactly zero and the grid stays empty forever. See Tactile Calibration.
To tell whether a glove is calibrated, check whether the stream is all zeros:
The Grid Is the Array’s Physical Layout
This is the key to reading the whole view: 24 x 31 = 744, exactly the channel count of the rawtactile stream. The grid isn’t resampled. It’s those 744 channels laid out as the sensor arranges them physically.
The mapping is row-major:
tactile, tactile_binary, and tactile_residual all carry 744 values, with invalid channels in identical positions (218 of them). All three views therefore show the same outline.
Invalid Channels Trace the Hand’s Outline
Invalid channels per row:Legend
-1.0 is the sentinel for an invalid channel, so the space test reads v < -0.5 rather than v == -1.0, avoiding a floating-point equality check.
Status Line
One line above the grid:Sensitivity Has Two Clamps, and Only One Is Real
This is the detail worth knowing on this page.
Calling the SDK API directly:
glove.set("algorithms.tactile_binary.sensitivity", 5.0) writes and reads back successfully. The example’s [0.5, 3.0] is a recommended range, not a boundary the SDK enforces.
That’s why passing --sensitivity 20.0 shows 3.0 on the status line. The example clamps before it writes:
This Parameter Writes to the Device
SENSITIVITY_PARAM = "algorithms.tactile_binary.sensitivity" goes out through glove.set() and changes the tactile_binary stream itself, not the local display. Every other subscriber sees the change at the same moment.
Reading it before it’s ever been set raises rather than returning a default:
set_sensitivity in a try so a failed write doesn’t take the view down. An observation tool crashing mid-run is worse than a reading being off.
Render Throttling
The stream runs at 130 Hz and rendering is throttled to 10 Hz:Runtime Handling
In an interactive terminal,
+ and - adjust sensitivity and q quits.
Integration Steps
- Python
- C
Running It
- Python
- C
contacts=0 and peak=0.000 are what an uncalibrated glove looks like — the outline comes from the distribution of invalid channels and has nothing to do with calibration, so seeing a hand shape doesn’t mean the stream carries data.
Once calibrated and worn, contact regions turn into #, contacts grows with the contact area, peak rises, and row / col point at the hardest-pressed spot.
Adapting It
Use It to Verify Calibration Quality
After calibrating, press each region in turn and watch whether the matching part of the grid lights up. A region that never lights no matter how you press wasn’t covered during calibration, so redo that motion. This localizes the problem far better than a singledead_pct number.
Tune Sensitivity to Find a Working Point
Adjust live with+ and -. While holding a press, lower it gradually until false positives just stop, and that’s the working point for this glove. Record it in your application config.
For Your Own Threshold, Read the Residual
The threshold behindtactile_binary is computed by the SDK from sensitivity. For full control, use tactile_residual, which gives a continuous value and leaves the threshold to you. See Tactile Residual Grid View.
Map Grid Coordinates Back to the Point Cloud
Therow / col on the status line converts back to a channel index with row * 31 + col, which then maps to a spatial coordinate in tactile_point_cloud to locate the contact in 3D. The point cloud holds only the 526 valid points, so skip invalid channels when converting.
Related
- Tactile Calibration: the hard requirement for this page
- Tactile Residual Grid View: the same grid showing a continuous signal
- Subscribing With Callbacks: where 744, 526, and 218 come from
- Common Data Types: the
TactileBinarystructure