DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

Sensor Querying
Note
SW Release Applicability: This tutorial is applicable to modules in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.

NVIDIA® DriveWorks context allows querying all the supported sensors for each HW platform as well as the parameters available to configure them. Please note that the query returns supported sensors by DriveWorks and not if a particular sensor is actually physically attached to the platform. Sensors are specified using a factory pattern such as:

sensor_type.mode param1=value1,param2=value2,...

where sensor_type.mode specifies the protocol and the following specifies the various parameters:

param1=value1,param2=value2,... 

For example, the code snipped below lists all sensors supported on the NVIDIA DRIVE platform and Linux host system. It also lists the parameters for each sensor.

CHECK_DW_ERROR(dwSAL_getPlatform(&currentPlatform, hal));
// get information about available sensors on each platform
for (size_t i = 0; i < sizeof(platform) / sizeof(dwPlatformOS); i++) {
const char *name = nullptr;
CHECK_DW_ERROR(dwSAL_getPlatformInfo(&name, platform[i], hal));
std::cout << "Platform: " << name;
if (platform[tformOS currentPlatform;
dwPlatformOS platform[] = {DW_PLATFORM_OS_LINUX, DW_PLATFORM_OS_V5L};
CHECK_DW_ERROR(dwSAL_getPlatform(&currentPlatform, hal));
// get information about available sensors on each platform
for (size_t i = 0; i < sizeof(platform) / sizeof(dwPlatformOS); i++) {
const char *name = nullptr;
CHECK_DW_ERROR(dwSAL_getPlatformInfo(&name, platform[i], hal));
std::cout << "Platform: " << name;
if (platform[i] == currentPlatform)
std::cout << " - CURRENT";
std::cout << ": " << std::endl;
uint32_t numSensors = 0;
CHECK_DW_ERROR(dwSAL_getNumSensors(&numSensors, platform[i], hal));
for (uint32_t j = 0; j < numSensors; j++) {
const char *protocol = "";
const char *params = "";
CHECK_DW_ERROR(dwSAL_getSensorProtocol(&protocol, j, platform[i], hal));

In the above code:

  • CHECK_DW_ERROR is a macro that throws an exception if an error occurs and
  • DW_PLATFORM_OS_V5L is the NVIDIA DRIVE platform.

With the output being:

Platform: OS_LINUX - CURRENT:
   Sensor [0] : can.socket ? device=can0[,fifo-size=1024]
   Sensor [1] : can.virtual ? file=/path/to/file.can[,create_seek,default_timeout_us,time-offset=0]
   Sensor [2] : camera.virtual ? video/file=filepath.{h264,raw,lraw}[,timestamp=file.txt][,create_seek][,time-offset=0]
   Sensor [3] : camera.nvidia-ip ? host=<ip_addr>, port=<TCP port number>
   Sensor [4] : camera.usb ? device=0
   Sensor [5] : gps.uart ? device=/dev/ttyXXX[,baud={1200,2400,4800,9600,19200,38400,57600,115200}[,format=nmea0183][,fifo-size=1024]]
   Sensor [6] : gps.virtual ? file=filepath.bin[xsens-raw-gps=true,create_seek,default_timeout_us,time-smoothing=false,time-offset=0]
   Sensor [7] : gps.xsens ? device=0[,frequency=100,xsens-raw-gps=true,time-smoothing=false,fifo-size=1024,baudrate=115200,stop-bits=2]
   Sensor [8] : gps.novatel ? [fifo-size=1024]
   Sensor [9] : gps.dataspeed ? can-proto=can.socket,can-params=device=canX[,fifo-size=1024]
   Sensor [10] : imu.uart ? device=/dev/ttyXXX[,baud={1200,2400,4800,9600,19200,38400,57600,115200}[,format=xsens_nmea][,fifo-size=1024]]
   Sensor [11] : imu.xsens ? device=0[,frequency=100,time-smoothing=true,fifo-size=1024,baudrate=115200,stop-bits=2]
   Sensor [12] : imu.virtual ? file=filepath.bin[,create_seek,default_timeout_us,time-smoothing=true][,fifo-size=1024][,time-offset=0]
   Sensor [13] : imu.novatel ? [fifo-size=1024]
   Sensor [14] : imu.dataspeed ? can-proto=can.socket,can-params=device=canX[,fifo-size=1024]
   Sensor [15] : lidar.virtual ? file=filepath.bin[,create_seek,default_timeout_us,decoder=filepath.so,time-smoothing=false,decoding=true,time-offset=0]
   Sensor [16] : lidar.socket ? ip=X.X.X.X,port=XXXX,device={QUAN_M81A, IBEO_LUX, IBEO_LUX_8L, VELO_VLP16, VELO_VLP16HR, VELO_HDL32E, VELO_VLP32C, VELO_HDL64E, CUSTOM},scan-frequency=XX.X[,protocol=xxx,multicast-ip=X.X.X.X,decoder=filepath.so,time-smoothing=false]
   Sensor [17] : radar.virtual ? file=filepath.bin,time-smoothing=true[,decoder=filepath.so,create_seek,default_timeout_us,decoding=true,time-offset=0]
   Sensor [18] : radar.socket ? ip=X.X.X.X,port=XXXX,device={DELPHI_ESR2_5, CONTINENTAL_ARS430, CUSTOM},multicast-ip=X.X.X.X],time-smoothing=true,isInverted=false[,decoder=filepath.so,protocol=xxx]
   Sensor [19] : radar.can ? can-driver=can.xxx,can-bus=xxx,can-base-id=0x460,device={CONTINENTAL_ARS430_CAN}[,aurix-can-ip=X.X.X.X.X],[aurix-can-aport=XXXX][,aurix-can-bport=XXXX][,virtual-file=filepath.bin][,time-smoothing=false]

Platform: OS_DRIVE_V5L:
   Sensor [0] : can.socket ? device=can0[,fifo-size=1024]
   Sensor [1] : can.aurix ? ip=10.0.0.1,bus={a,b,c,d}[,aport=50000,bport=60395][,fifo-size=1024]
   Sensor [2] : can.virtual ? file=/path/to/file.can[,create_seek,default_timeout_us,time-offset=0]
   Sensor [3] : camera.gmsl ? (Parker) camera-type={ov10635, ov10640-bggr-ae-svc210, ov10640-bggr-ae-svc212, ar0231-grbg-ae-sd3321, ar0231-rccb-ae-ss3322,ar0231-rccb-bae-ss3322, ar0231-rccb-ae-ss3323, ar0231-rccb-bae-ss3323, ar0231-rccb-ae-sf3324,ar0231-rccb-bae-sf3324, ar0231-rccb-ae-sf3325, ar0231-rccb-bae-sf3325},camera-group={a,b,c},camera-count={1,2,3,4},(Xavier) camera-type={ar0231-rccb-bae-sf3324, ar0231-rccb-bae-sf3325, ar0144-cccc-none-gazet1},output-format={yuv+raw+data}[,slave={0,1}][,fifo-size={3..20}][,custom-board=0]camera-group={a,b,c,d},camera-count={1,2,3,4},[,camera-mask={0001|0010|0011|..|1111}][,warn-per-frame={0,1}]
   Sensor [4] : camera.virtual ? video/file=filepath.{h264,raw,lraw}[,timestamp=file.txt][,create_seek][,time-offset=0]
   Sensor [5] : camera.usb ? device=0
   Sensor [6] : camera.nvidia-ip ? host=[ip_addr], port=[TCP port number]
   Sensor [7] : gps.uart ? device=/dev/ttyXXX[,baud={1200,2400,4800,9600,19200,38400,57600,115200}[,format=nmea0183]][,fifo-size=1024]
   Sensor [8] : gps.virtual ? file=filepath.bin[,xsens-raw-gps=true,create_seek,default_timeout_us,time-smoothing=false,time-offset=0]
   Sensor [9] : gps.xsens ? device=0[,frequency=100,xsens-raw-gps=true,time-smoothing=false,fifo-size=1024,baudrate=115200,stop-bits=2]
   Sensor [10] : gps.novatel ? [fifo-size=1024]
   Sensor [11] : gps.dataspeed ? can-proto=can.socket,can-params=device=canX[,fifo-size=1024]
   Sensor [12] : imu.uart ? device=/dev/ttyXXX[,baud={1200,2400,4800,9600,19200,38400,57600,115200}[,format=xsens_nmea]][,fifo-size=1024]
   Sensor [13] : imu.xsens ? device=0[,frequency=100,time-smoothing=false,fifo-size=1024,baudrate=115200,stop-bits=2]
   Sensor [14] : imu.virtual ? file=filepath.bin[,create_seek,default_timeout_us,time-smoothing=false,time-offset=0]
   Sensor [15] : imu.novatel ? [fifo-size=1024]
   Sensor [16] : imu.dataspeed ? can-proto=can.socket,can-params=device=canX[,fifo-size=1024]
   Sensor [17] : lidar.virtual ? file=filepath.bin[,create_seek,default_timeout_us,time-smoothing=false,decoding=true,time-offset=0]
   Sensor [18] : lidar.socket ? ip=X.X.X.X,port=XXXX,device={QUAN_M81A, IBEO_LUX, IBEO_LUX_8L, VELO_VLP16, VELO_VLP16HR, VELO_HDL32E, VELO_VLP32C, VELO_HDL64E, CUSTOM},scan-frequency=XX.X[,protocol=xxx,multicast-ip=X.X.X.X,decoder=filepath.so,time-smoothing=false]
   Sensor [19] : radar.virtual ? file=filepath.bin,time-smoothing=true[,decoder=filepath.so,create_seek,default_timeout_us,decoding=true,time-offset=0]
   Sensor [20] : radar.socket ? ip=X.X.X.X,port=XXXX,device={DELPHI_ESR2_5, CONTINENTAL_ARS430, CUSTOM},multicast-ip=X.X.X.X,time-smoothing=true,isInverted=false[,decoder=filepath.so,protocol=xxx]
   Sensor [21] : radar.can ? can-driver=can.xxx,can-bus=xxx,can-base-id=0x460,device={CONTINENTAL_ARS430_CAN}[,aurix-can-ip=X.X.X.X.X],[aurix-can-aport=XXXX][,aurix-can-bport=XXXX][,virtual-file=filepath.bin]

Platform: OS_QNX:
   Sensor [0] : can.socket ? device=can0
   Sensor [1] : can.virtual ? file=/path/to/file.can[,create_seek][,time-offset=0]
   Sensor [2] : camera.gmsl ? camera-group={a,b,c,d},camera-count={1,2,3,4},camera-type={ar0231-rccb-bae-sf3324, ar0231-rccb-bae-sf3325},output-format={yuv+raw+data}[,slave={0,1}][,fifo-size={3..20}][,custom-board=0][,camera-mask={0001|0010|0011|..|1111}][,warn-per-frame={0,1}]
   Sensor [3] : camera.virtual ? video/file=filepath.{h264,raw}[,timestamp=file.txt][,create_seek][,time-offset=0]
   Sensor [4] : gps.uart ? device=/dev/ttyXXX[,baud={1200,2400,4800,9600,19200,38400,57600,115200}[,format=nmea0183]][,fifo-size=1024]
   Sensor [5] : gps.virtual ? file=filepath.bin[,xsens-raw-gps=true,create_seek,default_timeout_us,time-smoothing=false,time-offset=0]
   Sensor [6] : gps.xsens ? device=0[,frequency=100,xsens-raw-gps=true,time-smoothing=false,fifo-size=1024,baudrate=115200,stop-bits=2]
   Sensor [7] : gps.dataspeed ? can-proto=can.socket/aurix,can-params=device=canX[,fifo-size=1024]
   Sensor [8] : imu.uart ? device=/dev/ttyXXX[,baud={1200,2400,4800,9600,19200,38400,57600,115200}[,format=xsens_nmea]][,fifo-size=1024]
   Sensor [9] : imu.virtual ? file=filepath.bin[,create_seek,default_timeout_us,time-smoothing=false,time-offset=0]
   Sensor [10] : imu.xsens ? device=0[,frequency=100,time-smoothing=false,fifo-size=1024,baudrate=115200,stop-bits=2]
   Sensor [11] : imu.dataspeed ? can-proto=can.socket/aurix,can-params=device=canX[,fifo-size=1024]
   Sensor [12] : lidar.virtual ? file=filepath.bin[,create_seek,default_timeout_us,time-smoothing=false,time-offset=0]
   Sensor [13] : lidar.socket ? ip=X.X.X.X,port=XXXX,device={QUAN_M81A, IBEO_LUX, IBEO_LUX_8L, VELO_VLP16, VELO_VLP16HR, VELO_HDL32E, VELO_VLP32C, VELO_HDL64E, CUSTOM},scan-frequency=XX.X[,protocol=xxx,multicast-ip=X.X.X.X,decoder=filepath.so,time-smoothing=false]
   Sensor [14] : radar.virtual ? file=filepath.bin,time-smoothing=true[,decoder=filepath.so,create_seek,default_timeout_us,decoding=false,time-offset=0]
   Sensor [15] : radar.socket ? ip=X.X.X.X,port=XXXX,device={DELPHI_ESR2_5, CONTINENTAL_ARS430, CUSTOM},multicast-ip=X.X.X.X],time-smoothing=true,isInverted=false[,decoder=filepath.so,protocol=xxx]
   Sensor [16] : radar.can ? can-driver=can.xxx,can-bus=xxx,can-base-id=0x460,device={CONTINENTAL_ARS430_CAN}[,aurix-can-ip=X.X.X.X.X],[aurix-can-aport=XXXX][,aurix-can-bport=XXXX][,virtual-file=filepath.bin]

For a full implementation see Sensor Enumeration Sample .