Thread-safety of concurrent retrieve_image/retrieve_measure calls on a single sl.Camera

We’re retrieving multiple streams (left RGB, right RGB, depth, pointcloud) after each grab() call. Currently these are serial. Is it safe to call retrieve_image and retrieve_measure concurrently from separate threads on the same Camera instance (each writing to its own
sl.Mat), or does the SDK require these to be serialized?

Hi @broncosin
Welcome to the StereoLabs community.

We recommend calling retrieve* in the same thread as the related grab call.

If you want to process data in different threads, you can use the ROS 2 Wrapper code as a reference: