Perception Tool Kit (PTK) API Guide

Introduction

Collaboration diagram for PTK RADAR Group Tracker:

Data Structures

struct  PTK_Alg_RadarGTrackAdvParams
 GTRACK Advanced Parameters. More...
 
struct  PTK_Alg_RadarGTrackParams
 GTRACK Configuration. More...
 
struct  PTK_Alg_RadarGTrackTargetInfo
 Data structure which holds tracks and ego-location for frame. More...
 
struct  GTRACK_measurement_vector
 GTRACK Measurement vector. More...
 
struct  GTRACK_cartesian_position
 GTRACK position. More...
 
struct  GTRACK_state_vector_pos_vel
 GTRACK State vector, 2DV configuration. More...
 
struct  GTRACK_state_vector_pos_vel_acc
 GTRACK State vector, 2DA configuration. More...
 
struct  GTRACK_boundaryBox
 GTRACK Box Structure. More...
 
struct  GTRACK_gateLimits
 GTRACK Gate Limits. More...
 
struct  GTRACK_varParams
 GTRACK Update Function Parameters. More...
 
struct  GTRACK_sceneryParams
 GTRACK Scene Parameters/. More...
 
struct  GTRACK_gatingParams
 GTRACK Gating Function Parameters. More...
 
struct  GTRACK_stateParams
 GTRACK Tracking Management Function Parameters. More...
 
struct  GTRACK_allocationParams
 GTRACK Allocation Function Parameters. More...
 
struct  GTRACK_unrollingParams
 GTRACK Unrolling Parameters. More...
 
struct  GTRACK_measurementPoint
 GTRACK Measurement point. More...
 
struct  GTRACK_targetDesc
 GTRACK target descriptor. More...
 

Functions

PTK_AlgHandle PTK_Alg_RadarGTrackInit (const PTK_Alg_RadarGTrackParams *cfgParams)
 Initializes the library based on the given algorithm configuration parameters and allocated memory blocks. More...
 
int PTK_Alg_RadarGTrackProcess (PTK_AlgHandle algHandle, const PTK_Alg_RadarSensorConfig *sensorCfg, const PTK_Alg_RadarDetOutput *doaData, const PTK_InsPoseAndRef *posAndRef, PTK_Alg_RadarGTrackTargetInfo *targetInfo)
 Processes the given point cloud and performs Group Tracking. More...
 
void PTK_Alg_RadarGTrackDeInit (PTK_AlgHandle algHandle)
 De-initializes the algorithm context. More...
 
void * gtrack_alloc (uint32_t numElements, uint32_t sizeInBytes)
 GTRACK calls this function to allocate memory. Expects the void pointer if allocation is sucessful, and NULL otherwise. More...
 
void gtrack_free (void *pFree, uint32_t sizeInBytes)
 GTRACK calls this function to free memory. More...
 
void gtrack_log (GTRACK_VERBOSE_TYPE level, const char *format,...)
 GTRACK calls this function to log the events. More...
 

Enumerations

enum  GTRACK_VERBOSE_TYPE {
  GTRACK_VERBOSE_NONE = 0, GTRACK_VERBOSE_ERROR, GTRACK_VERBOSE_WARNING, GTRACK_VERBOSE_DEBUG,
  GTRACK_VERBOSE_MATRIX, GTRACK_VERBOSE_MAXIMUM
}
 GTRACK Verbose Level. More...
 

Macros

#define GTRACK_MAX_SAVE_FILE_NAME_LENGTH   (200U)
 Size of name of output file. More...
 
#define GTRACK_STATE_VECTOR_SIZE   sizeof(GTRACK_state_vector_pos_vel_acc)/sizeof(float)
 Size of state vector. More...
 
#define GTRACK_MEASUREMENT_VECTOR_SIZE   sizeof(GTRACK_measurement_vector)/sizeof(float)
 Size of measurements vector. More...
 

Maximum supported configurations.

#define GTRACK_NUM_POINTS_MAX   (1000U)
 Defines maximum possible number of measurments point the algorithm will accept at configuration time. More...
 
