calibration module

There are 3 calibration methods implemented:

Note

The calibration-module functions as abstract super-class providing the following functions to the calibration methods:

This module defines the base class for calibration procedures.

class cyberglove.calibration.Calibration(s_id='', use_latest_timestamp=False)

This class is an abstract base class. Implemented calibration procedures like Simple, CorTerms or Ibanez inherit from it. It mainly handles the folder structure for storing data and provides helpful methods for interacting with the glove during calibration.

abstract __init__(s_id='', use_latest_timestamp=False)

The __init__()-method is called whenever an object inheriting from the Calibration-class is instantiated. This method is taking care of asking for subject-information as well as creating and handling folder structure.

Parameters
  • s_id (string, optional) – subject ID if already known. if not specified, it will ask for it

  • use_latest_timestamp (bool, optional) – if set to True, the last timestamp-folder of the subject will be used

Returns

None

record_to_file(glove, description='', duration=None, timestamp=False)

Starts a thread to record data from the glove and writes it to the file <description>.txt

Parameters
  • glove (cyberglove.glove.Glove) – connected glove object

  • description (str, optional) – description of the recorded motion (will be used as filename (sanitized)), otherwise will be asked by input

  • duration (float, optional) – duration in seconds (if not given, an input will be expected to end the recording)

  • timestamp (bool, optional) – defines if timestamp should be appended to each dataset

Returns

None

set_neutral_dataset(glove)

Sets the neutral dataset to the according calibration object by asking the subject to perform two poses.

Parameters

glove (cyberglove.glove.Glove) – connected glove object

Returns

None

set_neutral_dataset_from_sp_file(folderpath: str)

Sets a neutral dataset to the calibration from captured static-postures.

Parameters

folderpath (str) – folderpath where static_postures.txt can be found

Returns

None