Multiple Astra with Python

Hello There!

I would like to use multiple AstraS sensors with Python and Openni2. I need to switch on and off laser alternatively to avoid interferences. Can I do it with the set_property() function? What is the property ID for laser status?

Thanks in advance!!

Hey Folks,
First the late answer to the question above: the ID is 3, at least in the Python SDK, which I am using.
I have the same problem using two Orbbec Astra Mini S devices. Currently, I have set them up in a distance of around 400 mm looking in the same direction.
However, if I start the depth streams of both devices, I get a somewhat expected problem: the IR dot pattern of one device disturbs the depth stream of the other device.
I have tried to switch the Laser on and off manually (with the setBoolProperty for ‘OB_PY_PROP_LASER_BOOL’ of the device) to get an alternating operation but this leads to artifacts. I guess, it is because the on and off switching of the Laser and the depth stream are not synchronized well?


If I include a quite long delay after switching the laser back on (half a second was sufficient), the artifacts were gone.
Is there an easy way for an alternating/synchronized operation of two (or even more) devices?
From the Python SDK I found some parameters or functions, which seem to be useful, because they had something like “sync” in their name, but I have no idea how or where to set them:
From “Property” there is the ‘OB_PY_STRUCT_MULTI_DEVICE_SYNC_CONFIG’ with the ID 1038.
From “ObTypes” there are:
‘OB_PY_SYNC_ONLINE_HOST_MODE’,
‘OB_PY_SYNC_ONLINE_SLAVE_MODE’,
‘OB_PY_SYNC_ONLY_IR_MODE’,
‘OB_PY_SYNC_ONLY_MCU_MODE’,
‘OB_PY_SYNC_SINGLE_MODE’,
‘OB_PY_SYNC_STOP’.
And in “Context” there is ‘enableMultiDeviceSync’. Which I could turn on but this just gives the timestamp for each device. I guess, it’s to synchronize frame numbers from multiple devices, like the enable/disableFrameSync in the Pipeline for one device.
Does anybody have an idea how to solve this problem?