8.1. Occupancy Map Generation

8.1.1. Learning Objectives

This tutorial demonstrates how to create an occupancy map Omniverse Isaac Sim. After this tutorial, you will know how to use the occupancy map generation extension to generate a 2d occupancy map for an environment.

5-10 Minute Tutorial

8.1.2. Getting Started

The occupancy map extension uses physics collision geometry in the stage to determine if a location is occupied or not. If you are generating an occupancy map for a custom environment, make sure that any geometry you want to appear in the final map has collision enabled. For the purposes of this tutorial, we will use the warehouse environment:

  1. Open a new stage via File -> New

  2. Create -> Isaac -> Environments -> Small Warehouse with Multiple Shelves to load the warehouse into this new empty stage.

8.1.3. Generating an Occupancy Map

  1. In the Occupancy Map Generator UI set the origin to an empty location in the stage (2.00, 0, 1.20)

  2. You will see a wireframe rectangle appear in the stage showing the bounds of the area used to create the map

  3. The center of this rectangle must be in an unoccupied space

    Setting origin of map generation
  4. Select the Warehouse prim in the stage. In the Occupancy Map extension, click on BOUND SELECTION.

  5. For the Upper Bound, set the Z height to 3.0

    Setting bounds for map generation
  6. Press CALCULATE followed by VISUALIZE IMAGE. A window showing the map will appear

  7. Visualization Window:

    • Occupied/Freespace/Unknown Colors: These colors are used in the final generated image

    • Rotation: Rotates the output image by the specified amount

    • Coordinate Type: Selects the type of configuration output for the generated occupancy map

    • Occupancy Map: Pressing RE-GENERATE IMAGE will create a new image and display the updated configuration output

    Generating the image
  8. Press the Save Image button and select the location where you wish to save the image

  9. The final stored image will look like the following:

    Sample Occupancy Map generated from warehouse stage

8.1.4. Using Physx Lidar vs RTX Lidar for Generating Occupancy Maps

In the Occupancy Map Generator UI, setting the Use PhysX Collision Geometry option to True will use the collision approximations for each mesh in the scene which the PhysX based lidar uses to generate the occupancy map. This is set to True by default as it is the fastest option. On the other hand, setting the option to False will temporarily remove the collision approximations and the RTX Lidar will use the original triangle meshes to generate a more accurate occupancy map.

To compare the results for each option, open the example USD file containing some simple meshes with different collision approximations here: /Isaac/Samples/Examples/OccupancyMap/physx_vs_rtx_lidar_tutorial.usd.

  1. Ensure that Visualizing collision meshes are enabled:
    • Select: the eye icon in the upper left corner of the viewport.

    • Select: Show by type.

    • Select: Physics.

    • Select: Colliders.

    • Check: All.

  2. Ensure the Occupancy Map extension is open and then select all the meshes in the stage.

  3. Select CENTER TO SELECTION followed by BOUND SELECTION.

  4. Ensure Use PhysX Collision Geometry is checked. Press CALCULATE followed by VISUALIZE IMAGE. A window showing the map will appear and resemble the following:

    Sample Occupancy Map generated with PhysX lidar
  5. Next uncheck Use PhysX Collision Geometry. Press CALCULATE followed by VISUALIZE IMAGE. A window showing a more accurate map will appear and resemble the following:

    Sample Occupancy Map generated with RTX lidar

8.1.5. Summary

This tutorial covered the following topics:

  1. Using the occupancy map generator extension

  2. Generating a 2d occupancy map image for the warehouse environment

  3. Comparing the differences in occupancy map generated using PhysX vs RTX Lidar

8.1.6. Further Learning