DriveWorks SDK Reference
5.4.5418 Release
For Test and Development only

Radar.h
Go to the documentation of this file.
1 //
3 // Notice
4 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 //
9 // NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10 // information or for any infringement of patents or other rights of third parties that may
11 // result from its use. No license is granted by implication or otherwise under any patent
12 // or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13 // expressly authorized by NVIDIA. Details are subject to change without notice.
14 // This code supersedes and replaces all information previously supplied.
15 // NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16 // components in life support devices or systems without express written approval of
17 // NVIDIA CORPORATION & AFFILIATES.
18 //
19 // SPDX-FileCopyrightText: Copyright (c) 2017-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20 // SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21 //
22 // NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23 // property and proprietary rights in and to this material, related
24 // documentation and any modifications thereto. Any use, reproduction,
25 // disclosure or distribution of this material and related documentation
26 // without an express license agreement from NVIDIA CORPORATION or
27 // its affiliates is strictly prohibited.
28 //
30 
47 #ifndef DW_SENSORS_RADAR_RADAR_H_
48 #define DW_SENSORS_RADAR_RADAR_H_
49 
50 #include <dw/core/Config.h>
51 #include <dw/core/base/Types.h>
52 
53 #include <dw/sensors/Sensors.h>
54 
56 #define DW_RADARSCAN_MINIMUM_PAYLOAD_SIZE 1744
57 
59 typedef enum {
62 
65 
68 
71 
74 } dwRadarRange;
75 
77 typedef enum {
80 
83 
86 
90 
92 typedef enum {
95 
98 
101 
104 
107 
111 
113 typedef struct dwRadarScanType
114 {
117 
121 
123 #pragma pack(push, 1)
124 
126 typedef struct dwRadarDetection
127 {
130 
133 
136 
139 
142 
145 
148 
151 
154 
157 
161 
162 typedef struct dwRadarTrack
163 {
165  uint32_t id;
166 
168  uint32_t age;
169 
172 
175 
178 
181 
184 
187 
190 
193 
196 
199 
202 
205 
208 
211 
214 
217 } dwRadarTrack;
218 
220 typedef struct dwRadarScan
221 {
223  uint32_t scanIndex;
224 
227 
230 
233 
235  uint32_t numReturns;
236 
239 
241  void* data;
242 } dwRadarScan;
243 
244 #pragma pack(pop)
245 
247 typedef struct dwRadarStatus
248 {
251 
254 
257 
260 
263 
266 
267  /*
268  * Deviation of azimuth angle for returns (radians)
269  * This is the deviation of the measured azimuth from what would be
270  * expected based on the geometric boresight of the sensor.
271  */
272  float32_t azimuthDeviation[DW_RADAR_RANGE_COUNT];
273 
274  /*
275  * Deviation of elevation angle for returns (radians)
276  * This is the deviation of the elevation azimuth from what would be
277  * expected based on the geometric boresight of the sensor.
278  */
279  float32_t elevationDeviation[DW_RADAR_RANGE_COUNT];
280 
283 
285  bool sensorOK;
286 
289 
292 } dwRadarStatus;
293 
295 typedef struct dwRadarVehicleState
296 {
299 
302 
305 
309 
311 typedef struct dwRadarMountPosition
312 {
314  uint32_t sensorId;
315 
318 
321 
324 
328 
330 typedef struct dwRadarProperties
331 {
333  uint8_t isDecodingOn;
334 
336  uint32_t numScanTypes;
337 
339  uint32_t supportedScanTypes[DW_RADAR_RETURN_TYPE_COUNT][DW_RADAR_RANGE_COUNT];
340 
342  uint32_t packetsPerScan;
343 
345  uint32_t maxReturnsPerScan[DW_RADAR_RETURN_TYPE_COUNT][DW_RADAR_RANGE_COUNT];
346 
352  uint32_t scansPerSecond;
353 
357 
358 #ifdef __cplusplus
359 extern "C" {
360 #endif
361 
374 dwStatus dwSensorRadar_toggleScanType(bool const enable, dwRadarScanType const scanType, dwSensorHandle_t const sensor);
375 
387 dwStatus dwSensorRadar_setDataDecoding(bool const enable, dwSensorHandle_t const sensor);
388 
407 dwStatus dwSensorRadar_readData(const dwRadarScan** const data, const dwRadarScanType type,
408  const dwTime_t timeoutUs, dwSensorHandle_t const sensor);
420 dwStatus dwSensorRadar_returnData(const dwRadarScan* const scan, dwSensorHandle_t const sensor);
421 
439 dwStatus dwSensorRadar_readScan(const dwRadarScan** const data,
440  const dwTime_t timeoutUs, dwSensorHandle_t const sensor);
441 
453 dwStatus dwSensorRadar_returnScan(const dwRadarScan* const scan, dwSensorHandle_t const sensor);
454 
470  const uint8_t* const rawData, size_t const size, dwSensorHandle_t const sensor);
471 
482 dwStatus dwSensorRadar_getProperties(dwRadarProperties* const radarProperties, dwSensorHandle_t const sensor);
483 
495 
507 
508 #ifdef __cplusplus
509 }
510 #endif
511 
513 #endif // DW_SENSORS_RADAR_RADAR_H_
float32_t rcs
Compensated reflection amplitude (dB)
Definition: Radar.h:213
NVIDIA DriveWorks API: Core Types
float32_t Ax
X-component (m/s^2) of the acceleration.
Definition: Radar.h:192
uint32_t numScanTypes
Number of supported scan types.
Definition: Radar.h:336
float32_t dopplerAmbiguity
Doppler ambiguity free range.
Definition: Radar.h:238
float32_t acceleration
Longitudinal acceleration (m/s^2)
Definition: Radar.h:301
float32_t radius
Radial distance (m)
Definition: Radar.h:144
dwRadarScanType scanType
Type of scan.
Definition: Radar.h:232
float32_t yaw
Yaw angle of sensor (radians)
Definition: Radar.h:259
Short Range.
Definition: Radar.h:61
float32_t radialVelocity
Radial velocity (m/s)
Definition: Radar.h:207
float32_t x
X-position (m)
Definition: Radar.h:129
Defines the structure for reporting sensor mount position.
Definition: Radar.h:311
Defines the structure for a complete radar scan.
Definition: Radar.h:220
float float32_t
Specifies POD types.
Definition: Types.h:70
uint8_t isDecodingOn
Indicates whether decoding is enabled.
Definition: Radar.h:333
dwRadarReturnType returnType
Type of radar return.
Definition: Radar.h:116
Processed tracker output.
Definition: Radar.h:82
dwRadarRange range
Scan range.
Definition: Radar.h:119
bool sensorAligned
Indicates if the sensor is aligned.
Definition: Radar.h:282
DW_API_PUBLIC dwStatus dwSensorRadar_getProperties(dwRadarProperties *const radarProperties, dwSensorHandle_t const sensor)
Gets information about the Radar sensor.
float32_t Vx
X-component (m/s) of the velocity.
Definition: Radar.h:186
DW_API_PUBLIC dwStatus dwSensorRadar_setDataDecoding(bool const enable, dwSensorHandle_t const sensor)
Enables/disables the decoding of the Radar packets, which incurs in additional CPU load...
float32_t Vx
X-component (m/s) of the velocity in the azimuth direction.
Definition: Radar.h:135
bool sensorOK
Indicaes if the is OK.
Definition: Radar.h:285
float32_t y
Y-position (m)
Definition: Radar.h:180
float32_t z
Z-position (m)
Definition: Radar.h:183
DW_API_PUBLIC dwStatus dwSensorRadar_processRawData(const dwRadarScan **const data, const uint8_t *const rawData, size_t const size, dwSensorHandle_t const sensor)
Decodes RAW data previously read onto the application side structure.
dwRadarDynamicState dynamicState
Dynamic state of the object.
Definition: Radar.h:174
float32_t roll
Roll angle of sensor (radians)
Definition: Radar.h:265
float32_t wheelbase
Size of wheel-base (m)
Definition: Radar.h:320
float32_t x
X-position (m) of sensor mounting in AUTOSAR-coordinates from CoG.
Definition: Radar.h:250
float32_t Vy
Y-component (m/s) of the velocity in the azimuth direction.
Definition: Radar.h:138
float32_t radius
Radial distance (m)
Definition: Radar.h:204
float32_t Ay
Y-component (m/s^2) of the aceleration.
Definition: Radar.h:195
Stopped (was moving, now stationary)
Definition: Radar.h:106
Long Range.
Definition: Radar.h:67
Specifies a 3D rigid transformation.
Definition: Types.h:467
uint32_t id
Radar-provided track id.
Definition: Radar.h:165
float32_t damping
Damping of radome (db)
Definition: Radar.h:323
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:85
float32_t Vy
Y-component (m/s) of the velocity.
Definition: Radar.h:189
uint32_t scanIndex
Sensor-provided scan index.
Definition: Radar.h:223
dwTime_t sensorTimestamp
Sensor timestamp for this scan (us)
Definition: Radar.h:226
dwStatus
Status definition.
Definition: Status.h:180
NVIDIA DriveWorks API: Sensors
uint32_t numReturns
Number of radar returns in this scan.
Definition: Radar.h:235
void * data
Pointer to the array of returns (to be casted based on return type)
Definition: Radar.h:241
dwRadarDynamicState
Defines the dynamic state of the radar return.
Definition: Radar.h:92
Defines the type of scan (combination of return type & range)
Definition: Radar.h:113
DW_API_PUBLIC dwStatus dwSensorRadar_setMountPosition(dwRadarMountPosition *const data, dwSensorHandle_t const sensor)
Sends the radar mount position information to the radar.
Defines the return structure for sensor status messages.
Definition: Radar.h:247
DW_API_PUBLIC dwStatus dwSensorRadar_returnScan(const dwRadarScan *const scan, dwSensorHandle_t const sensor)
Returns the data covering an entire scan read to the internal pool.
float32_t radialVelocity
Radial velocity (m/s)
Definition: Radar.h:147
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
float32_t azimuthRate
Rate of change of azimuth angle (radians/s)
Definition: Radar.h:201
bool sensorDisturbed
Indicates if the sensor is disturbed due to interference.
Definition: Radar.h:288
Defines the properties of the radar.
Definition: Radar.h:330
DW_API_PUBLIC dwStatus dwSensorRadar_readScan(const dwRadarScan **const data, const dwTime_t timeoutUs, dwSensorHandle_t const sensor)
Reads a one scan chunk.
Unknown Range.
Definition: Radar.h:70
uint32_t packetsPerScan
of packets per scan (Note: will be deprecated soon)
Definition: Radar.h:342
Medium Range.
Definition: Radar.h:64
bool sensorBlock
Indicates if the sensor is blocked.
Definition: Radar.h:291
float32_t azimuth
Azimuth angle (radians)
Definition: Radar.h:198
DW_API_PUBLIC dwStatus dwSensorRadar_returnData(const dwRadarScan *const scan, dwSensorHandle_t const sensor)
Returns the data read to the internal pool.
DW_API_PUBLIC dwStatus dwSensorRadar_setVehicleState(dwRadarVehicleState *const data, dwSensorHandle_t const sensor)
Sends vehicle dynamics information to the radar.
dwRadarReturnType
Defines the type of radar return.
Definition: Radar.h:77
float32_t azimuth
Azimuth angle (radians)
Definition: Radar.h:141
dwTransformation3f radarPosition
Radar position.
Definition: Radar.h:317
float32_t confidence
Confidence of object existence (range: 0-1);.
Definition: Radar.h:171
uint32_t inputPacketsPerSecond
Number of input odometry packets per second.
Definition: Radar.h:355
dwRadarRange
Defines the range of radar return.
Definition: Radar.h:59
uint32_t age
Age of tracked object (in scans)
Definition: Radar.h:168
float32_t y
Y-position (m)
Definition: Radar.h:132
float32_t x
X-position (m)
Definition: Radar.h:177
float32_t y
Y-position (m) of sensor mounting in AUTOSAR-coordinates from CoG.
Definition: Radar.h:253
DW_API_PUBLIC dwStatus dwSensorRadar_toggleScanType(bool const enable, dwRadarScanType const scanType, dwSensorHandle_t const sensor)
Enables/Disables a scan type for the radar sensor.
float32_t pitch
Pitch angle of sensor (radians)
Definition: Radar.h:262
Defines the structure for reporting current vehicle dynamics state.
Definition: Radar.h:295
Sensor status information.
Definition: Radar.h:85
float32_t yawRate
Yaw rate (radians/s)
Definition: Radar.h:307
float32_t rcs
Reflection amplitude (dB)
Definition: Radar.h:150
float32_t radialAcceleration
Radial acceleration (m/s^2)
Definition: Radar.h:210
The structs below are serialized in binary and the layout is assummed to be packed.
Definition: Radar.h:126
uint32_t scansPerSecond
Number of scans (of a particular type) per second.
Definition: Radar.h:352
bool isReversed
Indicates if the sensor is reversed from its default orientation.
Definition: Radar.h:326
dwTime_t hostTimestamp
Host timestamp at reception of first packet belonging to this scan (us)
Definition: Radar.h:229
float32_t z
Z-position (m) of sensor mounting in AUTOSAR-coordinates from CoG.
Definition: Radar.h:256
#define DW_API_PUBLIC
Definition: Exports.h:54
bool elevationValid
Indicates validity of z position.
Definition: Radar.h:216
uint32_t sensorId
Id of the sensor (vendor-specific)
Definition: Radar.h:314
bool elevationValidity
Indicates validity of the elevation angle.
Definition: Radar.h:156
float32_t velocity
Longitudinal velocity (m/s)
Definition: Radar.h:298
float32_t lateralAcceleration
Lateral acceleration (m/s^2)
Definition: Radar.h:304
DW_API_PUBLIC dwStatus dwSensorRadar_readData(const dwRadarScan **const data, const dwRadarScanType type, const dwTime_t timeoutUs, dwSensorHandle_t const sensor)
Reads a single packet, which might be an entire scan or a fraction of a scan, which is sensor depende...
Raw detection.
Definition: Radar.h:79
float32_t SNR
Signal to noise ratio (dBr)
Definition: Radar.h:159
float32_t elevationAngle
Angle of elevation (radians)
Definition: Radar.h:153