#define GTRACK_NUM_TRACKS_MAX   (250U)
 Defines maximum possible number of tracking target the algorithm will accept at configuration time. More...
 

Target ID definitions.

Target IDs are uint8_t, with valid IDs ranging from 0 to 249. Values 250 to 252 are reserved for future use, other values as defined below.

#define GTRACK_ID_POINT_TOO_WEAK   (253U)
 Point is not associated, is too weak. More...
 
#define GTRACK_ID_POINT_BEHIND_THE_WALL   (254U)
 Point is not associated, is behind the wall. More...
 
#define GTRACK_ID_POINT_NOT_ASSOCIATED   (255U)
 Point is not associated, noise. More...
 

Benchmarking results.

During runtime execution, tracking step function can optionally return cycle counts for the sub-functions defined below. Each count is 32bit unsigned integer value representing a timestamp of free runing clock.

#define GTRACK_BENCHMARK_SETUP   (0U)
 Cycle count at step setup. More...
 
#define GTRACK_BENCHMARK_PREDICT   (1U)
 Cycle count after predict function. More...
 
#define GTRACK_BENCHMARK_ASSOCIATE   (2U)
 Cycle count after associate function. More...
 
#define GTRACK_BENCHMARK_ALLOCATE   (3U)
 Cycle count after allocate function. More...
 
#define GTRACK_BENCHMARK_UPDATE   (4U)
 Cycle count after update function. More...
 
#define GTRACK_BENCHMARK_REPORT   (5U)
 Cycle count after report function. More...
 
#define GTRACK_BENCHMARK_SIZE   (GTRACK_BENCHMARK_REPORT)
 Size of benchmarking array. More...
 

Boundary boxes.

Application can configure tracker with scene boundries. Boundaries are defined as a boxes.

#define GTRACK_MAX_BOUNDARY_BOXES   (2U)
 Maximum number of boundary boxes. Points outside of boundary boxes are ignored. More...
 
#define GTRACK_MAX_STATIC_BOXES   (2U)
 Maximum number of static boxes. Targets inside the static box can persist longer. More...
 

Macro Definition Documentation

◆ GTRACK_NUM_POINTS_MAX

#define GTRACK_NUM_POINTS_MAX   (1000U)

Defines maximum possible number of measurments point the algorithm will accept at configuration time.

◆ GTRACK_NUM_TRACKS_MAX

#define GTRACK_NUM_TRACKS_MAX   (250U)

Defines maximum possible number of tracking target the algorithm will accept at configuration time.

◆ GTRACK_ID_POINT_TOO_WEAK

#define GTRACK_ID_POINT_TOO_WEAK   (253U)

Point is not associated, is too weak.

◆ GTRACK_ID_POINT_BEHIND_THE_WALL

#define GTRACK_ID_POINT_BEHIND_THE_WALL   (254U)

Point is not associated, is behind the wall.

◆ GTRACK_ID_POINT_NOT_ASSOCIATED

#define GTRACK_ID_POINT_NOT_ASSOCIATED   (255U)

Point is not associated, noise.

◆ GTRACK_BENCHMARK_SETUP

#define GTRACK_BENCHMARK_SETUP   (0U)

Cycle count at step setup.

◆ GTRACK_BENCHMARK_PREDICT

#define GTRACK_BENCHMARK_PREDICT   (1U)

Cycle count after predict function.

◆ GTRACK_BENCHMARK_ASSOCIATE

#define GTRACK_BENCHMARK_ASSOCIATE   (2U)

Cycle count after associate function.

◆ GTRACK_BENCHMARK_ALLOCATE

#define GTRACK_BENCHMARK_ALLOCATE   (3U)

Cycle count after allocate function.

◆ GTRACK_BENCHMARK_UPDATE

#define GTRACK_BENCHMARK_UPDATE   (4U)

Cycle count after update function.

◆ GTRACK_BENCHMARK_REPORT

#define GTRACK_BENCHMARK_REPORT   (5U)

Cycle count after report function.

◆ GTRACK_BENCHMARK_SIZE

