Multi-Device Setup
You can find Demo scripts here. Learn how to discover multiple OAK cameras connected to your system, and use them individually.Discovering OAK cameras
You can use DepthAI to discover all connected OAK cameras, either via USB or through the LAN (OAK POE cameras). The code snippet below finds all OAK cameras and prints theirMxIDs
(unique identifier) and their XLink state
.Python
1import depthai
2for device in depthai.Device.getAllAvailableDevices():
3 print(f"{device.getMxId()} {device.state}")
Command Line
114442C10D13EABCE00 XLinkDeviceState.X_LINK_UNBOOTED
214442C1071659ACD00 XLinkDeviceState.X_LINK_UNBOOTED
Selecting a Specific DepthAI device to be used
From the Detected devices(s) above, use the following code to select the device you would like to use with your pipeline. For example, if the first device is desirable from above use the following code:Python
1# Specify MXID, IP Address or USB path
2device_info = depthai.DeviceInfo("14442C108144F1D000") # MXID
3#device_info = depthai.DeviceInfo("192.168.1.44") # IP Address
4#device_info = depthai.DeviceInfo("3.3.3") # USB port name
5with depthai.Device(pipeline, device_info) as device:
6 # ...
Specifying POE device to be used
You can specify the POE device to be used by the IP address as well, as shown in the code snippet above.Now use as many OAK cameras as you need! And since DepthAI does all the heavy lifting, you can usually use quite a few of them with very little burden to the host.Timestamp syncing
Timestamp synchronization, alternatively referred to as message syncing, involves aligning messages from various sensors, including frames, IMU packets, ToF data, and more.DepthAI 2.24 introduces Sync node which can be used to sync messages from different streams, or messages from different sensors (eg. IMU and color frames). See Sync node for more details. The sync node does not currently support multiple device syncing, so if you want to sync messages from multiple devices, you should use the manual approach.