DriveWorks SDK Reference

| 0.6.67 Release

Occupancy Grid

Detailed Description

Defines Occupancy Grid mapping and fusion.

Data Structures

struct  dwObstacle
 Defines an obstacle. More...
 
struct  dwOccupancyGridLayerParameters
 Holds the initialization parameters for a range sensor layer in the occupancy grid. More...
 
struct  dwOccupancyGridParameters
 Holds the initialization parameters for the occupancy grid. More...
 

Typedefs

typedef struct dwOccupancyGridObject * dwOccupancyGridHandle_t
 A pointer to the opaque handle for occupancy grid. More...
 

Functions

DW_API_PUBLIC dwStatus dwOccupancyGrid_getGridImage (dwImageGL *output, dwOccupancyGridHandle_t grid)
 Renders the combined occupancy grid into the output FBO. More...
 
DW_API_PUBLIC dwStatus dwOccupancyGrid_getGridLayerImage (dwImageGL *output, uint8_t layer, dwOccupancyGridHandle_t grid)
 Renders the occupancy grid into the output FBO. More...
 
DW_API_PUBLIC dwStatus dwOccupancyGrid_getLayerProperties (dwOccupancyGridLayerParameters *output, uint8_t layer, dwOccupancyGridHandle_t grid)
 Gets the layer properties for a given layer. More...
 
DW_API_PUBLIC dwStatus dwOccupancyGrid_initialize (dwOccupancyGridHandle_t *grid, const dwOccupancyGridParameters *params, dwContextHandle_t context)
 Initializes an occupancy grid. More...
 
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. More...
 
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. More...
 
DW_API_PUBLIC dwStatus dwOccupancyGrid_release (dwOccupancyGridHandle_t *grid)
 Releases the occupancy grid. More...
 
DW_API_PUBLIC dwStatus dwOccupancyGrid_reset (dwOccupancyGridHandle_t grid)
 Clears the occupancy grid. More...
 
DW_API_PUBLIC dwStatus dwOccupancyGrid_setLayerProperties (uint8_t layer, const dwOccupancyGridLayerParameters *input, dwOccupancyGridHandle_t grid)
 Sets the layer properties for a given layer. More...
 
DW_API_PUBLIC dwStatus dwOccupancyGrid_update (const dwTransformation *matrix, uint8_t layer, dwOccupancyGridHandle_t grid)
 Transforms an occupancy grid. More...
 

Variables

const uint8_t DW_OCCUPANCY_GRID_MAX_LAYER_COUNT = 16
 

Data Structure Documentation

◆ dwObstacle

struct dwObstacle
Data Fields
dwVector2f acceleration The 2-D acceleration of the polygon in the car coordinate system.
uint16_t id The object ID in the calling application.
uint32_t pointCount The number of points that define the polygon.
dwVector2f * points The position of the points (x,y) of the polygon in clockwise order.
dwVector2f velocity The 2-D velocity of the polygon in the car coordinate system.

◆ dwOccupancyGridLayerParameters

struct dwOccupancyGridLayerParameters
Data Fields
float32_t hitWidth Sets the hit width.
dwBool isCumulative Sets whether or not the layer is cumulative.

If false, insert point cloud always resets previously inserted point clouds.

dwBool isRaycast Sets whether or not the layer is raycast.

If true, free space will be calculated in between the sensor origin and the hit point using probabilityRay* values.

float32_t maxAccumulatedProbability The max threshold value per grid cell.
float32_t maxValidDistanceMeters The max valid distance, in meters, that this layer can register.
float32_t minAccumulatedProbability The min threshold value per grid cell.
float32_t minValidDistanceMeters The min valid distance, in meters, that this layer can register.
float32_t probabilityFreeAtHit The probability that a grid cell is free given a grid point hit.
float32_t probabilityRayFreeAtMaxDistance The probability that a grid cell is free at the max valid distance.

This value is ignored if layer is non-raycast layer.

float32_t probabilityRayFreeAtOrigin The probability that a grid cell is free at the ray origin.

This value is ignored if layer is non-raycast layer.

float32_t probabilityRayFreeBeyondHit The probability that a grid cell is free beyond the hit to the max distance.

This value is ignored if layer is non-raycast layer.

float32_t rayWidth Sets the ray width.

This value is ignored if layer is non-raycast layer.

dwTransformation sensorToRigTransformation The column-major orientation of the sensor for a given layer.

This includes rotation and translation and is used to apply to points on insertPointCloud.

◆ dwOccupancyGridParameters

