No Physics Scene Present - Isaac Sim API: Occupancy Map Generator

Hello,

I am using the Isaac Sim API to generate an occupancy map for my environment. The code is tested in the Isaac Sim Small Warehouse Environment with Shelves but I am presented with an error: No Physics Scene Present. I do see that the physics scene is inside the world environment, but it is still generating errors. I am curious to know what I am doing wrong or if this is a bug?

import omni
from omni.isaac.occupancy_map import _occupancy_map

physx = omni.physx.acquire_physx_interface()
stage_id = omni.usd.get_context().get_stage_id()

generator = _occupancy_map.Generator(physx, stage_id)
generator.update_settings(5, 4, 5, 6)
# Set location to map from and the min and max bounds to map to
generator.set_transform((0, 0, 0), (-200, -200, 0), (200, 200, 0))
generator.generate()
# Get locations of the occupied cells in the stage
points = generator.get_occupied_positions()
# Get computed 2d occupancy buffer
buffer = generator.get_buffer()
# Get dimensions for 2d buffer
dims = generator.get_dimensions()


error phys

have you solved it ? I have the same error and the occupancy map is empty .

2 Likes