EteeController Class


Here you can find the list of methods from the EteeController class, which acts as a driver enabling communication between the eteeControllers and a computer through an eteeDongle.

class etee.driver_eteecontroller.EteeController

This class manages the communication between the driver and the eteeControllers, through the eteeDongle. It also handles the data loop which retrieves and stores the eteeControllers data into an internal buffer, allowing for their retrieval through its class methods.

Connections

The following methods manage the connection between the eteeDongle and the driver, and activate/deactivate the eteeControllers data streams.

EteeController.connect()

Establish serial connection to an etee dongle. This function automatically detects etee dongles connected to a COM port and connects to the first available one.

EteeController.connect_port(port=None)

Attempt to establish serial connection to an etee dongle port. If a COM port argument is provided, connection is attempted with the specified port. If the port argument is None, the driver automatically detects any COM ports with an etee dongle and connects to the first available one. Default port value is None.

Parameters:

port (str or None) – etee dongle COM port.

Returns:

Success flag - True if the connection is successful, False if otherwise

Return type:

bool

EteeController.disconnect()

Close serial connection to etee dongle.

Returns:

Success flag - True if the connection was closed successfully, False if otherwise

Return type:

bool

EteeController.run()

Initiates the data loop in a separate thread. The data loop reads serial data, parses it and stores it in an internal buffer. The data loop also listens to serial and data events and manages event callback functions.

EteeController.stop()

Stops the data loop.

EteeController.start_data()

Sends command to the etee controller to start the data stream.

EteeController.stop_data()

Sends command to the etee controller to stop the data stream.

EteeController.get_available_etee_ports()

Get all available etee dongle COM ports. Other devices are automatically filtered out through a VID and PID filtering method.

Returns:

List of COM port names with etee dongles connected.

Return type:

list[str]


Events

A callback function can be connected to the following events through the etee.driver_eteecontroller.EteeControllerEvent.connect() method in the etee.driver_eteecontroller.EteeControllerEvent class.

EteeController.left_hand_received

Event for receiving left controller data.

Type:

Event

EteeController.right_hand_received

Event for receiving right controller data.

Type:

Event

EteeController.hand_received

Event for receiving data from any controller.

Type:

Event

EteeController.left_hand_lost

Event for losing left controller connection. Occurs when data is not received for more than 0.5 seconds.

Type:

Event

EteeController.right_hand_lost

Event for losing right controller connection. Occurs when data is not received for more than 0.5 seconds.

Type:

Event

EteeController.data_lost

Event for losing data from both controllers. Occurs when data is not received for more than 0.5 seconds.

Type:

Event

EteeController.left_connected

Event for left controller connection detected by the dongle.

Type:

Event

EteeController.right_connected

Event for right controller connection detected by the dongle.

Type:

Event

EteeController.left_disconnected

Event for left controller disconnection from the dongle.

Type:

Event

EteeController.right_disconnected

Event for right controller disconnection from the dongle.

Type:

Event

EteeController.dongle_disconnected

Event for dongle disconnection.

Type:

Event


IMU Processing

There are also several methods that can be used to process IMU data at the start of or during your application.

Enable Absolute / Relative Orientation

The orientation can also be set to absolute (i.e. magnetometer data used) or relative (i.e. no magnetometer data used) through the following method:

EteeController.absolute_imu_enabled(on)

Enables or disables absolute orientation. Absolute orientation uses data from the accelerometer, gyroscope and magnetometer sensors for quaternion calculations. If disabled, the default mode will be enabled, which uses relative orientation, calculated only though the accelerometer and gyroscope data.

Parameters:

on (bool) – True to switch to absolute orientation, False for relative orientation.

Set Offsets

Gyroscope and magnetometer offsets can be easily set at any time using the following methods:

EteeController.update_gyro_offset_left()

Retrieves the gyroscope calibration parameters saved on the left etee controller, and updates the calibration offsets in the driver model.

EteeController.update_gyro_offset_right()

Retrieves the gyroscope calibration parameters saved on the right etee controller, and updates the calibration offsets in the driver model.

EteeController.update_mag_offset_left()

Retrieves the magnetometer calibration parameters saved on the left etee controller, and updates the calibration offsets in the driver model.

EteeController.update_mag_offset_right()

Retrieves the magnetometer calibration parameters saved on the right etee controller, and updates the calibration offsets in the driver model.