struct dwOccupancyGridParameters
Data Fields
float32_t cellSizeMeters The size of each grid cell in the occupancy grid, in meters.
dwVector3f gridDimensionsMeters The dimensions of the grid in length, width, and height.
dwVector3f gridMinMeters The minimum grid coordinates in length, width, and height.
dwBool isScrollingMap Sets whether or not to translate only.

If true, the cumulative map does not rotate but inserts the new points.

dwVector4f renderColor The render color for rendering to an FBO.

Typedef Documentation

◆ dwOccupancyGridHandle_t

typedef struct dwOccupancyGridObject* dwOccupancyGridHandle_t

A pointer to the opaque handle for occupancy grid.

Definition at line 71 of file OccupancyGrid.h.

Function Documentation

◆ dwOccupancyGrid_getGridImage()

DW_API_PUBLIC dwStatus dwOccupancyGrid_getGridImage ( dwImageGL output,
dwOccupancyGridHandle_t  grid 
)

Renders the combined occupancy grid into the output FBO.

Parameters
[out]outputPointer to image.
[in]gridOpaque grid handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwOccupancyGrid_getGridLayerImage()

DW_API_PUBLIC dwStatus dwOccupancyGrid_getGridLayerImage ( dwImageGL output,
uint8_t  layer,
dwOccupancyGridHandle_t  grid 
)

Renders the occupancy grid into the output FBO.

Parameters
[out]outputPointer to image.
[in]layerSpecifies the desired layer to render.
[in]gridSpecifies the opaque grid handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwOccupancyGrid_getLayerProperties()

DW_API_PUBLIC dwStatus dwOccupancyGrid_getLayerProperties ( dwOccupancyGridLayerParameters output,
uint8_t  layer,
dwOccupancyGridHandle_t  grid 
)

Gets the layer properties for a given layer.

Gets the layer properites for a given layer.

Parameters
[out]outputA pointer to the layer parameters.
[in]layerThe index of the layer.
[in]gridAn opaque grid handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS
Parameters
[out]outputThe layer parameters.
[in]layerThe index of the layer.
[in]gridAn opaque grid handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwOccupancyGrid_initialize()

DW_API_PUBLIC dwStatus dwOccupancyGrid_initialize ( dwOccupancyGridHandle_t grid,
const dwOccupancyGridParameters params,
dwContextHandle_t  context 
)

Initializes an occupancy grid.

The grid must be initialized on a thread with a valid current OpenGL context.

Parameters
[out]gridA pointer to the opaque grid handle.
[in]paramsA pointer to the initialization parameters.
[in]contextSpecifies the opaque handle of a dwContext.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwOccupancyGrid_insertObstacleList()

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.

Parameters
[in]inputListHandle to the list of dwObstacles.
[in]countNumber in the input list.
[in]layerLayer to set this input.
[in]gridOpaque grid handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwOccupancyGrid_insertPointList()

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.

Parameters
[in]inputListData for the point list, which must be laid out as [x,y,z,w] for each point.
[in]countNumber of points in the VBO.
[in]layerSpecifies the layer corresponding to the point cloud.
[in]gridSpecifies the opaque grid handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwOccupancyGrid_release()

DW_API_PUBLIC dwStatus dwOccupancyGrid_release ( dwOccupancyGridHandle_t grid)

Releases the occupancy grid.

Parameters
[in]gridA pointer to the opaque grid handle.
Returns
DW_INVALID_ARGUMENT DW_FAILURE DW_SUCCESS

◆ dwOccupancyGrid_reset()

DW_API_PUBLIC dwStatus dwOccupancyGrid_reset ( dwOccupancyGridHandle_t  grid)

Clears the occupancy grid.

Parameters
[in]gridSpecifies the opaque grid handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwOccupancyGrid_setLayerProperties()

DW_API_PUBLIC dwStatus dwOccupancyGrid_setLayerProperties ( uint8_t  layer,
const dwOccupancyGridLayerParameters input,
dwOccupancyGridHandle_t  grid 
)

Sets the layer properties for a given layer.

Parameters
[in]layerThe index of the layer.
[in]inputA pointer to the layer parameters.
[in]gridAn opaque grid handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwOccupancyGrid_update()

DW_API_PUBLIC dwStatus dwOccupancyGrid_update ( const dwTransformation *  matrix,
uint8_t  layer,
dwOccupancyGridHandle_t  grid 
)

Transforms an occupancy grid.

Parameters
matrixA column-major order transformation matrix.
[in]layerSpecifies the layer corresponding to the point cloud.
gridSpecifies the opaque grid handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

Variable Documentation

◆ DW_OCCUPANCY_GRID_MAX_LAYER_COUNT

const uint8_t DW_OCCUPANCY_GRID_MAX_LAYER_COUNT = 16

Definition at line 73 of file OccupancyGrid.h.