Skip to main content

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.
The grid rendering, layout mapping, parameter behavior, and uncalibrated appearance on this page are all measured. The view under actual contact isn’t — producing contact requires someone wearing the glove and touching something.

Prerequisites

Hardware

Software

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 raw tactile 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:
Edge rows hold most of them while middle rows hold almost none. Rendered, that reads as a hand: five fingers branching at the top and a palm filling the middle. No column is entirely invalid, because 744 already reflects the hardware-masked column being removed.

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:
Bypassing the example, 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:
The example deliberately wraps 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:
Callbacks fire per frame on an SDK worker thread, and without throttling, terminal output drags that thread down. This is the standard shape for rendering inside a callback: decide quickly whether to draw, and return immediately when you shouldn’t.

Runtime Handling

In an interactive terminal, + and - adjust sensitivity and q quits.

Integration Steps

Running It

Measured output, uncalibrated and unworn:
Measured on a right-hand Wuji Glove resting on a desk, unworn and uncalibrated. The outline reads clearly: five fingers branching at the top, a palm filling the middle, and the thumb running down the left. 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 single dead_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 behind tactile_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

The row / 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.