Getting network Images in Driveworks

Hi Developers

I am sending images in jpg format (currently webcam as a starting point, later simulation frames) main.cpp (11.8 KB) tcpServer.py (788 Bytes) through socket via a server in python script. I want to receive the images in driveworks using the camera sensor with protocol “data.socket”. Referring to the files in “Connecting camera.nvidia-ip - #6 by shayNV”, I do not know how to handle the received data and properly assign the image values to the image pointer in main.cpp. (Lines 151-208).

I would appreciate any assistance with respect to properly receiving and displaying the image in my code, also because I am not an experienced programmer, I am currently stuck with my project.

Dear @aa.padmashali,
I notice most of the code is already filled in the template code and remaining is expected to be filled as per the use case. I recommend looking at API calls to understand the code flow and usage. Please let us know if you face issues with your code after incorporating your changes.

Thanks for your reply @SivaRamaKrishnaNV. I was able to get the image to render on screen but the colours are mismatched

. The left view is the NVIDIA Sample and the right view is from the simulator.

Also is there any similar sample code for receiving raw xyz points of pointcloud (lidar) over socket from the simulator? Please point me at the right direction :)
Thank you

Dear @aa.padmashali ,
Does that mean, you want AGX to read a simulated point cloud data to via ethernet?

Dear @SivaRamaKrishnaNV ,
I want to have a testing platform using the CARLA simulator where I get sensor data such as camera and lidar as bytearrays over sockets. I have the camera working smoothly. But I am not able to use the same principle for the lidar. Could you share any sample template code (for lidar) which I can make use of as a starting point?

@SivaRamaKrishnaNV I need some guidance on using data sensor for lidar point cloud as there are no samples I could find.

Dear @aa.padmashali,
If you are looking to recieve lidar over ethernet, Sample_lidar_replay receives the points cloud from lidar over ethernet.

But I am not able to use the same principle for the lidar

Did you try an example command like this → ./sample_lidar_replay --params=device=OUSTER_OS2_128,ip=192.168.1.205,dip=239.168.1.200,port=7505,hres=2048,scan-frequency=10 --protocol=lidar.socket ?
If so, you need to simulate the points cloud thats similar to device that we support and use the correct device ID in the command.
For Ouster and Hesai we send the tcp commands back to lidar to verify the properties, You will have to send response from simulator to those tcp commands as specified in the datasheet of the lidar. You may reach out the lidar company for guidance on this.