Perception Tool Kit (PTK) API Guide
radar_gtrack_common.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2019 Texas Instruments Incorporated
4  *
5  * All rights reserved not granted herein.
6  *
7  * Limited License.
8  *
9  * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
10  * license under copyrights and patents it now or hereafter owns or controls to make,
11  * have made, use, import, offer to sell and sell ("Utilize") this software subject to the
12  * terms herein. With respect to the foregoing patent license, such license is granted
13  * solely to the extent that any such patent is necessary to Utilize the software alone.
14  * The patent license shall not apply to any combinations which include this software,
15  * other than combinations with devices manufactured by or for TI ("TI Devices").
16  * No hardware patent is licensed hereunder.
17  *
18  * Redistributions must preserve existing copyright notices and reproduce this license
19  * (including the above copyright notice and the disclaimer and (if applicable) source
20  * code license limitations below) in the documentation and/or other materials provided
21  * with the distribution
22  *
23  * Redistribution and use in binary form, without modification, are permitted provided
24  * that the following conditions are met:
25  *
26  * * No reverse engineering, decompilation, or disassembly of this software is
27  * permitted with respect to any software provided in binary form.
28  *
29  * * any redistribution and use are licensed by TI for use only with TI Devices.
30  *
31  * * Nothing shall obligate TI to provide you with source code for the software
32  * licensed and provided to you in object code.
33  *
34  * If software source code is provided to you, modification and redistribution of the
35  * source code are permitted provided that the following conditions are met:
36  *
37  * * any redistribution and use of the source code, including any resulting derivative
38  * works, are licensed by TI for use only with TI Devices.
39  *
40  * * any redistribution and use of any object code compiled from the source code
41  * and any resulting derivative works, are licensed by TI for use only with TI Devices.
42  *
43  * Neither the name of Texas Instruments Incorporated nor the names of its suppliers
44  *
45  * may be used to endorse or promote products derived from this software without
46  * specific prior written permission.
47  *
48  * DISCLAIMER.
49  *
50  * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
51  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
52  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
53  * IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
54  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
55  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
57  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
58  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
59  * OF THE POSSIBILITY OF SUCH DAMAGE.
60  *
61  */
62 #ifndef RADAR_GTRACK_COMMON_H
63 #define RADAR_GTRACK_COMMON_H
64 
65 #include <stdint.h>
66 #include <stddef.h>
67 #include <stdbool.h>
68 
70 
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 
85 #define GTRACK_NUM_POINTS_MAX (1000U)
86 
93 #define GTRACK_NUM_TRACKS_MAX (250U)
94 
108 #define GTRACK_ID_POINT_TOO_WEAK (253U)
109 
115 #define GTRACK_ID_POINT_BEHIND_THE_WALL (254U)
116 
122 #define GTRACK_ID_POINT_NOT_ASSOCIATED (255U)
123 
137 #define GTRACK_BENCHMARK_SETUP (0U)
138 
144 #define GTRACK_BENCHMARK_PREDICT (1U)
145 
150 #define GTRACK_BENCHMARK_ASSOCIATE (2U)
151 
157 #define GTRACK_BENCHMARK_ALLOCATE (3U)
158 
164 #define GTRACK_BENCHMARK_UPDATE (4U)
165 
171 #define GTRACK_BENCHMARK_REPORT (5U)
172 
178 #define GTRACK_BENCHMARK_SIZE (GTRACK_BENCHMARK_REPORT)
179 
186 #define GTRACK_MAX_SAVE_FILE_NAME_LENGTH (200U)
187 
201 #define GTRACK_MAX_BOUNDARY_BOXES (2U)
202 
209 #define GTRACK_MAX_STATIC_BOXES (2U)
210 
217 #define GTRACK_STATE_VECTOR_SIZE sizeof(GTRACK_state_vector_pos_vel_acc)/sizeof(float)
218 
224 #define GTRACK_MEASUREMENT_VECTOR_SIZE sizeof(GTRACK_measurement_vector)/sizeof(float)
225 
233 typedef enum
234 {
237 
240 
243 
246 
250 
253 
255 
256 
264 typedef struct {
268  float x1;
269 
273  float x2;
274 
278  float y1;
279 
283  float y2;
284 
288  float z1;
289 
293  float z2;
294 
296 
304 typedef struct {
308  float width;
309 
313  float depth;
314 
318  float height;
319 
323  float vel;
325 
334 typedef struct {
338  float widthStd;
339 
343  float depthStd;
344 
348  float heightStd;
349 
353  float dopplerStd;
354 
356 
370 typedef struct {
376 
379 
384  uint8_t numStaticBoxes;
385 
388 
390 
391 
399 typedef struct {
403  float volume;
404 
406  union {
408  float limitsArray[4];
409  };
410 
412 
420 typedef struct {
425 
430 
435 
440 
445 
447 
448 
456 typedef struct {
460  float snrThre;
461 
466 
471 
477 
482 
486  float maxVelThre;
487 
489 
498 typedef struct {
502  float alpha;
503 
507  float confidence;
508 
510 
518 typedef struct
519 {
520  union {
523 
528  };
529 
533  float snr;
534 
536 
544 typedef struct
545 {
549  uint8_t uid;
550 
554  uint32_t tid;
555 
560 
565 
569  float G;
570 
575 
577 
578 #ifdef __cplusplus
579 }
580 #endif
581 
582 #endif /* GTRACK_H */
GTRACK Measurement point.
Definition: radar_gtrack_common.h:518
#define GTRACK_MAX_BOUNDARY_BOXES
Maximum number of boundary boxes. Points outside of boundary boxes are ignored.
Definition: radar_gtrack_common.h:201
MATRIX Level, previous level plus all intermediate computation results are reported.
Definition: radar_gtrack_common.h:249
MAXIMUM Level, maximum amount of details are reported.
Definition: radar_gtrack_common.h:252
#define GTRACK_STATE_VECTOR_SIZE
Size of state vector.
Definition: radar_gtrack_common.h:217
GTRACK Tracking Management Function Parameters.
Definition: radar_gtrack_common.h:420
float confidence
Range rate filtering confidence. Range: [0, inf)
Definition: radar_gtrack_common.h:507
float volume
Volume of the gating function. Range: (0, inf)
Definition: radar_gtrack_common.h:403
GTRACK Unrolling Parameters.
Definition: radar_gtrack_common.h:498
uint16_t exit2freeThre
EXIT ZONE => FREE threshold. Allowed: {0, 1, 2, ..., UINT32_MAX)
Definition: radar_gtrack_common.h:444
float G
Gain factor. Range: [0, inf)
Definition: radar_gtrack_common.h:569
GTRACK target descriptor.
Definition: radar_gtrack_common.h:544
float snrThre
Minimum total SNR. Range: [0, inf)
Definition: radar_gtrack_common.h:460
uint16_t active2freeThre
ACTIVE => FREE threshold. Allowed: {0, 1, 2, ..., UINT32_MAX)
Definition: radar_gtrack_common.h:434
float y1
Near boundary, m. Range: (-inf, inf)
Definition: radar_gtrack_common.h:278
GTRACK Update Function Parameters.
Definition: radar_gtrack_common.h:334
float depthStd
Expected standard deviation of measurements in target length dimension. Range: (0,...
Definition: radar_gtrack_common.h:343
uint16_t pointsThre
Minimum number of points in a set. Allowed: {0, 1, 2, ..., UINT16_MAX}.
Definition: radar_gtrack_common.h:476
GTRACK Allocation Function Parameters.
Definition: radar_gtrack_common.h:456
float dopplerStd
Expected standard deviation of measurements of target radial velocity. Range: (0,...
Definition: radar_gtrack_common.h:353
float x1
Left boundary, m. Range: (-inf, inf)
Definition: radar_gtrack_common.h:268
float vel
Radial velocity limit, m/s. Range: (-inf, inf)
Definition: radar_gtrack_common.h:323
uint16_t det2actThre
DETECTION => ACTIVE threshold. Allowed: {0, 1, 2, ..., UINT32_MAX)
Definition: radar_gtrack_common.h:424
float velocityThre
Minimum initial velocity, m/s. Range: [0, inf)
Definition: radar_gtrack_common.h:470
#define GTRACK_MAX_STATIC_BOXES
Maximum number of static boxes. Targets inside the static box can persist longer.
Definition: radar_gtrack_common.h:209
GTRACK_VERBOSE_TYPE
GTRACK Verbose Level.
Definition: radar_gtrack_common.h:233
GTRACK_gateLimits limits
Definition: radar_gtrack_common.h:407
uint16_t det2freeThre
DETECTION => FREE threshold. Allowed: {0, 1, 2, ..., UINT32_MAX)
Definition: radar_gtrack_common.h:429
NONE.
Definition: radar_gtrack_common.h:236
uint8_t numBoundaryBoxes
Number of scene boundary boxes. If defined (numBoundaryBoxes > 0), only points within the boundary bo...
Definition: radar_gtrack_common.h:375
DEBUG Level, errors, warnings, and state transitions are reported.
Definition: radar_gtrack_common.h:245
GTRACK Box Structure.
Definition: radar_gtrack_common.h:264
float maxDistanceThre
Maximum squared distance between points in a set. Range: (-inf, inf)
Definition: radar_gtrack_common.h:481
float snr
Range detection SNR, linear. Range: [0, inf)
Definition: radar_gtrack_common.h:533
uint8_t numStaticBoxes
Number of scene static boxes. If defined (numStaticBoxes > 0), only targets within the static box(s) ...
Definition: radar_gtrack_common.h:384
float widthStd
Expected standard deviation of measurements in target length dimension. Range: (0,...
Definition: radar_gtrack_common.h:338
float heightStd
Expected standard deviation of measurements in target width dimension. Range: (0,...
Definition: radar_gtrack_common.h:348
float width
Width limit, m. Range: [0, inf)
Definition: radar_gtrack_common.h:308
float alpha
Range rate filtering alpha. Range: [0, inf)
Definition: radar_gtrack_common.h:502
#define GTRACK_MEASUREMENT_VECTOR_SIZE
Size of measurements vector.
Definition: radar_gtrack_common.h:224
WARNING Level, errors and warnings are reported.
Definition: radar_gtrack_common.h:242
uint32_t tid
Target Identifier. Allowed: {0, 1, 2, ..., UINT8_MAX}.
Definition: radar_gtrack_common.h:554
GTRACK Measurement vector.
Definition: radar_gtrack_2d.h:77
ERROR Level, only errors are reported.
Definition: radar_gtrack_common.h:239
uint16_t static2freeThre
STATIC => FREE threshold. Allowed: {0, 1, 2, ..., UINT32_MAX)
Definition: radar_gtrack_common.h:439
uint8_t uid
Tracking Unit Identifier. Allowed: {0, 1, 2, ..., UINT8_MAX}.
Definition: radar_gtrack_common.h:549
GTRACK Gating Function Parameters.
Definition: radar_gtrack_common.h:399
float maxVelThre
Maximum velocity delta between points in a set. Range: (-inf, inf)
Definition: radar_gtrack_common.h:486
GTRACK Gate Limits.
Definition: radar_gtrack_common.h:304
float snrThreObscured
Minimum total SNR when behind another target. Range: [0, inf)
Definition: radar_gtrack_common.h:465
GTRACK Scene Parameters/.
Definition: radar_gtrack_common.h:370
float y2
Far boundary, m. Range: (-inf, inf)
Definition: radar_gtrack_common.h:283
float depth
Depth limit, m. Range: [0, inf)
Definition: radar_gtrack_common.h:313
float x2
Right boundary, m. Range: (-inf, inf)
Definition: radar_gtrack_common.h:273
float z1
Bottom boundary, m. Range: (-inf, inf)
Definition: radar_gtrack_common.h:288
GTRACK_measurement_vector vector
Measurement vector.
Definition: radar_gtrack_common.h:522
float height
Heigth limit, m. Range: [0, inf)
Definition: radar_gtrack_common.h:318
float z2
Top boundary, m. Range: (-inf, inf)
Definition: radar_gtrack_common.h:293