TeslasuitDocumentation
Frameworks

Vestibular training (balance biofeedback concept)

Balance rehabilitation concept using haptic biofeedback. Motion capture tracks postural sway in real time; when the trunk leaves a configurable stability boundary, the suit cues the side of the lean.

This is a concept, not a clinically validated protocol. RapidKit is not a medical device. Use this example only in research or supervised demonstration contexts.


What it shows#

This example applies the framework to sensory substitution. The Teslasuit's motion capture detects postural sway; when the wearer's trunk angle exceeds a configurable stability boundary, haptic cues on the suit surface indicate the direction of the lean, standing in for an impaired vestibular signal.

The intended research context is people with vestibular disorders (for example after stroke, traumatic brain injury, labyrinthitis or age related degeneration) who have difficulty judging upright posture.

Capabilities demonstrated:

  • Same plugin interface as every other example. The strategy is a ControlStrategyBase subclass, but it routes output to the haptic actuators instead of EMS channels. The framework's output layer is not limited to electrical stimulation.
  • HapticLibrary subclass: VestibularHaptics declares four named CustomPlayable slots: belly, back, left_shoulder, right_shoulder. The zone layout is the same as in Haptic navigation and Haptic proximity radar.
  • Custom ControlMessage: VestibularControlMessage carries the stability boundary, master intensity and the calibrated neutral offset, and returns live sway telemetry to the GUI.
  • Haptic only output: no EMS is produced; self.ems_output is pre-muted in the strategy's __init__.

Project layout#

examples/vestibular_training/
├── main.py                            ── orchestrator.launch()
├── vestibular_training_strategy.py    ── VestibularTrainingStrategy(ControlStrategyBase)
├── vestibular_training_types.py       ── VestibularControlMessage + VestibularHaptics
└── gui/
    ├── main.py                        ── GUI process entry point
    └── balance_tab.py                 ── sway view, boundary sliders, calibration, zone table

How the strategy works#

Each cycle:

  1. Read trunk tilt from motion capture and convert it to a sagittal (forward / backward) and a frontal (left / right) angle.
  2. Subtract the calibrated neutral stance.
  3. Normalise the sway against the stability ellipse, so r = 1 at the boundary.
  4. Inside the boundary (r ≤ 1), mute all zones.
  5. Outside the boundary, fire the zone on the side of the lean. The direction picks the zone with a cosine² weight (neighbouring zones blend on the diagonals), and the excess beyond the boundary sets the intensity, up to a maximum at twice the boundary.
ZoneSway direction
bellyforward lean
backbackward lean
right_shoulderright lean
left_shoulderleft lean

Defaults in VestibularControlMessage: sagittal boundary 8.0°, frontal boundary 6.0°, master intensity 60%.


Running it#

python -m examples.vestibular_training.main

Workflow:

  1. Ask the wearer to stand quietly for about 3 seconds, then press CALIBRATE (or C) to record the neutral stance.
  2. Adjust the stability boundary sliders to match the wearer's natural sway envelope.
  3. Set the master intensity (, / . lower or raise it in steps of 5%).

Press Ctrl-C in the launching shell to stop. The framework mutes all output on exit.


Safety notes#

  • Supervise the wearer at all times during standing tasks. Haptic cues can be startling; make sure the wearer cannot fall.
  • Start with a low master intensity and raise it only if the wearer reports the cue as too subtle.
  • Re-calibrate the neutral stance whenever the wearer or the suit fit changes.

See Safety for the framework's safety guarantees.


See also#