EteeController.update_imu_offsets()

Retrieves the gyroscope and magnetometer calibration parameters from both controllers, and updates the calibration offsets in the driver model.


Data getters

When called, data getter functions allow for the retrieval of device data from the driver’s internal buffer. You can find the full list of data getter methods from the EteeController class below.

General-Use Data Getters

The same general-use data getter can be used to retrieve a variety of eteeController values through a single method. For these methods, the keys for the data and/or device to be retrieved need to be passed as arguments.

Possible keys: see 5.2. Data Packet Structure.

EteeController.get_left(w)

Get a key value in the current internal data buffer for the left device.

Parameters:

w (str) – Key for the device data to be retrieved, as defined in the YAML file.

Returns:

Left controller’s value for the key provided.

EteeController.get_right(w)

Get a key value in the current internal data buffer for the right device.

Parameters:

w (str) – Key for the device data to be retrieved, as defined in the YAML file.

Returns:

Right controller’s value for the key provided.

EteeController.get_data(dev, w)

Get a key value in the current internal data buffer for the specified device (left or right).

Parameters:
  • dev (str) – Selected controller hand. Possible values: “left”, “right”.

  • w (str) – Key for the device data to be retrieved, as defined in the YAML file.

Returns:

Selected controller’s value for the key provided.

Raises:

ValueError – if the dev input is not “left” or “right”


Specific-Use Data Getters

Unlike the general-use getter methods, the specific-use methods retrieve specific tactile, gestures, IMU or device state values from a specified eteeController. You can find the full list of them below.

Hand/Controller Connection Status

Whether the eteeController devices are detected as connected.

EteeController.all_hands_on()

Check if both left and right controllers are connected.

Returns:

Returns true if data has been recently received from both controllers.

Return type:

bool

EteeController.any_hand_on()

Check if either left or right controller is connected.

Returns:

Returns true if data has been recently received from any of the controller.

Return type:

bool

EteeController.left_hand_on()

Check if the left controller is connected.

Returns:

Returns true if data has been recently received from the left controller.

Return type:

bool

EteeController.right_hand_on()

Check if the right controller is connected.

Returns:

Returns true if data has been recently received from the right controller.

Return type:

bool


Firmware Versions

Returns the eteeDongle or devices firmware version.

EteeController.get_dongle_version()

Retrieve the firmware version of the connected dongle.

Returns:

Returns the dongle firmware version if a dongle is connected. If no dongle is connected, the firmware version value will be None.

Return type:

str

EteeController.get_etee_versions()

Retrieve the firmware version from the connected controllers.

Returns:

Returns the firmware versions of the connected controllers. If a controller is not connected, its firmware version value will be None.

Return type:

list[str]


Finger Data

Thumb Finger Data
EteeController.get_thumb_pull(dev)

Returns the thumb finger pull value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Thumb finger pull pressure (i.e. first pressure range, corresponding to light touch) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_thumb_force(dev)

Returns the thumb finger force value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Thumb finger force pressure (i.e. second pressure range, corresponding to squeeze levels) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_thumb_touched(dev)

Returns the thumb finger touch value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected controller’s thumb finger is touched.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_thumb_clicked(dev)

Returns the thumb finger click value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected controller’s thumb finger is clicked.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

Index Finger Data
EteeController.get_index_pull(dev)

Returns the index finger pull value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Index finger pull pressure (i.e. first pressure range, corresponding to light touch) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_index_force(dev)

Returns the index finger force value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Index finger force pressure (i.e. second pressure range, corresponding to squeeze levels) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_index_touched(dev)

Returns the index finger touch value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected controller’s index finger is touched.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_index_clicked(dev)

Returns the index finger click value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected controller’s index finger is clicked.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

Middle Finger Data
EteeController.get_middle_pull(dev)

Returns the middle finger pull value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Middle finger pull pressure (i.e. first pressure range, corresponding to light touch) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_middle_force(dev)

Returns the middle finger force value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Middle finger force pressure (i.e. second pressure range, corresponding to squeeze levels) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_middle_touched(dev)

Returns the middle finger touch value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected controller’s middle finger is touched.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_middle_clicked(dev)

Returns the middle finger click value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected controller’s middle finger is clicked.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

Ring Finger Data
EteeController.get_ring_pull(dev)

