How to pass parameters to custom lidar plugin, when it is used to replay an NVidia .bin file?

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
[V] 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
[V] Linux
QNX
other

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

SDK Manager Version
1.7.1.8928
[V] other

Host Machine Version
[V] native Ubuntu 18.04
other

I created a custom lidar plugin. I pass some command line parameters to it. For example:

./sample_lidar_replay --protocol=lidar.custom --params=ip=127.0.0.1,port=8888,num_of_trxs=6,fps=16,decoder-path=./libnv_opsys_lidar_plugin_x86.so

Then when I want to record to a NVidia .bin file, I run

sudo -s
cd /usr/local/driveworks/tools/capture
./recorder ~/OpsysLidar/opsys_lidar_rig.json

The rig file contains, among other info, the following parameters:

"parameter": "ip=127.0.0.1,port=8888,num_of_trxs=6,fps=16,decoder-path=./libnv_opsys_lidar_plugin_x86.so",
                "properties": null,
                "protocol": "lidar.custom"

Then I want to replay the recorded .bin file:

./sample_lidar_replay --protocol=lidar.virtual --params=file=./opsys_lidar_front.bin,decoder-path=./libnv_opsys_lidar_plugin_x86.so --show-intensity=false

However I see that when I replay the recorded .bin file, my .so plugin doesn’t know the command line parameters that the recorded .bin file was made with ( The parameters that were written in the opsys_lidar_rig.json file.

The parameters are only passed to the .so plugin in the “dwSAL_createSensor” function, and this function is not called when the sensor is virtual ( played from a Nvidia .bin file )

dwStatus dwSAL_createSensor(dwSensorHandle_t* const sensor, dwSensorParams const params, dwSALHandle_t const sal);

My .so plugin needs to know the value of the command line parameter that is called “num_of_trxs”.

My question is:

  1. Are the command line parameters that are written in opsys_lidar_rig.json file that I used when a ran the “./recorder”, are also saved somehow in the recorded .bin file? If they are indeed saved within it, how can my .so plugin access them?
  2. Should I try maybe to solve this issue by creating some .ini/.xml/.json file which will contain our lidar configuration params, so my .so lidar plugin will know which parameters to use when “./sample_lidar_replay” requests from my plugin to replay a .bin file?
  3. Should I maybe use “./sample_lidar_replay” application, to pass parameters to my .so plugin, while it is in virtual mode ( replaying from a .bin file ) ?

Dear @Sunny127,
Have you tried adding additional parameter --params=num_of_trxs=xx,... to sample_lidar_replay ?

Yes, I tried adding the parameters:

./sample_lidar_replay --protocol=lidar.virtual --params=num_of_trxs=6,fps=16,file=./opsys_lidar_front.bin,decoder-path=./libnv_opsys_lidar_plugin_x86.so --show-intensity=false

When I replay the recorded .bin file, my .so plugin doesn’t know the command line parameters because the parameters are only passed to the .so plugin in the “dwSAL_createSensor” function, and this function is not called when the sensor is virtual ( played from a Nvidia .bin file )

Any ideas?

Any ideas?

Hi @Sunny127
Can you see your parameters in your implementation of
dwSensorPlugin_createHandle()?

1 Like

Dear @Sunny127,
Is the issue resolved? Can you provide any update on the suggestion?

Thanks @VickNV , This indeed solved the issue.

1 Like

Thanks for your confirmation.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.