Defines the Radar sensor methods.
- Note
- SW Release Applicability: These APIs are available in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.
|
enum | dwRadarDynamicState {
DW_RADAR_DYNAMIC_STATE_MOVING = 0,
DW_RADAR_DYNAMIC_STATE_STATIONARY = 1,
DW_RADAR_DYNAMIC_STATE_ONCOMING = 2,
DW_RADAR_DYNAMIC_STATE_CROSS_TRAFFIC = 3,
DW_RADAR_DYNAMIC_STATE_STOPPED = 4,
DW_RADAR_DYNAMIC_STATE_UNKNOWN = 5
} |
| Defines the dynamic state of the radar return. More...
|
|
enum | dwRadarRange {
DW_RADAR_RANGE_SHORT = 0,
DW_RADAR_RANGE_MEDIUM = 1,
DW_RADAR_RANGE_LONG = 2,
DW_RADAR_RANGE_UNKNOWN = 3,
DW_RADAR_RANGE_COUNT = 4
} |
| Defines the range of radar return. More...
|
|
enum | dwRadarReturnType {
DW_RADAR_RETURN_TYPE_DETECTION = 0,
DW_RADAR_RETURN_TYPE_TRACK = 1,
DW_RADAR_RETURN_TYPE_STATUS = 2,
DW_RADAR_RETURN_TYPE_COUNT = 3
} |
| Defines the type of radar return. More...
|
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_getProperties (dwRadarProperties *radarProperties, dwSensorHandle_t sensor) |
| Gets information about the Radar sensor. More...
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_processRawData (const dwRadarScan **data, const uint8_t *rawData, size_t size, dwSensorHandle_t sensor) |
| Decodes RAW data previously read onto the application side structure. More...
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_readData (const dwRadarScan **data, const dwRadarScanType type, const dwTime_t timeout_us, dwSensorHandle_t sensor) |
| Reads a single packet, which might be an entire scan or a fraction of a scan, which is sensor dependent. More...
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_readScan (const dwRadarScan **data, const dwTime_t timeout_us, dwSensorHandle_t sensor) |
| Reads a one scan chunk. More...
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_returnData (const dwRadarScan *scan, dwSensorHandle_t sensor) |
| Returns the data read to the internal pool. More...
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_returnScan (const dwRadarScan *scan, dwSensorHandle_t sensor) |
| Returns the data covering an entire scan read to the internal pool. More...
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_setDataDecoding (bool enable, dwSensorHandle_t sensor) |
| Enables/disables the decoding of the Radar packets, which incurs in additional CPU load. More...
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_setMountPosition (dwRadarMountPosition *data, dwSensorHandle_t sensor) |
| Sends the radar mount position information to the radar. More...
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_setVehicleState (dwRadarVehicleState *data, dwSensorHandle_t sensor) |
| Sends vehicle dynamics information to the radar. More...
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_toggleScanType (bool enable, dwRadarScanType scanType, dwSensorHandle_t sensor) |
| Enables/Disables a scan type for the radar sensor. More...
|
|
◆ dwRadarDetection
Data Fields |
float32_t |
Ax |
X-component (m/s^2) of the acceleration in the azimuth direction. |
float32_t |
Ay |
Y-component (m/s^2) of the aceleration in the azimuth direction. |
float32_t |
azimuth |
Azimuth angle (radians) |
float32_t |
elevationAngle |
Angle of elevation (radians) |
bool |
elevationValidity |
Indicates validity of the elevation angle. |
float32_t |
radialAcceleration |
Radial acceleration (m/s^2) |
float32_t |
radialVelocity |
Radial velocity (m/s) |
float32_t |
radius |
Radial distance (m) |
float32_t |
rcs |
Reflection amplitude (dB) |
float32_t |
Vx |
X-component (m/s) of the velocity in the azimuth direction. |
float32_t |
Vy |
Y-component (m/s) of the velocity in the azimuth direction. |
float32_t |
x |
X-position (m) |
float32_t |
y |
Y-position (m) |
◆ dwRadarMountPosition
struct dwRadarMountPosition |
Data Fields |
float32_t |
damping |
Damping of radome (db) |
bool |
isReversed |
Indicates if the sensor is reversed from its default orientation. |
dwTransformation3f |
radarPosition |
Radar position. |
uint32_t |
sensorId |
Id of the sensor (vendor-specific) |
float32_t |
wheelbase |
Size of wheel-base (m) |
◆ dwRadarProperties
Data Fields |
uint32_t |
inputPacketsPerSecond |
Number of input odometry packets per second. |
uint8_t |
isDecodingOn |
Indicates whether decoding is enabled. |
uint32_t |
maxReturnsPerScan[DW_RADAR_RETURN_TYPE_COUNT][DW_RADAR_RANGE_COUNT] |
Max # of returns in any gien scan. |
uint32_t |
numScanTypes |
Number of supported scan types. |
uint32_t |
packetsPerScan |
of packets per scan (Note: will be deprecated soon)
|
uint32_t |
scansPerSecond |
Number of scans (of a particular type) per second. In case scan rate differ between scans, this number is the maximum amongst all scan types
|
uint32_t |
supportedScanTypes[DW_RADAR_RETURN_TYPE_COUNT][DW_RADAR_RANGE_COUNT] |
Enumerates the types of scans supported by the radar. |
◆ dwRadarScan
Data Fields |
void * |
data |
Pointer to the array of returns (to be casted based on return type) |
float32_t |
dopplerAmbiguity |
Doppler ambiguity free range. |
dwTime_t |
hostTimestamp |
Host timestamp at reception of first packet belonging to this scan (us) |
uint32_t |
numReturns |
Number of radar returns in this scan. |
uint32_t |
scanIndex |
Sensor-provided scan index. |
dwRadarScanType |
scanType |
Type of scan. |
dwTime_t |
sensorTimestamp |
Sensor timestamp for this scan (us) |
◆ dwRadarScanType
◆ dwRadarStatus
Data Fields |
float32_t |
azimuthDeviation[DW_RADAR_RANGE_COUNT] |
|
float32_t |
elevationDeviation[DW_RADAR_RANGE_COUNT] |
|
float32_t |
pitch |
Pitch angle of sensor (radians) |
float32_t |
roll |
Roll angle of sensor (radians) |
bool |
sensorAligned |
Indicates if the sensor is aligned. |
bool |
sensorBlock |
Indicates if the sensor is blocked. |
bool |
sensorDisturbed |
Indicates if the sensor is disturbed due to interference. |
bool |
sensorOK |
Indicaes if the is OK. |
float32_t |
x |
X-position (m) of sensor mounting in AUTOSAR-coordinates from CoG. |
float32_t |
y |
Y-position (m) of sensor mounting in AUTOSAR-coordinates from CoG. |
float32_t |
yaw |
Yaw angle of sensor (radians) |
float32_t |
z |
Z-position (m) of sensor mounting in AUTOSAR-coordinates from CoG. |
◆ dwRadarTrack
Data Fields |
uint32_t |
age |
Age of tracked object (in scans) |
float32_t |
Ax |
X-component (m/s^2) of the acceleration. |
float32_t |
Ay |
Y-component (m/s^2) of the aceleration. |
float32_t |
azimuth |
Azimuth angle (radians) |
float32_t |
azimuthRate |
Rate of change of azimuth angle (radians/s) |
float32_t |
confidence |
Confidence of object existence (range: 0-1);. |
dwRadarDynamicState |
dynamicState |
Dynamic state of the object. |
bool |
elevationValid |
Indicates validity of z position. |
uint32_t |
id |
Radar-provided track id. |
float32_t |
radialAcceleration |
Radial acceleration (m/s^2) |
float32_t |
radialVelocity |
Radial velocity (m/s) |
float32_t |
radius |
Radial distance (m) |
float32_t |
rcs |
Compensated reflection amplitude (dB) |
float32_t |
Vx |
X-component (m/s) of the velocity. |
float32_t |
Vy |
Y-component (m/s) of the velocity. |
float32_t |
x |
X-position (m) |
float32_t |
y |
Y-position (m) |
float32_t |
z |
Z-position (m) |
◆ dwRadarVehicleState
struct dwRadarVehicleState |
Data Fields |
float32_t |
acceleration |
Longitudinal acceleration (m/s^2) |
float32_t |
lateralAcceleration |
Lateral acceleration (m/s^2) |
float32_t |
velocity |
Longitudinal velocity (m/s) |
float32_t |
yawRate |
Yaw rate (radians/s) |
◆ dwRadarDynamicState
Defines the dynamic state of the radar return.
Enumerator |
---|
DW_RADAR_DYNAMIC_STATE_MOVING | Moving.
|
DW_RADAR_DYNAMIC_STATE_STATIONARY | Stationary.
|
DW_RADAR_DYNAMIC_STATE_ONCOMING | Oncoming.
|
DW_RADAR_DYNAMIC_STATE_CROSS_TRAFFIC | Cross-traffic.
|
DW_RADAR_DYNAMIC_STATE_STOPPED | Stopped (was moving, now stationary)
|
DW_RADAR_DYNAMIC_STATE_UNKNOWN | Unknown.
|
Definition at line 91 of file Radar.h.
◆ dwRadarRange
Defines the range of radar return.
Enumerator |
---|
DW_RADAR_RANGE_SHORT | Short Range.
|
DW_RADAR_RANGE_MEDIUM | Medium Range.
|
DW_RADAR_RANGE_LONG | Long Range.
|
DW_RADAR_RANGE_UNKNOWN | Unknown Range.
|
DW_RADAR_RANGE_COUNT | Count.
|
Definition at line 58 of file Radar.h.
◆ dwRadarReturnType
Defines the type of radar return.
Enumerator |
---|
DW_RADAR_RETURN_TYPE_DETECTION | Raw detection.
|
DW_RADAR_RETURN_TYPE_TRACK | Processed tracker output.
|
DW_RADAR_RETURN_TYPE_STATUS | Sensor status information.
|
DW_RADAR_RETURN_TYPE_COUNT | Count.
|
Definition at line 76 of file Radar.h.
◆ dwSensorRadar_getProperties()
Gets information about the Radar sensor.
- Parameters
-
[out] | radarProperties | A pointer to the struct containing the properties of the Radar. |
[in] | sensor | Sensor handle created with dwSAL_createSensor(). |
- Returns
- DW_INVALID_HANDLE, DW_INVALID_ARGUMENT, DW_SUCCESS
◆ dwSensorRadar_processRawData()
Decodes RAW data previously read onto the application side structure.
This happens on the CPU thread where the function is called, incurring on additional load on that thread.
- Parameters
-
[out] | data | A pointer to a container for the decoded data. |
[in] | rawData | A pointer for the non-decoded Radar packet, as returned from 'dwSensor_readRawData()'. |
[in] | size | Specifies the size in bytes of the raw data. |
[in] | sensor | Specifies the sensor handle of the sensor previously created with 'dwSAL_createSensor()'. |
- Returns
- DW_INVALID_HANDLE, DW_INVALID_ARGUMENT, DW_NOT_AVAILABLE, DW_TIME_OUT, DW_SUCCESS
- Note
- The returned dwRadarScan is only valid till the next 'dwSensorRadar_processRawData()' call.
◆ dwSensorRadar_readData()
Reads a single packet, which might be an entire scan or a fraction of a scan, which is sensor dependent.
The pointer returned is to the internal data pool. DW guarantees that the data remains constant until returned by the application. The data must be explicitly returned by the application.
- Parameters
-
[out] | data | A pointer to a pointer to the decoded data read from the sensor. The struct contains the numbers of points read, which depends on the sensor used. |
[in] | type | Type of scan requested |
[in] | timeout_us | Specifies the timeout in microseconds. Special values: DW_TIMEOUT_INFINITE - to wait infinitly. Zero - means polling of internal queue. |
[in] | sensor | Specifies the sensor handle of the sensor previously created with dwSAL_createSensor(). |
- Returns
- DW_INVALID_HANDLE, DW_INVALID_ARGUMENT, DW_NOT_AVAILABLE, DW_TIME_OUT, DW_SUCCESS
◆ dwSensorRadar_readScan()
Reads a one scan chunk.
The pointer returned is to the internal data pool. DW guarantees that the data remains constant until returned by the application. The data must be explicitly returned by the application.
- Note
- This method returns the oldest scan contained in the internal pool.
- Parameters
-
[out] | data | A pointer to a pointer to a decoded scan from the sensor. The struct contains the numbers of points read, which depends on the sensor used. |
[in] | timeout_us | Specifies the timeout in microseconds. Special values: DW_TIMEOUT_INFINITE - to wait infinitly. Zero - means polling of internal queue. |
[in] | sensor | Specifies the sensor handle of the sensor previously created with dwSAL_createSensor(). |
- Returns
- DW_INVALID_HANDLE, DW_INVALID_ARGUMENT, DW_NOT_AVAILABLE, DW_TIME_OUT, DW_SUCCESS
◆ dwSensorRadar_returnData()
Returns the data read to the internal pool.
At this point the pointer is still be valid, but data is changed based on newer readings of the sensor.
- Parameters
-
[in] | scan | A pointer to the scan data previously read from the Radar using 'dwSensorRadar_readData()' to be returned to the pool. |
[in] | sensor | Specifies the sensor handle of the sensor previously created with dwSAL_createSensor(). |
- Returns
- DW_INVALID_HANDLE, DW_INVALID_ARGUMENT, DW_NOT_AVAILABLE, DW_TIME_OUT, DW_SUCCESS
◆ dwSensorRadar_returnScan()
Returns the data covering an entire scan read to the internal pool.
At this point the pointer is still be valid, but data is changed based on newer readings of the sensor.
- Parameters
-
[in] | scan | A pointer to an entire scan's data previously read from the Radar using 'dwSensorRadar_readScan()' to be returned to the pool. |
[in] | sensor | Specifies the sensor handle of the sensor previously created with dwSAL_createSensor(). |
- Returns
- DW_INVALID_HANDLE, DW_INVALID_ARGUMENT, DW_NOT_AVAILABLE, DW_TIME_OUT, DW_SUCCESS
◆ dwSensorRadar_setDataDecoding()
Enables/disables the decoding of the Radar packets, which incurs in additional CPU load.
Method fails if the sensor has been started and is capturing data. Stop the sensor first.
- Parameters
-
[in] | enable | Specifies TRUE when decoding, false if RAW data. |
[in] | sensor | Specifies the sensor handle of the sensor previously created with dwSAL_createSensor() |
- Returns
- DW_INVALID_HANDLE, DW_CALL_NOT_ALLOWED, DW_SUCCESS
◆ dwSensorRadar_setMountPosition()
Sends the radar mount position information to the radar.
- Parameters
-
[in] | data | A pointer to the struct containing the radar mount position information to send. |
[in] | sensor | Sensor handle created with dwSAL_createSensor(). |
- Returns
- DW_INVALID_HANDLE, DW_INVALID_ARGUMENT, DW_SUCCESS
◆ dwSensorRadar_setVehicleState()
Sends vehicle dynamics information to the radar.
- Parameters
-
[in] | data | A pointer to the struct containing the vehicle dynamics information to send |
[in] | sensor | Sensor handle created with dwSAL_createSensor(). |
- Returns
- DW_INVALID_HANDLE, DW_INVALID_ARGUMENT, DW_SUCCESS
◆ dwSensorRadar_toggleScanType()
Enables/Disables a scan type for the radar sensor.
Method fails if the sensor does not support the specified scan type OR the sensor has been started and is capturing data.
- Parameters
-
[in] | enable | Specifies if the scan should be enabled or disabled |
[in] | scanType | Specifies the scan type to enable |
[in] | sensor | Specifies the sensor handle of the sensor previously created with dwSAL_createSensor(). |
- Returns
- DW_INVALID_HANDLE, DW_INVALID_ARGUMENT, DW_CALL_NOT_ALLOWED, DW_SUCCESS