Returns the ring finger pull value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Ring finger pull pressure (i.e. first pressure range, corresponding to light touch) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_ring_force(dev)

Returns the ring finger force value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Ring finger force pressure (i.e. second pressure range, corresponding to squeeze levels) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_ring_touched(dev)

Returns the ring finger touch value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected controller’s ring finger is touched.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_ring_clicked(dev)

Returns the ring finger click value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected controller’s ring finger is clicked.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

Pinky Finger Data
EteeController.get_pinky_pull(dev)

Returns the pinky finger pull value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Pinky finger pull pressure (i.e. first pressure range, corresponding to light touch) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_pinky_force(dev)

Returns the pinky finger force value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Pinky finger force pressure (i.e. second pressure range, corresponding to squeeze levels) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_pinky_touched(dev)

Returns the pinky finger touch value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected controller’s pinky finger is touched.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_pinky_clicked(dev)

Returns the pinky finger click value for the selected device/controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected controller’s pinky finger is clicked.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

Pressure from all fingers
EteeController.get_device_finger_pressures(dev)

Returns all the fingers pull and force pressure values.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Two arrays containing the pull and force pressures for the selected controller’s five finger sensors. The first element of each array will be the thumb, and the las the pinky. For example: fingers_pull[2] = index finger pull. Pull and force values range: 0-126. Base values: 0.

Return type:

list[int], list[int]

Raises:

ValueError – if the dev input is not “left” or “right”

Trackers Connection Status

EteeController.get_tracker_connections()

Checks if both eteeTrackers are connected to the controllers.

Returns:

Returns True if both trackers are connected.

Return type:

bool

EteeController.get_tracker_connection(dev)

Checks if the selected controller has an eteeTracker connected.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Returns True if the selected tracker is connected.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

Trackers Data - Proximity Sensor

EteeController.get_proximity(dev)

Returns the proximity sensor analog value for the selected controller. This sensor is only available when an eteeTracker is connected. If disconnected, the value will always be 0, even when the sensor is interacted with.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Value of the selected tracker’s proximity sensor. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_proximity_touched(dev)

Returns the proximity sensor touch value for the selected controller. This sensor is only available when an eteeTracker is connected. If disconnected, the value will always be false, even when the sensor is touched.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected tracker’s proximity sensor value is at touch level.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_proximity_clicked(dev)

Returns the proximity sensor click value for the selected controller. This sensor is only available when an eteeTracker is connected. If disconnected, the value will always be false, even when the sensor is touched.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected tracker’s proximity sensor value is at click level.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

Trackpad Data

EteeController.get_trackpad_x(dev)

Returns the trackpad x-axis position for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Trackpad X (horizontal) coordinate for the selected controller. Range: 0-255. If not touched, the value is 126.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_trackpad_y(dev)

Returns the trackpad y-axis position for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Trackpad Y (vertical) coordinate for the selected controller. Range: 0-255. If not touched, the value is 126.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_trackpad_xy(dev)

Returns the trackpad x-axis and y-axis positions for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Trackpad XY coordinates for the selected controller. Range for each axis coordinate: 0-255. If not touched, the value is 126.

Return type:

list[int]

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_trackpad_pull(dev)

Returns the trackpad pull pressure value for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Trackpad pull pressure (i.e. first pressure range, corresponding to light touch) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_trackpad_force(dev)

Returns the trackpad force pressure value for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Trackpad force pressure (i.e. second pressure range, corresponding to hard press) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_trackpad_touched(dev)

Returns the trackpad touch value for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected trackpad is touched.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_trackpad_clicked(dev)

Returns the trackpad click value for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected trackpad is clicked.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

LED - Slider Data

EteeController.get_slider_value(dev)

Returns the slider positional value for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

LED slider position, alongside its Y-axis (vertical), for the selected controller. Range: 0-126. If not touched, the slider value is 126.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_slider_touched(dev)

Returns the slider touch value for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected LED light is touched.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_slider_up_button(dev)

Returns the slider UP button value for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the upper part of selected LED is touched.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_slider_down_button(dev)

Returns the slider DOWN button value for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the lower part of selected LED is touched.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

Gestures

Grip Gesture
EteeController.get_grip_pull(dev)

