Occupancy map change in API?

I used the example code from the docs to generate an occupancy map:

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()

This does not seem to work anymore in the latest Isaac Sim release:
AttributeError: ‘omni.isaac.occupancy_map._occupancy_map.Generator’ object has no attribute ‘generate’

@hmazhar

Seems generate was replaces by generate_2d and generate_3d. The result has an additional dimension now. Perhaps in the future Nvidia could make this more precise in the release notes, if interfaces have breaking changes.

And maybe deprecate code instead of simply trashing it.

Thanks for the feedback, we will do better in terms of documenting API changes in the future

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.