#define GTRACK_BENCHMARK_SIZE   (GTRACK_BENCHMARK_REPORT)

Size of benchmarking array.

◆ GTRACK_MAX_SAVE_FILE_NAME_LENGTH

#define GTRACK_MAX_SAVE_FILE_NAME_LENGTH   (200U)

Size of name of output file.

◆ GTRACK_MAX_BOUNDARY_BOXES

#define GTRACK_MAX_BOUNDARY_BOXES   (2U)

Maximum number of boundary boxes. Points outside of boundary boxes are ignored.

◆ GTRACK_MAX_STATIC_BOXES

#define GTRACK_MAX_STATIC_BOXES   (2U)

Maximum number of static boxes. Targets inside the static box can persist longer.

◆ GTRACK_STATE_VECTOR_SIZE

#define GTRACK_STATE_VECTOR_SIZE   sizeof(GTRACK_state_vector_pos_vel_acc)/sizeof(float)

Size of state vector.

◆ GTRACK_MEASUREMENT_VECTOR_SIZE

#define GTRACK_MEASUREMENT_VECTOR_SIZE   sizeof(GTRACK_measurement_vector)/sizeof(float)

Size of measurements vector.

Enumeration Type Documentation

◆ GTRACK_VERBOSE_TYPE

GTRACK Verbose Level.

Defines Algorithm verboseness level.

Enumerator
GTRACK_VERBOSE_NONE 

NONE.

GTRACK_VERBOSE_ERROR 

ERROR Level, only errors are reported.

GTRACK_VERBOSE_WARNING 

WARNING Level, errors and warnings are reported.

GTRACK_VERBOSE_DEBUG 

DEBUG Level, errors, warnings, and state transitions are reported.

GTRACK_VERBOSE_MATRIX 

MATRIX Level, previous level plus all intermediate computation results are reported.

GTRACK_VERBOSE_MAXIMUM 

MAXIMUM Level, maximum amount of details are reported.

Function Documentation

◆ PTK_Alg_RadarGTrackInit()

PTK_AlgHandle PTK_Alg_RadarGTrackInit ( const PTK_Alg_RadarGTrackParams cfgParams)

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).
Returns
  • valid handle, if successful.
  • NULL, otherwise.

◆ PTK_Alg_RadarGTrackProcess()

int PTK_Alg_RadarGTrackProcess ( PTK_AlgHandle  algHandle,
const PTK_Alg_RadarSensorConfig sensorCfg,
const PTK_Alg_RadarDetOutput doaData,
const PTK_InsPoseAndRef posAndRef,
PTK_Alg_RadarGTrackTargetInfo targetInfo 
)

Processes the given point cloud and performs Group Tracking.

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.
[out]targetInfoData structure which holds tracks and ego-location for frame.
Returns
  • PTK_ALG_RET_SUCCESS, if successful.
  • < error code, otherwise.

◆ PTK_Alg_RadarGTrackDeInit()

void PTK_Alg_RadarGTrackDeInit ( PTK_AlgHandle  algHandle)

De-initializes the algorithm context.

Parameters
[in,out]algHandleAlgorithm handle.

◆ gtrack_alloc()

void* gtrack_alloc ( uint32_t  numElements,
uint32_t  sizeInBytes 
)

GTRACK calls this function to allocate memory. Expects the void pointer if allocation is sucessful, and NULL otherwise.

Parameters
[in]numElementsNumber of elements to allocate.
[in]sizeInBytesSize of each element in bytes to allocate.

◆ gtrack_free()

void gtrack_free ( void *  pFree,
uint32_t  sizeInBytes 
)

GTRACK calls this function to free memory.

Parameters
[in]pFreePointer to a memmory to free.
[in]sizeInBytesSize of memory in bytes to free.

◆ gtrack_log()

void gtrack_log ( GTRACK_VERBOSE_TYPE  level,
const char *  format,
  ... 
)

GTRACK calls this function to log the events.

Parameters
[in]levelLevel is the event importance.
[in]formatFormat is the variable size formated output.