Perception Tool Kit (PTK) API Guide

Introduction

Collaboration diagram for PTK Radar Occupancy Grid Map:

Data Structures

struct  PTK_Alg_RadarOgmapParams
 Radar Ogmap algorithm configuration parameters. More...
 

Functions

int32_t PTK_Alg_RadarOgmapGetMapConfig (const PTK_Alg_RadarOgmapParams *cfgParams, PTK_MapConfig config[PTK_ALG_RADAR_OGMAP_NUM_OUT_MAPS])
 Initializes the map configuration based on the given algorithm configuration parameters. More...
 
int32_t PTK_Alg_RadarOgmapConfig (const PTK_Alg_RadarOgmapParams *cfgParams, PTK_Api_MemoryReq *memReq)
 Computes the memory requirements based on the given algorithm configuration parameters. More...
 
PTK_AlgHandle PTK_Alg_RadarOgmapInit (const PTK_Alg_RadarOgmapParams *cfgParams, const PTK_Api_MemoryRsp *memRsp)
 Initializes the library based on the given algorithm configuration parameters and allocated memory blocks. More...
 
int32_t PTK_Alg_RadarOgmapProcess (PTK_AlgHandle algHandle, const PTK_Alg_RadarSensorConfig *sensorCfg, const PTK_Alg_RadarDetOutput *doaData, const PTK_InsPoseAndRef *posAndRef, PTK_Map *outAccMap, PTK_Map *outInstMap)
 Processes the given point cloud and performs the Occupancy grid mapping. More...
 
int32_t PTK_Alg_RadarOgmapReset (PTK_AlgHandle algHandle)
 Resets the internal data buffers. This is needed if the application needs control to clear the current OGMAP. More...
 
int32_t PTK_Alg_RadarOgmapParseObjData (const uint8_t *packedData, PTK_Alg_RadarDetOutput *detOutput)
 Unpacks the data coming from the sensor into a detection object structure. More...
 
void PTK_Alg_RadarOgmapGateObjData (const PTK_Alg_RadarSensorConfig *sensorCfg, const PTK_Alg_RadarDetOutput *dataIn, PTK_Alg_RadarDetOutput *dataOut)
 Applies the range gating on the input data and geneates the output. More...
 
void PTK_Alg_RadarOgmapDeInit (PTK_AlgHandle algHandle)
 De-initializes the algorithm context. More...
 

Macros

#define PTK_ALG_RADAR_OGMAP_MAPPING_METHOD_PROB_ONLY   (0U)
 Mapping method : probability OG map only. More...
 
#define PTK_ALG_RADAR_OGMAP_MAPPING_METHOD_DS_ONLY   (1U)
 Mapping method : DS OG map only. More...
 
#define PTK_ALG_RADAR_OGMAP_MAPPING_METHOD_MAX   (PTK_ALG_RADAR_OGMAP_MAPPING_METHOD_DS_ONLY+1)
 Mapping method : Max value for error checks. More...
 
#define PTK_ALG_RADAR_OGMAP_MAX_MEASUREMENTS   (400U)
 Maximum allowed radar measurements. More...
 
#define PTK_ALG_RADAR_OGMAP_MAX_GRID_SIZE   (1000000U)
 Maximum allowed radar measurements. More...
 
#define PTK_ALG_RADAR_OGMAP_SENSOR_MODEL1   (1U)
 Radar sensor model 1. More...
 
#define PTK_ALG_RADAR_OGMAP_SENSOR_MODEL3   (3U)
 Radar sensor model 2. More...
 
#define PTK_ALG_RADAR_OGMAP_OUT_MAP_ACC_OCC   (0U)
 Index of the accumulated occupancy map information to be used in the mapconfig array. More...
 
#define PTK_ALG_RADAR_OGMAP_OUT_MAP_INST_DS   (PTK_ALG_RADAR_OGMAP_OUT_MAP_ACC_OCC+1U)
 Index of the instantaneous DS map information to be used in the mapconfig array. More...
 
#define PTK_ALG_RADAR_OGMAP_NUM_OUT_MAPS   (PTK_ALG_RADAR_OGMAP_OUT_MAP_INST_DS+1U)
 Maximum allowed radar output maps. More...
 
#define PTK_ALG_RADAR_OGMAP_MEM_BUFF_MAP_ACC_OCC   (3U)
 Index of the accumulated occupancy map information to be used in the memReq/memRsp arrays. More...
 
#define PTK_ALG_RADAR_OGMAP_MEM_BUFF_MAP_INST_DS   (4U)
 Index of the instantaneous occupancy map information to be used in the memReq/memRsp arrays. More...
 
