DriveWorks SDK Reference

| 0.6.67 Release

OccupancyGrid.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) 2016 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 
51 #ifndef DW_MAPPING_OCCUPANCY_GRID_H__
52 #define DW_MAPPING_OCCUPANCY_GRID_H__
53 
54 #include <dw/core/Config.h>
55 #include <dw/core/Context.h>
56 #include <dw/core/Exports.h>
57 #include <dw/core/Status.h>
58 #include <dw/core/Types.h>
59 
60 #include <dw/gl/GL.h>
61 
62 #include <dw/image/Image.h>
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
71 typedef struct dwOccupancyGridObject *dwOccupancyGridHandle_t;
72 
74 
82  dwTransformation sensorToRigTransformation;
115 
131 
133 
135 typedef struct {
137  uint16_t id;
139  uint32_t pointCount;
146 } dwObstacle;
147 
160 dwStatus dwOccupancyGrid_initialize(dwOccupancyGridHandle_t *grid,
161  const dwOccupancyGridParameters *params,
162  dwContextHandle_t context);
163 
176  const dwOccupancyGridLayerParameters *input,
177  dwOccupancyGridHandle_t grid);
178 
191  uint8_t layer,
192  dwOccupancyGridHandle_t grid);
193 
206  uint8_t layer,
207  dwOccupancyGridHandle_t grid);
208 
220 dwStatus dwOccupancyGrid_update(const dwTransformation *matrix, uint8_t layer,
221  dwOccupancyGridHandle_t grid);
222 
238  uint32_t count,
239  uint8_t layer,
240  dwOccupancyGridHandle_t grid);
241 
255  uint32_t count,
256  uint8_t layer,
257  dwOccupancyGridHandle_t grid);
258 
268 dwStatus dwOccupancyGrid_reset(dwOccupancyGridHandle_t grid);
269 
280 dwStatus dwOccupancyGrid_getGridImage(dwImageGL *output, dwOccupancyGridHandle_t grid);
281 
294  uint8_t layer,
295  dwOccupancyGridHandle_t grid);
296 
305 dwStatus dwOccupancyGrid_release(dwOccupancyGridHandle_t *grid);
306 
307 #ifdef __cplusplus
308 }
309 #endif
310 
312 #endif // DW_MAPPING_OCCUPANCY_GRID_H__
uint32_t pointCount
The number of points that define the polygon.
NVIDIA DriveWorks API: Core Types
float float32_t
Specifies POD types.
Definition: Types.h:77
float32_t minAccumulatedProbability
The min threshold value per grid cell.
Definition: OccupancyGrid.h:90
uint16_t id
The object ID in the calling application.
float32_t hitWidth
Sets the hit width.
Definition: OccupancyGrid.h:97
Defines a three-element floating-point vector.
Definition: Types.h:225
Defines a two-element floating-point vector.
Definition: Types.h:207
DW_API_PUBLIC dwStatus dwOccupancyGrid_reset(dwOccupancyGridHandle_t grid)
Clears the occupancy grid.
float32_t probabilityRayFreeAtOrigin
The probability that a grid cell is free at the ray origin.
dwVector2f velocity
The 2-D velocity of the polygon in the car coordinate system.
dwVector4f renderColor
The render color for rendering to an FBO.
NVIDIA DriveWorks API: Core Methods
DW_API_PUBLIC dwStatus dwOccupancyGrid_release(dwOccupancyGridHandle_t *grid)
Releases the occupancy grid.
DW_API_PUBLIC dwStatus dwOccupancyGrid_update(const dwTransformation *matrix, uint8_t layer, dwOccupancyGridHandle_t grid)
Transforms an occupancy grid.
dwVector2f acceleration
The 2-D acceleration of the polygon in the car coordinate system.
Holds the initialization parameters for the occupancy grid.
NVIDIA DriveWorks API: Core Exports
DW_API_PUBLIC dwStatus dwOccupancyGrid_insertPointList(const dwVector4f *inputList, uint32_t count, uint8_t layer, dwOccupancyGridHandle_t grid)
Updates an occupancy grid with raw input where each dwVector4f is treated as a hit point...
DW_API_PUBLIC dwStatus dwOccupancyGrid_getGridLayerImage(dwImageGL *output, uint8_t layer, dwOccupancyGridHandle_t grid)
Renders the occupancy grid into the output FBO.
float32_t probabilityRayFreeAtMaxDistance
The probability that a grid cell is free at the max valid distance.
const uint8_t DW_OCCUPANCY_GRID_MAX_LAYER_COUNT
Definition: OccupancyGrid.h:73
float32_t maxAccumulatedProbability
The max threshold value per grid cell.
Definition: OccupancyGrid.h:92
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
float32_t minValidDistanceMeters
The min valid distance, in meters, that this layer can register.
Definition: OccupancyGrid.h:84
dwStatus
Status definition.
Definition: Status.h:167
float32_t probabilityRayFreeBeyondHit
The probability that a grid cell is free beyond the hit to the max distance.
float32_t rayWidth
Sets the ray width.
dwVector2f * points
The position of the points (x,y) of the polygon in clockwise order.
float32_t maxValidDistanceMeters
The max valid distance, in meters, that this layer can register.
Definition: OccupancyGrid.h:86
DW_API_PUBLIC dwStatus dwOccupancyGrid_insertObstacleList(const dwObstacle *inputList, uint32_t count, uint8_t layer, dwOccupancyGridHandle_t grid)
Updates an occupancy grid with an obstacle list.
dwVector3f gridMinMeters
The minimum grid coordinates in length, width, and height.
dwBool isCumulative
Sets whether or not the layer is cumulative.
Definition: OccupancyGrid.h:95
Holds the initialization parameters for a range sensor layer in the occupancy grid.
Definition: OccupancyGrid.h:78
dwBool isRaycast
Sets whether or not the layer is raycast.
struct dwOccupancyGridObject * dwOccupancyGridHandle_t
A pointer to the opaque handle for occupancy grid.
Definition: OccupancyGrid.h:71
float32_t probabilityFreeAtHit
The probability that a grid cell is free given a grid point hit.
Definition: OccupancyGrid.h:88
DW_API_PUBLIC dwStatus dwOccupancyGrid_getLayerProperties(dwOccupancyGridLayerParameters *output, uint8_t layer, dwOccupancyGridHandle_t grid)
Gets the layer properties for a given layer.
dwBool isScrollingMap
Sets whether or not to translate only.
Defines an obstacle.
uint8_t dwBool
Definition: Types.h:79
DW_API_PUBLIC dwStatus dwOccupancyGrid_getGridImage(dwImageGL *output, dwOccupancyGridHandle_t grid)
Renders the combined occupancy grid into the output FBO.
Defines a GL texture image.
Definition: Image.h:251
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:78
float32_t cellSizeMeters
The size of each grid cell in the occupancy grid, in meters.
#define DW_API_PUBLIC
Definition: Exports.h:76
dwVector3f gridDimensionsMeters
The dimensions of the grid in length, width, and height.
NVIDIA DriveWorks API: Core Status Methods
dwTransformation sensorToRigTransformation
The column-major orientation of the sensor for a given layer.
Definition: OccupancyGrid.h:82
DW_API_PUBLIC dwStatus dwOccupancyGrid_setLayerProperties(uint8_t layer, const dwOccupancyGridLayerParameters *input, dwOccupancyGridHandle_t grid)
Sets the layer properties for a given layer.
DW_API_PUBLIC dwStatus dwOccupancyGrid_initialize(dwOccupancyGridHandle_t *grid, const dwOccupancyGridParameters *params, dwContextHandle_t context)
Initializes an occupancy grid.