Items with no label
3335 Discussions

How to access same device from multiple processes

KPfei1
Beginner
1,412 Views

Hi,

how can I access the same camera from multiple processes?

More precisely, I want to access it once through Python with pyrealsense and once in Unity.

Right now, it fails when both processes each try to create their own context and access the device.

I am using librealsense on Ubuntu 16.04.

On Windows there seems to exist the Depth Camera Manager (DCM), which would allow it. How can I achieve the same on Ubuntu through librealsense?

Thank you!

0 Kudos
3 Replies
MartyG
Honored Contributor III
449 Views

I couldn't find a way to do it without the DCM either. But an idea did occur to me. There are programs that enable Python scripting to run within Unity (.eg IronPython). So if your Python code could be launched within Unity instead of outside of it, it might make it easier to interface with the camera, since multiple camera scripts in Unity can communicate with the camera's library files at the same time.

0 Kudos
idata
Employee
449 Views

Hi Kilpen,

 

 

We appreciate your interest in the Intel® RealSense Technology.

 

 

MartyG thanks for your suggestion. We would like to investigate a little bit more regarding this question, and as soon as we find useful information we'll let you know.

 

 

Regards,

 

-Yermi A.

 

idata
Employee
449 Views

Hi Kilpen,

 

 

Thanks for your patience. Librealsense does not directly support multi-modal access to the RealSense camera. Only a single process at a time can directly access the camera, and the user software would be required to handle any marshalling of data across multiple processes. We provide several examples of how this can be done:
  1. The web based sample source code at http://github.com/IntelRealSense/realsense_samples http://github.com/IntelRealSense/realsense_samples shows how to marshall video from a single server using librealsense, to multiple web apps running in multiple local or remote processes.
  2. The ROS based sample source code at http://github.com/intel-ros/realsense http://github.com/intel-ros/realsense provides a sample server 'node' using librealsense, which can provide those video streams to multiple process nodes on the same or other machines.

Because there is such a rich ecosystem for 3rd party video stream marshalling, we did not want to provide yet another Intel version, but instead provide the lower level library required for the user to enable the marshalling middleware of their choice.

 

Regards,

 

-Yermi A.
0 Kudos
Reply