#define PTK_ALG_RADAR_OGMAP_NUM_MEM_REQ_BLKS   (5U)
 Number of entries that would be set in the 'memReq' object in the PTK_Alg_RadarOgmapConfig() API. More...
 
#define PTK_ALG_RADAR_OGMAP_NUM_MEM_RSP_BLKS   (3U)
 Number of entries that should be set in the 'memRsp' object in the PTK_Alg_RadarOgmapInit() API. More...
 

Macro Definition Documentation

◆ PTK_ALG_RADAR_OGMAP_MAPPING_METHOD_PROB_ONLY

#define PTK_ALG_RADAR_OGMAP_MAPPING_METHOD_PROB_ONLY   (0U)

Mapping method : probability OG map only.

◆ PTK_ALG_RADAR_OGMAP_MAPPING_METHOD_DS_ONLY

#define PTK_ALG_RADAR_OGMAP_MAPPING_METHOD_DS_ONLY   (1U)

Mapping method : DS OG map only.

◆ PTK_ALG_RADAR_OGMAP_MAPPING_METHOD_MAX

#define PTK_ALG_RADAR_OGMAP_MAPPING_METHOD_MAX   (PTK_ALG_RADAR_OGMAP_MAPPING_METHOD_DS_ONLY+1)

Mapping method : Max value for error checks.

◆ PTK_ALG_RADAR_OGMAP_MAX_MEASUREMENTS

#define PTK_ALG_RADAR_OGMAP_MAX_MEASUREMENTS   (400U)

Maximum allowed radar measurements.

◆ PTK_ALG_RADAR_OGMAP_MAX_GRID_SIZE

#define PTK_ALG_RADAR_OGMAP_MAX_GRID_SIZE   (1000000U)

Maximum allowed radar measurements.

◆ PTK_ALG_RADAR_OGMAP_SENSOR_MODEL1

#define PTK_ALG_RADAR_OGMAP_SENSOR_MODEL1   (1U)

Radar sensor model 1.

◆ PTK_ALG_RADAR_OGMAP_SENSOR_MODEL3

#define PTK_ALG_RADAR_OGMAP_SENSOR_MODEL3   (3U)

Radar sensor model 2.

◆ PTK_ALG_RADAR_OGMAP_OUT_MAP_ACC_OCC

#define PTK_ALG_RADAR_OGMAP_OUT_MAP_ACC_OCC   (0U)

Index of the accumulated occupancy map information to be used in the mapconfig array.

◆ PTK_ALG_RADAR_OGMAP_OUT_MAP_INST_DS

#define PTK_ALG_RADAR_OGMAP_OUT_MAP_INST_DS   (PTK_ALG_RADAR_OGMAP_OUT_MAP_ACC_OCC+1U)

Index of the instantaneous DS map information to be used in the mapconfig array.

◆ PTK_ALG_RADAR_OGMAP_NUM_OUT_MAPS

#define PTK_ALG_RADAR_OGMAP_NUM_OUT_MAPS   (PTK_ALG_RADAR_OGMAP_OUT_MAP_INST_DS+1U)

Maximum allowed radar output maps.

◆ PTK_ALG_RADAR_OGMAP_MEM_BUFF_MAP_ACC_OCC

#define PTK_ALG_RADAR_OGMAP_MEM_BUFF_MAP_ACC_OCC   (3U)

Index of the accumulated occupancy map information to be used in the memReq/memRsp arrays.

◆ PTK_ALG_RADAR_OGMAP_MEM_BUFF_MAP_INST_DS

#define PTK_ALG_RADAR_OGMAP_MEM_BUFF_MAP_INST_DS   (4U)

Index of the instantaneous occupancy map information to be used in the memReq/memRsp arrays.

◆ PTK_ALG_RADAR_OGMAP_NUM_MEM_REQ_BLKS

#define PTK_ALG_RADAR_OGMAP_NUM_MEM_REQ_BLKS   (5U)

Number of entries that would be set in the 'memReq' object in the PTK_Alg_RadarOgmapConfig() API.

◆ PTK_ALG_RADAR_OGMAP_NUM_MEM_RSP_BLKS

#define PTK_ALG_RADAR_OGMAP_NUM_MEM_RSP_BLKS   (3U)

Number of entries that should be set in the 'memRsp' object in the PTK_Alg_RadarOgmapInit() API.

Function Documentation

◆ PTK_Alg_RadarOgmapGetMapConfig()

int32_t PTK_Alg_RadarOgmapGetMapConfig ( const PTK_Alg_RadarOgmapParams cfgParams,
PTK_MapConfig  config[PTK_ALG_RADAR_OGMAP_NUM_OUT_MAPS] 
)

Initializes the map configuration based on the given algorithm configuration parameters.

