Ask Your Question

Revision history [back]

There is no specific function to create the occupancy grid, however a good idea which worked for me is - Create a 2D openCV matrix with same number of rows and columns as your occupancy grid. Initialize Matrix with 0 values. Then, get the occupancy values from the occupancy grid for each cell, while iterating through the 2D Matrix push occupancy value of each cell as each element for the 2D matrix. This will give you a image of the occupancy grid.