Class BidirectionalControlStrategy
Bidirectional direct control — all DOAs centered at 50 (rest). Fingers use opposing pairs: close (per-finger) vs open (shared index [12]). Range: 0 = full close/fist, 50 = rest, 100 = overstretch/extension.
Implements
Inherited Members
Namespace: MOSAIC.Components.Manager.ControlAlgorithm
Assembly: MOSAIC.dll
Syntax
public class BidirectionalControlStrategy : ControlStrategyBase, IControlAlgorithmStrategy
Remarks
Prediction vector layout:
[0] th_flex [6] wr_flex [12] hand_open
[1] th_rot [7] wr_ext [13] elbow_flex
[2] index [8] wr_pron [14] elbow_ext
[3] middle [9] wr_sup
[4] ring [10] wr_ulnar
[5] little [11] wr_radial
Fields
FingerRest
Rest position for finger DOAs (0 = fist, 50 = relaxed, 100 = overstretch).
Declaration
private const double FingerRest = 50
Field Value
| Type | Description |
|---|---|
| double |
WristElbowRest
Rest position for wrist/elbow DOAs (0 = full one direction, 50 = neutral, 100 = full other).
Declaration
private const double WristElbowRest = 50
Field Value
| Type | Description |
|---|---|
| double |
Properties
Name
Name of this strategy (used for JSON export and UI display).
Declaration
public override string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Methods
InitializeDefaults()
Initialize DOA default values. Override this in derived classes.
Declaration
protected override void InitializeDefaults()
Overrides
MapOpposingAsymmetric(DegreesOfActuation, Vector<double>, int, int, double)
Maps two opposing predictions to a single DOA with an asymmetric rest point. Predictions are in [0..1]. The close prediction drives from rest toward 0 (fist), the open prediction drives from rest toward 100 (overstretch).
Declaration
private void MapOpposingAsymmetric(DegreesOfActuation doa, Vector<double> prediction, int closeIdx, int openIdx, double rest)
Parameters
| Type | Name | Description |
|---|---|---|
| DegreesOfActuation | doa | Target degree of actuation. |
| Vector<double> | prediction | Full prediction vector. |
| int | closeIdx | Index of the "close/fist" prediction. |
| int | openIdx | Index of the "open/overstretch" prediction. |
| double | rest | Rest point value (e.g. 50 for fingers). |
ProcessPrediction(Vector<double>)
Processes a prediction vector and updates actuation values.
Declaration
public override void ProcessPrediction(Vector<double> prediction)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector<double> | prediction |