Parameters
[in]cfgParamsAlgorithm configuration parameters.
[out]configMap configuration.
  • config[0] gives the accumulated map configuration
  • config[1] gives the instantaneous map configuration

◆ PTK_Alg_RadarOgmapConfig()

int32_t PTK_Alg_RadarOgmapConfig ( const PTK_Alg_RadarOgmapParams cfgParams,
PTK_Api_MemoryReq memReq 
)

Computes the memory requirements based on the given algorithm configuration parameters.

Parameters
[in]cfgParamsAlgorithm configuration parameters.
[out]memReqMemory requirements as specified below
  • entry [0]: Memory for internal context. Best allocated from the fastest memory.
  • entry [1]: Memory for internal data. Best allocated from the fastest memory.
  • entry [2]: Memory for internal data. Best allocated from the fastest memory.
  • entry [3]: Memory for the accumulated map. The output buffer is allocated by the Application so this entry is just to communicate the output buffer size. No need to pass the memory to the library in the init call PTK_Alg_RadarOgmapInit().
  • entry [4]: Memory for the intsntaneous map. The output buffer is allocated by the Application so this entry is just to communicate the output buffer size. No need to pass the memory to the library in the init call PTK_Alg_RadarOgmapInit().
Returns
  • PTK_ALG_RET_SUCCESS, if successful.
  • < error code, otherwise.

◆ PTK_Alg_RadarOgmapInit()

PTK_AlgHandle PTK_Alg_RadarOgmapInit ( const PTK_Alg_RadarOgmapParams cfgParams,
const PTK_Api_MemoryRsp memRsp 
)

Initializes the library based on the given algorithm configuration parameters and allocated memory blocks.

Parameters
[in]cfgParamsAlgorithm configuration parameters. It is ecpected that the same configuration parameters passed in the PTK_Alg_RadarOgmapConfig() API are given. No check can be made to make sure these are the same. Failure to provide the same parameter set might result in an unexpected behavior (ex:- memory requirements could be different for different parameter set).
[in]memRspMemory blocks as specified below
  • entry [0]: Memory for internal context.
  • entry [1]: Memory for internal data
  • entry [2]: Memory for internal data
Returns
  • valid handle, if successful.
  • NULL, otherwise.

◆ PTK_Alg_RadarOgmapProcess()

int32_t PTK_Alg_RadarOgmapProcess ( PTK_AlgHandle  algHandle,
const PTK_Alg_RadarSensorConfig sensorCfg,
const PTK_Alg_RadarDetOutput doaData,
const PTK_InsPoseAndRef posAndRef,
PTK_Map outAccMap,
PTK_Map outInstMap 
)

Processes the given point cloud and performs the Occupancy grid mapping.

Parameters
[in,out]algHandleAlgorithm handle.
[in]sensorCfgRadar sensor configuration.
[in]doaDataRadar object data.
[in]posAndRefCurrent and previous INS records along with the transform for ecef to world.
[in,out]outAccMapAccumulated OGMAP
[out]outInstMapInstantaneous OGMAP
Returns
  • PTK_ALG_RET_SUCCESS, if successful.
  • < error code, otherwise.

◆ PTK_Alg_RadarOgmapReset()

int32_t PTK_Alg_RadarOgmapReset ( PTK_AlgHandle  algHandle)

Resets the internal data buffers. This is needed if the application needs control to clear the current OGMAP.

Parameters
[in,out]algHandleAlgorithm handle.
Returns
  • PTK_ALG_RET_SUCCESS, if successful.
  • < error code, otherwise.

◆ PTK_Alg_RadarOgmapParseObjData()

int32_t PTK_Alg_RadarOgmapParseObjData ( const uint8_t *  packedData,
PTK_Alg_RadarDetOutput detOutput 
)

Unpacks the data coming from the sensor into a detection object structure.

Parameters
[in]packedDataPacked data buffer with detection information.
[out]detOutputUnpacked detection output.
Returns
  • PTK_ALG_RET_SUCCESS, if successful.
  • < error code, otherwise.

◆ PTK_Alg_RadarOgmapGateObjData()

void PTK_Alg_RadarOgmapGateObjData ( const PTK_Alg_RadarSensorConfig sensorCfg,
const PTK_Alg_RadarDetOutput dataIn,
PTK_Alg_RadarDetOutput dataOut 
)

Applies the range gating on the input data and geneates the output.

Parameters
[in]sensorCfgPacked data buffer with detection information.
[in]dataInInput data to be range gated.
[out]dataOutRange gated output data.

◆ PTK_Alg_RadarOgmapDeInit()

void PTK_Alg_RadarOgmapDeInit ( PTK_AlgHandle  algHandle)

De-initializes the algorithm context.

Parameters
[in,out]algHandleAlgorithm handle.