TeslasuitDocumentation
APIs

Mocap

Interfaces#

IImuData#

TsSDK::IImuData

Provides access to mocap imu sensor data.

Methods

GetSensorData#

TsImuSensorData GetSensorData(TsHumanBoneIndex index);

Returns imu sensor data by bone index.

Parameters

index: TsHumanBoneIndex

Bone index to get sensor data

Returns: TsImuSensorData

TsImuSensorData Imu sensor data


GetSensorData#

bool GetSensorData(TsHumanBoneIndex boneIndex, out TsImuSensorData sensorData);

Gets imu sensor data by bone index.

Parameters

boneIndex: TsHumanBoneIndex

Bone index to get sensor data

sensorData: out TsImuSensorData

Imu sensor data

Returns: bool

true if there are sensor data by given bone index, otherwise false



IMocap#

TsSDK::IMocap

Provides motion capture functionality from Suit and Glove devices.

Properties

Skeleton — ISkeleton (read-only)

Returns mocap skeleton model built from IMU sensors.

ImuData — IImuData (read-only)

Returns raw IMU sensors data.

IsRunning — bool (read-only)

Gets Mocap streaming running state.

Methods

Start#

void Start();

Starts mocap data streaming and processing.


Stop#

void Stop();

Stops mocap data streaming and processing.


Calibrate#

void Calibrate();

Calibrates skeleton model by I-Pose (Straight stance, arms are straight and lowered down).



ISkeleton#

TsSDK::ISkeleton

Provides access to mocap skeleton model data.

Methods

GetBoneTransform#

TsTransform GetBoneTransform(TsHumanBoneIndex index);

Returns skeleton bone transform containing rotation and position.

Parameters

index: TsHumanBoneIndex

Bone index to get tranfsorm

Returns: TsTransform

TsTransform Bone transform


GetBoneTransform#

bool GetBoneTransform(TsHumanBoneIndex boneIndex, out TsTransform boneTransform);

Gets skeleton bone transform containing rotation and position.

Parameters

boneIndex: TsHumanBoneIndex

Bone index to get tranfsorm

boneTransform: out TsTransform

Bone transform

Returns: bool

true if there are transform data by given bone index, otherwise false


GetBiomechanicalAngle#

bool GetBiomechanicalAngle(TsBiomechanicalIndex biomechanicalIndex, out float angle);

Gets skeleton biomechanical angle in degrees.

Parameters

biomechanicalIndex: TsBiomechanicalIndex

Biomechanical index to get angle

angle: out float

Angle value in degrees

Returns: bool

true if there are biomechanical angle by given index, otherwise false



Classes#

TsBiomechanics#

TsSDK::TsBiomechanics

Properties

AllIndexes — IEnumerable< TsBiomechanicalIndex > (read-only)

All skeleton biomechanical indexes.

Fields

m_allIndexes List< TsBiomechanicalIndex >


TsHumanBones#

TsSDK::TsHumanBones

Provides human bone indexes set represented by device.

Properties

SuitBones — IEnumerable< TsHumanBoneIndex > (read-only)

Bones representing by the Teslasuit devices.

LeftHandBones — IEnumerable< TsHumanBoneIndex > (read-only)

Bones representing by Teslaglove left-hand devices.

RightHandBones — IEnumerable< TsHumanBoneIndex > (read-only)

Bones representing by Teslaglove right-hand devices.

Fields

m_bones List< TsHumanBoneIndex >

m_rightHandPhalanxes List< TsHumanBoneIndex >

m_rightHandProximalPhalanxes List< TsHumanBoneIndex >

m_leftHandPhalanxes List< TsHumanBoneIndex >

m_leftHandProximalPhalanxes List< TsHumanBoneIndex >

Methods

GetRequiredBones#

IEnumerable< TsHumanBoneIndex > GetRequiredBones(IDevice device);

Get bones represented by specified device

Parameters

device: IDevice

Device to get representing bones

Returns: IEnumerable< TsHumanBoneIndex >


GetForceFeedbackPhalanxes#

IEnumerable< TsHumanBoneIndex > GetForceFeedbackPhalanxes(IGlove glove);

Get force feedback phalanx bones represented by specified glove

Parameters

glove: IGlove

Glove device to get representing bones

Returns: IEnumerable< TsHumanBoneIndex >



Data structures#

TsImuSensorData#

Structure of raw IMU sensor data.

Includes: 9x quaternion, 6x quaternion, accelerometer, gyroscope, magnetometer, linear accelerometer, timestamp of data capture.

Fields

quat9x TsQuat

quat6x TsQuat

accel TsVec3f

gyro TsVec3f

magn TsVec3f

linear_accel TsVec3f

timestamp UInt64


Enumerations#

TsBiomechanicalIndex#

Skeleton biomechanical index.

Members

PelvisTilt 0 PelvisList 1 PelvisRotation 2 HipFlexExtR 3 HipAddAbdR 4 HipRotR 5 KneeFlexExtR 6 AnkleFlexExtR 7 AnkleProSupR 8 HipFlexExtL 9 HipAddAbdL 10 HipRotL 11 KneeFlexExtL 12 AnkleFlexExtL 13 AnkleProSupL 14 ElbowFlexExtR 15 ForearmProSupR 16 WristFlexExtR 17 WristDeviationR 18 ElbowFlexExtL 19 ForearmProSupL 20 WristFlexExtL 21 WristDeviationL 22 ShoulderAddAbdR 36 ShoulderRotR 37 ShoulderFlexExtR 38 ShoulderAddAbdL 39 ShoulderRotL 40 ShoulderFlexExtL 41


TsHumanBoneIndex#

Human bone index.

Members

Hips 0 LeftUpperLeg 1 RightUpperLeg 2 LeftLowerLeg 3 RightLowerLeg 4 LeftFoot 5 RightFoot 6 Spine 7 Chest 8 UpperSpine 9 Neck 10 Head 11 LeftShoulder 12 RightShoulder 13 LeftUpperArm 14 RightUpperArm 15 LeftLowerArm 16 RightLowerArm 17 LeftHand 18 RightHand 19 LeftThumbProximal 20 LeftThumbIntermediate 21 LeftThumbDistal 22 LeftIndexProximal 23 LeftIndexIntermediate 24 LeftIndexDistal 25 LeftMiddleProximal 26 LeftMiddleIntermediate 27 LeftMiddleDistal 28 LeftRingProximal 29 LeftRingIntermediate 30 LeftRingDistal 31 LeftLittleProximal 32 LeftLittleIntermediate 33 LeftLittleDistal 34 RightThumbProximal 35 RightThumbIntermediate 36 RightThumbDistal 37 RightIndexProximal 38 RightIndexIntermediate 39 RightIndexDistal 40 RightMiddleProximal 41 RightMiddleIntermediate 42 RightMiddleDistal 43 RightRingProximal 44 RightRingIntermediate 45 RightRingDistal 46 RightLittleProximal 47 RightLittleIntermediate 48 RightLittleDistal 49