Separate threads for image and sensor data

Hello,

I am using a ZED 2i camera with some custom C++ code. Is it possible to get the image and sensor data in separate threads? I would like to access the sensors data at a higher frequency compared to the image data for a custom filter implementation.

Hi @venkat_iyer
Welcome to the Stereolabs community.

Whst you described is possible.
You can run a thead at the grab frequency and a second thread at the sensor data frequency (400Hz).
The important thing is that you can the getSensorsData (Camera Class Reference | API Reference | Stereolabs) function with TIME_REFERENCE::CURRENT

You can look atnthe code of the zed-ros-wrapper and zed-ros2-wrapper Github repositories as an example.

Hi @Myzhar,

Thank you very much for the prompt response. I will try the same over the next couple of weeks and get back in case I have any questions.

1 Like