Defines the Radar sensor methods.
|
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 *const radarProperties, dwSensorHandle_t const sensor) |
| Gets information about the radar sensor. More...
|
|
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. More...
|
|
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 dependent. More...
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_readScan (const dwRadarScan **const data, const dwTime_t timeoutUs, dwSensorHandle_t const sensor) |
| Reads a one scan chunk. More...
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_returnData (const dwRadarScan *const scan, dwSensorHandle_t const sensor) |
| Returns the data read to the internal pool. More...
|
|
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. More...
|
|
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. More...
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_setMountPosition (dwRadarMountPosition *const data, dwSensorHandle_t const sensor) |
| Sends the radar mount position information to the radar. More...
|
|
DW_API_PUBLIC dwStatus | dwSensorRadar_setVehicleState (dwRadarVehicleState *const data, dwSensorHandle_t const sensor) |
| Sends vehicle dynamics information to the radar. More...
|
|
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. More...
|
|
◆ dwRadarDetection
Data Fields |
float32_t |
azimuth |
Azimuth angle (radians) |
float32_t |
elevationAngle |
Angle of elevation (radians) |
bool |
elevationValidity |
Indicates validity of the elevation angle. |
float32_t |
radialVelocity |
Radial velocity (m/s) |
float32_t |
radius |
Radial distance (m) |
float32_t |
rcs |
Reflection amplitude (dB) |
float32_t |
SNR |
Signal to noise ratio (dBr) |
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. |
bool |
isSimulation |
Indicates whether the sensor is simulated. |
uint32_t |
maxReturnsPerScan[DW_RADAR_RETURN_TYPE_COUNT][DW_RADAR_RANGE_COUNT] |
Max # of returns in any given scan. |
uint32_t |
numScanTypes |
Number of supported scan types. |
uint32_t |
packetsPerScan |
of packets per scan (Note: will be deprecated soon)
|
dwRadarModel |
radarModel |
Radar model of the current radar. |
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
◆ 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 Estimated radar position/orientation as reported by the radar, refer to Radar spec for the coordinate system defintion. [optional: might not be populated if radar is not supporting estimation]
|
float32_t |
y |
Y-position (m) of sensor mounting in AUTOSAR-coordinates from CoG Estimated radar position/orientation as reported by the radar, refer to Radar spec for the coordinate system defintion. [optional: might not be populated if radar is not supporting estimation]
|
float32_t |
yaw |
Yaw angle of sensor (radians) |
float32_t |
z |
Z-position (m) of sensor mounting in AUTOSAR-coordinates from CoG Estimated radar position/orientation as reported by the radar, refer to Radar spec for the coordinate system defintion. [optional: might not be populated if radar is not supporting estimation]
|
◆ 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) |
◆ DW_RADARSCAN_MINIMUM_PAYLOAD_SIZE
#define DW_RADARSCAN_MINIMUM_PAYLOAD_SIZE 1744 |
The minimum payload size is larger than sizeof(dwRadarScan) to allow custom types to use a larger payload.
Definition at line 56 of file Radar.h.
◆ 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 93 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 59 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 77 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(). |
- Return values
-
DW_INVALID_HANDLE | sensor handle is invalid. |
DW_INVALID_ARGUMENT | input argurment invalid. |
DW_SUCCESS | successful deal. |
◆ 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()'. |
- Return values
-
DW_INVALID_HANDLE | sensor handle is invalid. |
DW_INVALID_ARGUMENT | input argurment invalid. |
DW_NOT_AVAILABLE | work stopped. |
DW_SUCCESS | successful deal. |
DW_TIME_OUT | time out. |
- 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] | timeoutUs | 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(). |
- Return values
-
DW_INVALID_HANDLE | sensor handle is invalid. |
DW_INVALID_ARGUMENT | input argurment invalid. |
DW_NOT_AVAILABLE | work stopped. |
DW_SUCCESS | successful deal. |
DW_TIME_OUT | time out. |
◆ 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] | timeoutUs | 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(). |
- Return values
-
DW_INVALID_HANDLE | sensor handle is invalid. |
DW_INVALID_ARGUMENT | input argurment invalid. |
DW_NOT_AVAILABLE | work stopped. |
DW_SUCCESS | successful deal. |
DW_TIME_OUT | time out. |
◆ 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(). |
- Return values
-
DW_INVALID_HANDLE | sensor handle is invalid. |
DW_INVALID_ARGUMENT | input argurment invalid. |
DW_NOT_AVAILABLE | work stopped. |
DW_SUCCESS | successful deal. |
DW_TIME_OUT | time out. |
◆ 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(). |
- Return values
-
DW_INVALID_HANDLE | sensor handle is invalid. |
DW_INVALID_ARGUMENT | input argurment invalid. |
DW_NOT_AVAILABLE | work stopped. |
DW_SUCCESS | successful deal. |
DW_TIME_OUT | time out. |
◆ 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() |
- Return values
-
DW_INVALID_HANDLE | sensor handle is invalid. |
DW_CALL_NOT_ALLOWED | operation is not allowed now. |
DW_SUCCESS | successful deal. |
◆ 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(). |
- Return values
-
DW_INVALID_HANDLE | sensor handle is invalid. |
DW_INVALID_ARGUMENT | input argurment invalid. |
DW_SUCCESS | successful deal. |
◆ 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(). |
- Return values
-
DW_INVALID_HANDLE | sensor handle is invalid. |
DW_INVALID_ARGUMENT | input argurment invalid. |
DW_SUCCESS | successful deal. |
◆ 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(). |
- Return values
-
DW_INVALID_HANDLE | sensor handle is invalid. |
DW_INVALID_ARGUMENT | input argurment invalid. |
DW_CALL_NOT_ALLOWED | operation is not allowed now. |
DW_SUCCESS | successful deal. |