Configuration Reference
Configuration options, parameter ranges, and default values for RapidKit.
System Configuration#
Processing Rates#
- Backend Loop: 100 Hz (10 ms per iteration)
- GUI Update: 30 Hz (33 ms per iteration)
- LSL Streaming: 100 Hz (all streams)
- Shared Memory: 100 Hz (write rate)
Buffer Sizes#
- Shared Memory Buffer: 1000 frames (~10 seconds at 100 Hz)
Muscle Parameter Ranges#
Amplitude#
- Range: 0-100%
- Default: 0%
- Typical Range: 20-80%
- Units: Percentage
- Purpose: Stimulation intensity
Frequency#
- Range: 0-100 Hz
- Default: 0 Hz
- Typical Range: 30-50 Hz
- Units: Hertz (Hz)
- Purpose: Stimulation pulse frequency
Pulse Width#
- Range: 10-140 microseconds
- Default: 0 μs
- Typical Range: 10-140 μs
- Units: Microseconds (μs)
- Purpose: Individual pulse duration
Timing Parameters#
All timing parameters are normalized (0.0-1.0) relative to phase duration. They are
keys of the per-muscle dict returned by _default_stim_params() in
teslasuit_rapidkit/data/types.py. The framework does not interpret them; your
ControlStrategyBase.process() implementation decides how to use them.
Stance Phase Timing#
- Range: 0.0-1.0 (0-100% of stance phase)
- Default: 0.0
- Units: Normalized time
- Purpose: When to activate during stance
Swing Phase Timing#
- Range: 0.0-1.0 (0-100% of swing phase)
- Default: 0.0
- Units: Normalized time
- Purpose: When to activate during swing
Step Detection Configuration#
Teslasuit API Step Detector#
- Method: Built-in SDK algorithm
- Configuration: No user-configurable parameters
- Output: Binary foot contact (
left_foot_contact,right_foot_contactinStepDetectorData) - Latency: Low (~0.5 ms)
Control Strategy Configuration#
The RapidKit package provides no built-in control logic. Phase detection,
stimulation timing and any rest or standing detection are defined in your
ControlStrategyBase subclass.
LSL Streaming Configuration#
Stream Configuration#
All streams configured with:
- Sample Rate: 100 Hz (nominal)
- Synchronization: LSL global clock
- Source ID: Configurable via the
source_idargument toLSLStreamer(defaultTeslaSuit_LSL) - Enabled by default: No — must pass
lsl_enabled=True
Stream List#
| Stream name | Channels | Content |
|---|---|---|
TS_Biomechanics | 29 | Joint angles |
TS_StepDetector | 2 | Left/right foot contact |
TS_EMSParameters | 80 | EMS params (20 muscles × 4 fields) |
AppData_ControlMessage | variable | Strategy runtime parameters |
AppData_UtilityMessage | variable | System state flags |
TS_BonePosition | 140 | Bone positions/rotations |
TS_RawData | variable | Raw IMU sensor readings |
Session Configuration#
Session Folder#
- Location:
data/Session_YYYY-MM-DD_HH-MM-SS/ - Creation: Automatic on application startup
- Naming: Timestamp-based
- Contents: Calibration data (if calibration performed)
Calibration#
- Trigger: Manual (button click)
- Data Saved:
mocap_calibration_data_[timestamp].csv - Location: Current session folder
- Format: CSV with sensor calibration parameters
Hardware Configuration#
TeslaSuit Connection#
- Interface: WiFi via TeslaSuit Control Center
- Control Center: Must be installed and running
- Connection: Automatic on startup via Control Center
- Network: TeslaSuit and computer must be on same WiFi network
- Power: External power bank required
- Reconnection: Automatic retry on failure
- Timeout: Configurable (default: 20 attempts)
Suit Calibration#
- Skeleton Calibration: Automatic on backend startup
- Motion Capture Calibration: Manual via GUI button
- Frequency: As needed (first use, after repositioning)
Performance Configuration#
Backend Loop#
- Target Rate: 100 Hz (10 ms per iteration)
- Timing: Blocking loop (no sleep)
- Priority: Real-time processing
GUI Update#
- Update Rate: 30 Hz (33 ms intervals)
- Method: QTimer-based
- Optimization: Only active tab updates continuously
Memory Configuration#
- Shared Buffer: 1000 frames capacity
- Frame Size: ~1 KB per frame
- Total Buffer: ~1 MB
- Overwrite: Circular buffer (oldest overwritten)
Customization Options#
Changing Update Rates#
Backend Rate (not recommended — loop is hardware-paced):
- The loop rate is governed by
DataStreamer.collect_data(), which blocks until the SDK delivers a new frame (~10 ms). Do not addtime.sleep()or other delays.
GUI Rate:
- Pass a larger
hardware_init_timeouttoorchestrator.launch()(default 30 s) if hardware initialisation needs more time before the GUI starts. - Adjust the
QTimerinterval in your GUI's update method (default 33 ms = 30 Hz).
Buffer Sizes#
Shared Memory Buffer:
- Pass
size=NtoSharedRingBuffer(...)in youron_start()hook. - Default 1000 frames (~10 s at 100 Hz). Increase for longer plot history.
Parameter Constraints#
Validation Rules#
- Amplitude: Must be 0-100
- Frequency: Must be 0-100 Hz
- Pulse Width: Must be 10-140 μs
- Timing: Must be 0.0-1.0, start < end
- Phase Duration: Must be positive
Safety Limits#
- Maximum Amplitude: 100% (hard limit)
- Maximum Frequency: 100 Hz (hard limit)
- Maximum Pulse Width: 140 μs (hard limit)
- Minimum Phase Duration: 0.1 seconds (estimated)
Configuration Files#
Currently, configuration is:
- Hardcoded: Default values in code
- Runtime: Set via GUI
- Session: Saved in session folder (calibration only)
Future Configuration Options#
Potential configuration file support:
- Default parameter presets
- User profiles
- Session templates
- Export/import settings
See also#
- API Reference — complete class/method signatures
- Concepts overview — framework concepts reference
- Architecture — system architecture