Returns the grip gesture’s pull pressure value for the selected controller. If the gesture is not performed, the pull value will be 0.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Grip gesture’s pull pressure (i.e. first pressure range, corresponding to light touch) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_grip_force(dev)

Returns the grip gesture’s force pressure value for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Grip gesture’s force pressure (i.e. second pressure range, corresponding to squeeze levels) for the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_grip_touched(dev)

Returns the grip gesture’s touch value for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the grip gesture reaches touch level in the selected controller.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_grip_clicked(dev)

Returns the grip gesture’s click value for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the grip gesture reaches click level in the selected controller.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

Pinch Gesture - Trackpad Variation

Pinch Variation: The standard pinch gesture is triggered by pressing the trackpad and index finger

EteeController.get_pinch_trackpad_pull(dev)

Returns the pull pressure value for the pinch with trackpad gesture in the selected controller. If the gesture is not performed, the pull value will be 0.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Pull pressure for the pinch gesture (trackpad variation) in the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_pinch_trackpad_clicked(dev)

Returns the click value for the pinch with trackpad gesture in the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the pinch gesture (trackpad variation) reaches click level in the selected controller.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

Pinch Gesture - Thumb Finger Variation

Pinch Variation: This alternative pinch gesture is triggered by pressing the thumb finger and index finger, instead of the trackpad as shown in the standard pinch.

EteeController.get_pinch_thumbfinger_pull(dev)

Returns the pull pressure value for the pinch with thumb finger gesture in the selected controller. If the gesture is not performed, the pull value will be 0.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Pull pressure for the pinch gesture (thumb finger variation) in the selected controller. Range: 0-126. Base value: 0.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_pinch_thumbfinger_clicked(dev)

Returns the click value for the pinch with thumb finger gesture in the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the pinch gesture (thumb finger variation) reaches click level in the selected controller. Range: 0-126. Base value: 0.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

Point Gesture - Exclude Trackpad

Point Variation: In the standard point gesture, the trackpad must not be touched.

EteeController.get_point_excl_tp_clicked(dev)

This is the alternative point gesture.

Returns the click value for the exclude-trackpad point (trackpad must not be touched) gesture in the selected controller. In this variation, if the user touches the trackpad while doing the point gesture, the gesture will be cancelled.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the exclude-trackpad point gesture variation (i.e. where the trackpad is not touched) is detected in the selected controller.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

Point Gesture - Independent

Point Variation: In this alternative point gesture, the trackpad can be used alongside this point gesture.

EteeController.get_point_independent_clicked(dev)

This is the main point gesture used in VR and XBOX-controller based games.

Returns the click value for the independent point (trackpad can be touched) gesture in the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the independent point gesture variation is detected in the selected controller. In this variation, the trackpad can be used alongside the point gesture.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

IMU and Quaternions

This API provides estimations of device three-dimensional orientation in the form of quaternions and Euler angles.

EteeController.get_quaternion()

Returns the quaternion for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Rotation quaternion for the selected controller.

Return type:

list[int]

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_euler()

Returns the euler angles for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Euler angles (roll, pitch, yaw) for the selected controller.

Return type:

list[int]

Raises:

ValueError – if the dev input is not “left” or “right”

Raw data from the 9-axis IMU can also be retrieved using the following methods:

EteeController.get_accel(dev)

Returns the accelerometer values for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Acceleration vector for the selected controller.

Return type:

list[int]

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_gyro(dev)

Returns the gyroscope values for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Angular acceleration vector for the selected controller.

Return type:

list[int]

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_mag(dev)

Returns the magnetometer values for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Magnetic flux density vector for the selected controller.

Return type:

list[int]

Raises:

ValueError – if the dev input is not “left” or “right”

Battery

EteeController.get_battery_level(dev)

Returns the battery level for the selected controller.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

Battery fuel gauge level for the selected controller. Range: 0-100.

Return type:

int

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_charging_in_progress_status(dev)

Checks if the selected controller is charging.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected battery is charging.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

EteeController.get_charging_complete_status(dev)

Checks if the selected controller has finished charging (battery level is 100%).

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected battery charging has been completed.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”

System/Power Button

EteeController.get_system_button_pressed(dev)

Checks if the system button is pressed.

Parameters:

dev (str) – Selected device hand. Possible values: “left”, “right”.

Returns:

True if the selected system button is pressed.

Return type:

bool

Raises:

ValueError – if the dev input is not “left” or “right”