Sharing data among processes

Hi,

My question concerns on the recommended and most efficient way to share data between processes.

Given the popularity of ROS in robotics and autonomous driving community, I have seen in various posts that a generic publish/subscribe mechanism (as in ROS) is not supported officially by Nvidia (yet). Please correct me if I am wrong in that. For less demanding and critical applications, such a publish/subscribe mechanism may provide a suitable solution for a real time response in the vehicle.

However, for more demanding applications, (such as sharing image frames from 8 cameras to feed them in 4 or more applications or sharing LiDAR point cloud data to other applications) a generic publish/subscribe mechanism will inevitably introduce a computation cost.

I have looked into the solution of shared memory among application, (i.e. using functions such as shmat etc). However in the provided samples, a client/server socket IPC code is provided as a baseline, and to be honest I find the documentation on communicating among processes a bit abstract concerning to the other tutorials and modules. Reading throughout the various parts of IPC documentation, I think that such an IPC process is suggested only between two applications and not for more, i.e. a server is sending data to multiple clients. Please correct me if I misunderstood. Furthermore, in the IPC sample here: DriveWorks SDK Reference: Inter-process Communication (IPC) Sample
it is advised that the server should start first.

I would therefore like to ask you:

  1. Given that the applications (perception applications, sensor fusion applications etc) will act both as servers for some cases and as clients for other, wouldn’t that cause issues when all applications are simultaneously initialized?

  2. What is the recommended way for sharing “light” data, i.e. up to 10000 floats, among applications? I.e. these data could be lists of detected 3D objects for perception applications etc

  3. What is the recommended way for sharing “heavy” data, i.e. around to 1000000+ floats, among applications? I.e. these data could be images, point clouds etc.

  4. Is shared memory tested internally by Nvidia, and if so what are the recommended libraries to work with?

Thanks in Advance

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
other

Host Machine Version
native Ubuntu 18.04
other

Dear @gzamanak,
Have you checked if DW imagestreamer helps for your use case?

Dear @SivaRamaKrishnaNV ,

Do you suggest using the DW imagestreamer as a generic sharing service among processes for various data types such as images, point clouds and in general for all custom user-defined message types such as lists of 3D objects etc?

Dear @gzamanak,
To share Images across different APIs(in different process), you can use DW imageStreamer. For others, You need to rely on IPC mechanism like DW IPC APIs.

Dear @SivaRamaKrishnaNV ,

Thank you for your reply. I believe this answers questions 2 and 3 of my original post.

Could you please elaborate more on the rest of the questions 1 and 4?