IMUComponent¶
IMUComponent abstracts IMU node and its configuration.
Usage¶
from depthai_sdk import OakCamera
from depthai_sdk.classes import IMUPacket
with OakCamera() as oak:
imu = oak.create_imu()
imu.config_imu(report_rate=400, batch_report_threshold=5)
def callback(packet: IMUPacket):
print(packet)
oak.callback(imu.out.main, callback=callback)
oak.start(blocking=True)
Reference¶
-
class
depthai_sdk.components.
IMUComponent
(device, pipeline)¶ -
-
config_imu
(sensors=None, report_rate=100, batch_report_threshold=1, max_batch_reports=10, enable_firmware_update=False)¶ Configure IMU node.
- Parameters
sensors (Optional[List[depthai.IMUSensor]]) – List of sensors to enable.
report_rate (int) – Report rate in Hz.
batch_report_threshold (int) – Number of reports to batch before sending them to the host.
max_batch_reports (int) – Maximum number of batched reports to send to the host.
enable_firmware_update (bool) – Enable firmware update if true, disable otherwise.
- Return type
-