TeslasuitDocumentation
APIs

Mocap

What is Mocap?#

Motion capture (Mocap) records body movement by tracking the position and orientation of key points on the body and translating them into digital data. For the conceptual background, sensor placement, accuracy, 6-axis vs 9-axis modes, and drift, see Concept: Mocap. This page focuses on how Mocap data is exposed through the C API.

Mocap in the Teslasuit API#

The suit tracks motion with 14 inertial measurement unit (IMU) sensors distributed across the body (see Hardware - Components for the sensor placement diagram). In the C API this is accessed through ts_mocap_api.h, which provides functions for streaming raw data, retrieving skeleton data, and performing calibration.

Key features of the Teslasuit Mocap subsystem#

  1. Raw data streaming: stream raw motion data in real time for custom analysis and visualization.
  2. Skeleton data: bone positions and orientations for precise motion tracking.
  3. Biomechanical angles: joint angle data for analyzing joint movements and posture.
  4. Calibration: align the sensors to the wearer before capture.

Description of Mocap data#

The subsystem exposes three levels of data. Their conceptual meaning is covered in Concept: Mocap; below are the fields and units you work with in the API.

Raw data#

Raw data is the unprocessed per-sensor output from the IMUs, before skeleton reconstruction or angle calculation. It is used for custom filtering, sensor fusion, and diagnostics.

Raw data parameters and explanation#

  1. Gyroscope (gyro): rate of rotation (angular velocity) around the X, Y, and Z axes (in radians per second).
  2. Accelerometer (accel): linear acceleration along the X, Y, and Z axes (in meters per second squared).
  3. Magnetometer (magn): magnetic field along the X, Y, and Z axes (in microteslas).
  4. Orientation quaternions (quat6x, quat9x): estimated orientation of the sensor in 3D space, from 6-axis or 9-axis sensor fusion.
  5. Linear acceleration (linear_accel): acceleration with gravity removed, useful for motion analysis (in meters per second squared).
  6. Timestamp (timestamp): the time at which the sensor reading was captured.

Warning

The 9-axis (magnetometer-enabled) mode is still in development and should not be used as the default setting. It is available only in test mode and is not recommended for general operation. Use 6-axis mode in all standard cases. See Concept: Mocap.

Orientation is stored as a quaternion. For what that means and why it is used, see Concept: Mocap.

Skeleton data#

Skeleton data is a digital skeletal model whose interconnected bones mirror the wearer's posture in real time. Each bone carries a position and a rotation.

Skeleton data parameters and explanation#

  1. Position: the 3D coordinates (x, y, z) of a bone in space.
  2. Rotation: the orientation of a bone represented as a quaternion (w, x, y, z).

Biomechanical angles#

Biomechanical angles are the relative angles between connected bones at a joint, used to analyze joint movement and posture.

Biomechanical angle parameters and explanation#

  1. Joint angle: the angle between two connected bones at a joint, typically measured in degrees or radians. Angles are grouped by movement type (flexion/extension, abduction/adduction, internal/external rotation) and by anatomical plane (sagittal, frontal, transverse). See Concept: Mocap for the full breakdown.

Explore these resources and guides to deepen your understanding and get the most out of Teslasuit Mocap features:

Essential API references#

  • Mocap API Reference: Technical reference for interacting with the Teslasuit motion capture subsystem and managing mocap data flow.
  • Common Types: Mocap: Detailed descriptions of the data types and structures used in capturing, transforming, and interpreting Mocap data.
  • Mapping API: Learn about mapping Teslasuit mocap sensors to the human skeleton and joint structures.

Interactive & visual tools#

  • Body & Channel Map: The Mocap and Skeleton tabs on the interactive map show joint and bone positions on the body silhouette. It is a Python-first tool, but the bone and joint layout it shows is the same for the C API.

Practical guides & examples#

  • Stream motion data: A runnable program for streaming IMU and biomechanical data from the suit.

Deeper dives & broader concepts#

  • Concept: Mocap: The full conceptual background, including IMU placement, 6-axis vs 9-axis modes, accuracy, and drift.
  • Teslasuit Main Concepts: Fundamental articles explaining Teslasuit technology and how mocap works alongside haptics and EMS.