pupil_recording_interface.RealSenseDeviceT265
- class pupil_recording_interface.RealSenseDeviceT265(device_uid, resolution=None, fps=None, video=False, odometry=False, accel=False, gyro=False, queue_size=1)
Bases:
pupil_recording_interface.device.BaseDevice
RealSense T265 device.
- __init__(device_uid, resolution=None, fps=None, video=False, odometry=False, accel=False, gyro=False, queue_size=1)
Constructor.
- Parameters
device_uid (str) – The unique identity of this device. Depending on the device this will be a serial number or similar.
resolution (tuple, len 2, optional) – Desired horizontal and vertical camera resolution.
fps (int, optional) – Desired camera refresh rate.
video (str, optional) – If specified, which fisheye camera to stream. Can be ‘left’, ‘right’, or ‘both’.
odometry (bool, default False) – If True, activate the odometry stream.
accel (bool, default False) – If True, activate the accelerometer stream.
gyro (bool, default False) – If True, activate the gyroscope stream.
queue_size (int, default 1) – Size of the video and odometry queues. If not None, frames will be dropped if the other ends of the queues cannot keep up with the device frame rates.
Methods
Config
(*args, **kwargs)Configuration for this class.
__init__
(device_uid[, resolution, fps, …])Constructor.
from_config
(config, **kwargs)Create a device from a StreamConfig.
from_config_list
(config_list, **kwargs)Create a device from a list of configs.
get_frame_and_timestamp
([mode])Get a frame and its associated timestamps.
get_motion_and_timestamp
(motion_type)Get motion data for queue.
get_serial_numbers
([suffix])Return serial numbers of connected devices.
Run hook(s) after the recording thread finishes.
Run hook(s) before dispatching the recording thread.
start
()Start this device.
stop
()Stop this device.
Attributes
context
device_type
Whether this device has been started.
- classmethod Config(*args, **kwargs)
Configuration for this class.
- classmethod from_config(config, **kwargs)
Create a device from a StreamConfig.
- classmethod from_config_list(config_list, **kwargs)
Create a device from a list of configs.
- get_frame_and_timestamp(mode='img')
Get a frame and its associated timestamps.
- get_motion_and_timestamp(motion_type)
Get motion data for queue.
- classmethod get_serial_numbers(suffix='T265')
Return serial numbers of connected devices.
based on https://github.com/IntelRealSense/librealsense/issues/2332
- property is_started
Whether this device has been started.
- run_post_thread_hooks()
Run hook(s) after the recording thread finishes.
- run_pre_thread_hooks()
Run hook(s) before dispatching the recording thread.
- start()
Start this device.
- stop()
Stop this device.