DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

Obstacle.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2019-2020 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use, reproduction, disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 #ifndef DW_WORLD_OBSTACLE_H_
31 #define DW_WORLD_OBSTACLE_H_
32 
33 #include <dw/core/Context.h>
34 #include <dw/sensors/Sensors.h>
35 #include <dw/sensors/radar/Radar.h>
36 
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64 
65 #define DW_OBSTACLE_BOUNDARY_POINT_MAX_COUNT 30u
66 
67 typedef enum dwObstacleProperties {
76 
78 #define DW_OBSTACLE_STATE_NOTMOVING (1 << 8)
79 #define DW_OBSTACLE_STATE_MOVING (1 << 9)
80 
81 typedef enum dwObstacleState {
89 
104 
106 
110 typedef enum dwObjectClass {
119 
121 } dwObjectClass;
122 
125 #define DW_OBSTACLE_CLASS_IS_ANIMATE (1 << 8)
126 #define DW_OBSTACLE_CLASS_IS_VIRTUAL (1 << 9)
127 #define DW_OBSTACLE_CLASS_IS_VEHICLE (1 << 10)
128 #define DW_OBSTACLE_CLASS_IS_BIKE (1 << 11)
129 #define DW_OBSTACLE_CLASS_IS_PEDESTRIAN (1 << 12)
130 #define DW_OBSTACLE_CLASS_IS_ANIMAL (1 << 13)
131 #define DW_OBSTACLE_CLASS_IS_OBJECT (1 << 14)
132 #define DW_OBSTACLE_CLASS_IS_UNDEFINED (1 << 15)
133 
134 #define DW_OBSTACLE_CLASS_VEHICLE_BASE \
136  DW_OBSTACLE_CLASS_IS_VEHICLE + DW_OBSTACLE_CLASS_IS_ANIMATE
137 #define DW_OBSTACLE_CLASS_BIKE_BASE \
138  DW_OBSTACLE_CLASS_IS_BIKE + DW_OBSTACLE_CLASS_IS_ANIMATE
139 #define DW_OBSTACLE_CLASS_PEDESTRIAN_BASE \
140  DW_OBSTACLE_CLASS_IS_PEDESTRIAN + DW_OBSTACLE_CLASS_IS_ANIMATE
141 #define DW_OBSTACLE_CLASS_ANIMAL_BASE \
142  DW_OBSTACLE_CLASS_IS_ANIMAL + DW_OBSTACLE_CLASS_IS_ANIMATE
143 #define DW_OBSTACLE_CLASS_OBJECT_BASE DW_OBSTACLE_CLASS_IS_OBJECT
144 #define DW_OBSTACLE_CLASS_UNDEFINED_STATIC_BASE DW_OBSTACLE_CLASS_IS_UNDEFINED
145 #define DW_OBSTACLE_CLASS_UNDEFINED_ANIMATE_BASE \
146  DW_OBSTACLE_CLASS_IS_UNDEFINED + DW_OBSTACLE_CLASS_IS_ANIMATE
147 
149 typedef enum dwObstacleClass {
151 
161 
166 
173 
182 
189 
197 
211 
215 
222 
224 
225 typedef enum dwObstacleStateFlags {
227 
236 
240 
242 
243 #define DW_OBSTACLE_MAX_SENSOR_COUNT 64
244 typedef struct dwObstacle
245 {
247  uint64_t id;
248  uint64_t sensorIdMask;
251  uint32_t prop;
252 
254  dwObjectClass objectClass;
255  dwObstacleClass obstacleClass;
258 
259  dwObstacleState state;
261 
274 
277 
282 
287 } dwObstacle;
288 
289 #define DW_OBSTACLE_ARRAY_MAX_COUNT 1000
290 
291 typedef struct dwObstacleArray
292 {
293  uint32_t count;
296 
297 #define DW_OBSTACLE_MAX_LINKS 16
298 
301 typedef struct dwObstacleLink
302 {
303  uint32_t count;
304  uint32_t arrayIndex[DW_OBSTACLE_MAX_LINKS];
305  uint32_t obstacleIndex[DW_OBSTACLE_MAX_LINKS];
306  uint64_t obstacleId[DW_OBSTACLE_MAX_LINKS];
307  float32_t confidence[DW_OBSTACLE_MAX_LINKS]; // [0,1] confidence about linkage
309 
314 typedef struct dwObstacleLinkArray
315 {
316  uint32_t count;
319 
320 #define DW_OBSTACLE_SILHOUETTE_MAX_POINTS 128
321 
322 typedef struct dwObstacleSilhouette
323 {
324  uint64_t obstacleId;
325  uint32_t nVertices;
328 
329 #define DW_OBSTACLE_SILHOUETTE_MAX_VERTICES DW_OBSTACLE_SILHOUETTE_MAX_POINTS* \
330  DW_OBSTACLE_ARRAY_MAX_COUNT
331 
333 {
334  uint32_t nObstacles;
336 
337  uint32_t nVertices;
340 
341 typedef enum dwObstacleRegionClass {
343 
348 
359 
360 typedef struct dwObstacleSegment
361 {
364  uint64_t sourceIdMask;
365  float32_t distance_m;
368  int32_t endIndex;
370  uint64_t endObstacleId;
372 
373 #define DW_OBSTACLE_SECTOR_MAX_SEGMENTS 10
374 #define DW_OBSTACLE_RDF_MAX_SECTORS 4000
375 
376 typedef struct dwObstacleSector
377 {
378  uint32_t segmentCount;
381 
382 // Obstacle Radial Distance Map
383 typedef struct dwObstacleRDM
384 {
386 
387  //Data
388  uint32_t sectorCount;
390 
391  //Angles are defined so that (cos(angle),sin(angle)) works with the world coordinate
392  //system. This means zero starts straight ahead and then going counter-clockwise.
393  //To be clear about the direction of the sector, angleMin_r<=angle_max_r always
394  //holds and the sector is always counter-clockwise starting from angleMin_r.
395  // -PI<angleMin_r<=PI always holds but to allow a sector spanning straight back
396  //angleMax_r can be more than PI, but is never more than three PI.
399 } dwObstacleRDM;
400 
409 
410 #ifdef __cplusplus
411 }
412 #endif
413 
416 #endif // DW_WORLD_OBSTACLE_H_
dwConfidence3f accelerationConfidence
Definition: Obstacle.h:269
#define DW_OBSTACLE_BOUNDARY_POINT_MAX_COUNT
Definition: Obstacle.h:65
dwObstacleStateFlags stateFlags
Hints (turn signals, brake lights)
Definition: Obstacle.h:260
dwTime_t timestamp_us
Timestamp.
Definition: Obstacle.h:385
float32_t height_m
Maximum height of obstacle.
Definition: Obstacle.h:278
Additional states flags for moving objects expressing intention of maneuver.
Definition: Obstacle.h:229
Region with static obstacles.
Definition: Obstacle.h:346
invalid class
Definition: Obstacle.h:150
Emergency flashers on.
Definition: Obstacle.h:233
Blinking/hand-signal left.
Definition: Obstacle.h:230
float float32_t
Specifies POD types.
Definition: Types.h:70
dwObstacleProperties
Definition: Obstacle.h:67
NVIDIA DriveWorks API: Radar
#define DW_OBSTACLE_ARRAY_MAX_COUNT
Definition: Obstacle.h:289
#define DW_OBSTACLE_SECTOR_MAX_SEGMENTS
Definition: Obstacle.h:373
If this bit is set, obstacle is low confidence, recommended to filter, provided for fusion purposes...
Definition: Obstacle.h:70
Covered by an actor that could move.
Definition: Obstacle.h:347
dwConfidence1f traversalSpeedConfidence
Definition: Obstacle.h:286
Defines a three-element floating-point vector.
Definition: Types.h:319
Obstacle signaling to us.
Definition: Obstacle.h:239
dwVector3f boundaryPoints[DW_OBSTACLE_BOUNDARY_POINT_MAX_COUNT]
Shape information. Non-closed polyline encoded by 3D vertices.
Definition: Obstacle.h:276
small animal (bird,squirrel,cat)
Definition: Obstacle.h:177
any light weight vehicle
Definition: Obstacle.h:111
dwObstacleArray can be paired with link array information which provides access information across mu...
Definition: Obstacle.h:314
float32_t clearance_m
Minimum clearance.
Definition: Obstacle.h:280
uint64_t sensorIdMask
Bitmask indicating which sensors agreed with this obstacle detection.
Definition: Obstacle.h:248
dwVector3f rotationAxis
Unit rotation axis at reference.
Definition: Obstacle.h:270
Objects (in-animate).
Definition: Obstacle.h:185
States of incomplete knowledge about those underlying states Could be static/animate, don’t know which.
Definition: Obstacle.h:351
uint32_t count
of valid linkages of obstacle
Definition: Obstacle.h:303
dwVector3f position
A reference point on the obstacle.
Definition: Obstacle.h:262
NVIDIA DriveWorks API: Core Methods
#define DW_OBSTACLE_CLASS_IS_VIRTUAL
non physical obstacles mask
Definition: Obstacle.h:126
Our strategy for uncertainty representation is to give classification confidence scalars for classifi...
Definition: Types.h:510
uint32_t nVertices
Number of vertices in this silhouette.
Definition: Obstacle.h:325
float32_t angleMax_r
angle where last sector ends.
Definition: Obstacle.h:398
two wheeled vehicles
Definition: Obstacle.h:113
float32_t subclassConfidence
Subclassification confidence.
Definition: Obstacle.h:257
#define DW_OBSTACLE_CLASS_ANIMAL_BASE
Definition: Obstacle.h:141
uint32_t segmentCount
Actual number of segments.
Definition: Obstacle.h:378
dwConfidence1f rotationVelConfidence
Definition: Obstacle.h:273
uint32_t prop
Properties.
Definition: Obstacle.h:251
DW_API_PUBLIC dwStatus dwObstacle_reset(dwObstacle *obstacle)
Resets the fields of dwObstacle.
dwTime_t timestamp_us
Timestamp for this obstacle in host clock.
Definition: Obstacle.h:246
#define DW_OBSTACLE_CLASS_OBJECT_BASE
Definition: Obstacle.h:143
float32_t classConfidence
Classification confidence.
Definition: Obstacle.h:256
dwStatus
Status definition.
Definition: Status.h:178
NVIDIA DriveWorks API: Sensors
#define DW_OBSTACLE_STATE_NOTMOVING
Bitmasks modifiers of obstacle state.
Definition: Obstacle.h:78
float32_t angleMin_r
angle where first sector starts.
Definition: Obstacle.h:397
float32_t rotationVel_rps
Rotational velocity in radians/sec.
Definition: Obstacle.h:272
dwVector3f velocity_mps
Velocity of reference point in m/s.
Definition: Obstacle.h:266
Three basic actual underlying states.
Definition: Obstacle.h:345
float32_t traversalSpeed_mps
Maximum velocity that it is physically advised to move over this obstacle (used for speed bumps...
Definition: Obstacle.h:285
dwConfidence3f directionConfidence
Definition: Obstacle.h:265
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
float32_t confidence
Confidence that obstacle exists.
Definition: Obstacle.h:250
uint64_t sourceIdMask
Bitmask indicating which sources agree.
Definition: Obstacle.h:364
#define DW_OBSTACLE_SILHOUETTE_MAX_POINTS
Definition: Obstacle.h:320
medium animal (like a large dog)
Definition: Obstacle.h:179
uint32_t count
Definition: Obstacle.h:293
Could be drivable/static, don’t know which.
Definition: Obstacle.h:353
Could be drivable/animate, don’t know which.
Definition: Obstacle.h:355
Two wheeled vehicles.
Definition: Obstacle.h:163
uint32_t sectorCount
Actual number of sectors.
Definition: Obstacle.h:388
dwObstacleState
Definition: Obstacle.h:81
dwObjectClass objectClass
Class information.
Definition: Obstacle.h:254
unknown object
Definition: Obstacle.h:118
#define DW_OBSTACLE_CLASS_UNDEFINED_STATIC_BASE
Definition: Obstacle.h:144
dwObstacleRegionClass
Definition: Obstacle.h:341
dwConfidence3f rotationAxisConfidence
Definition: Obstacle.h:271
int32_t endIndex
dwObstacleArray index of dwObstacle that ends the segment. Negative if none.
Definition: Obstacle.h:368
#define DW_OBSTACLE_SILHOUETTE_MAX_VERTICES
Definition: Obstacle.h:329
dwObstacleStateFlags
Definition: Obstacle.h:225
dwObstacleState state
Obstacle State (stopped/in motion)
Definition: Obstacle.h:259
dwConfidence3f velocityConfidence
Definition: Obstacle.h:267
dwVector3f direction
Forward direction.
Definition: Obstacle.h:264
dwObstacleClass
Obstacle class enumeration.
Definition: Obstacle.h:149
dwConfidence1f clearanceConfidence
(used for overhangs, zero otherwise)
Definition: Obstacle.h:281
Region for which we have no knowledge.
Definition: Obstacle.h:357
dwObstacleRegionClass regionClass
Class of this region.
Definition: Obstacle.h:362
uint64_t id
Object ID for tracking purposes.
Definition: Obstacle.h:247
dwObstacleClass obstacleClass
Obstacle class.
Definition: Obstacle.h:255
float32_t classConfidence
Region class confidence.
Definition: Obstacle.h:363
traffic and road signs
Definition: Obstacle.h:112
dwConfidence3f positionConfidence
Definition: Obstacle.h:263
#define DW_OBSTACLE_STATE_MOVING
Definition: Obstacle.h:79
road curb as object
Definition: Obstacle.h:116
uint64_t obstacleId
Obstacle ID.
Definition: Obstacle.h:324
large animal (horse,cow,deer,moose)
Definition: Obstacle.h:181
#define DW_OBSTACLE_CLASS_UNDEFINED_ANIMATE_BASE
Definition: Obstacle.h:145
dwVector3f acceleration_mps2
Acceleration of ref point in m/s^2.
Definition: Obstacle.h:268
other unspecified object
Definition: Obstacle.h:117
#define DW_OBSTACLE_CLASS_PEDESTRIAN_BASE
Definition: Obstacle.h:139
dwObjectClass
Object classes known to DriveWorks.
Definition: Obstacle.h:110
dwConfidence1f heightConfidence
Definition: Obstacle.h:279
#define DW_OBSTACLE_CLASS_BIKE_BASE
Definition: Obstacle.h:137
uint64_t endObstacleId
corresponding dwObstacle’s id
Definition: Obstacle.h:370
Reverse lights on.
Definition: Obstacle.h:232
#define DW_OBSTACLE_CLASS_VEHICLE_BASE
Base offsets for object classes.
Definition: Obstacle.h:135
#define DW_API_PUBLIC
Definition: Exports.h:56
uint32_t boundaryPointCount
The number of boundary points.
Definition: Obstacle.h:275
Invalid region class.
Definition: Obstacle.h:342
Physical barriers:
Definition: Obstacle.h:192
#define DW_OBSTACLE_MAX_LINKS
Definition: Obstacle.h:297
#define DW_OBSTACLE_RDF_MAX_SECTORS
Definition: Obstacle.h:374