1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3 @page sensors_mainsection Sensors
6 @note SW Release Applicability: This module is available in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
8 NVIDIA<sup>®</sup> DriveWorks SDK provides a sensor abstraction layer that supports easy capturing of data from various sources, and it has been designed with the following goals in mind:
10 - Provide a common and simple unified interface to the sensors
11 - Provide both HW sensor abstraction as well as virtual sensors (for replay)
12 - Provide raw sensor serialization (for recording)
13 - Deal with platform and SW particularities:
14 - API/Processor Conversion/transfer: CUDA, GL, NvMedia, CPU
15 - Make use of the additional SoC engines: H264 encoder/decoders, VIC, etc.
16 - Current paradigm is non-blocking functions and blocking with timeout
17 - Defined by EGL, CUDA and NvMedia paradigms and capabilities
18 - Goal is event-driven and non-blocking data-flow model to be light-weight and efficiently:
19 - Schedule work ahead to hide latencies on triggering work for all our HW engines.
20 - Minimize your use of threads to increase runtime determinism of the system.
22 @section sensors_supportedSensors Supported Sensors
24 DriveWorks provides support for the following sensor types:
25 - Camera (GMSL and USB)
33 DriveWorks supports a diverse set of these sensors out-of-the-box. For the most up-to-date list of supported sensors, please refer to the following:
35 - @ref dwx_sensor_enum_sample.
36 - https://developer.nvidia.com/drive/ecosystem-hw-sw.
38 @subsection sensors_custom Custom Sensors
40 In the event a sensor is not natively supported in DriveWorks, integration with custom sensors is also possible.
41 For more information, please refer to @ref sensorplugins_mainsection.
43 @subsection sensors_other Other Sensors
45 DriveWorks does not constrain the integration of any sensors. Any third-party sensor can be used in the DriveWorks modules, if its output is mapped to the sensor data API representation, such as: `dwCANMessage`, `dwGPSFrame`, `dwIMUFrame`, `dwLidarDecodedPacket`, `dwImageCUDA`, `dwImageGL`, `dwImageCPU`, and `dwImageNvMedia`. Use `dwContext_getCurrentTime()` to time-stamp individual sensors.
47 @subsection sensors_sharing Sensor Sharing
49 DriveWorks API supports sharing of the same HW sensor by multiple DriveWorks abstractions. For example, the same GPS sensor can be created twice from the same hardware implementation (e.g. Xsens device or serial connection). Each DriveWorks sensor has its own internal FIFO to keep the data ready for consumption. Sensor data of the shared sensors are equal and can be matched by equal timestamps if required. The sample @ref dwx_gps_loc_sample shows, in particular, how two sensors can be created from the same HW GPS sensor.
51 @subsection sensors_serialization Sensor Serialization
53 A `::dwSensorSerializerHandle_t` can be created using any sensor and allows the serialization of the sensor output
54 to file or to a custom callback function. `dwSensorSerializer_serializeData()` and `dwSensorSerializer_serializeDataAsync()`
55 are used for all sensors, whereas `dwSensorSerializer_serializeCameraFrame()` and `dwSensorSerializer_serializeCameraFrameAsync()`
56 are used for `::dwImageHandle_t` coming from a Camera. Async recordings always require `dwSensorSerializer_start()`.
57 The way serialization is performed for cameras depends on the camera protocol and parameters (the output can be
58 a .h264/.h265 compressed video, .raw video, .lraw lossless video). When serializing a camera image, it always
59 has to be a NATIVE image.
61 @section sensors_usecases Relevant Tutorials
63 - @ref sensors_usecase1
64 - @ref sensors_usecase2
65 - @ref sensors_usecase3
66 - @ref sensors_usecase4
67 - @ref sensors_usecase5
69 @section sensors Sensors
71 - @ref camera_mainsection
72 - @ref canbus_mainsection
73 - @ref gps_mainsection
74 - @ref imu_mainsection
75 - @ref lidar_mainsection
76 - @ref radar_mainsection
77 - @ref time_mainsection
78 - @ref sensormanager_mainsection
79 - @ref sensorplugins_mainsection
81 @section sensors_APIs APIs