How can I programmatically get the bounding box of the complete grey floor (not just a couple tiles as shown in selection) using Python code?
I intend to use this bounding box so that when I am spawning random objects they are not spawn outside of the factory.
def main():
# Open the environment in a new stage
print(f"Loading Stage {ENV_URL}")
open_stage(prefix_with_isaac_asset_server(ENV_URL))
# Create a custom scope for newly added prims
stage = get_current_stage()
# Get the height of the pallet
bb_cache = create_bbox_cache()
curr_spawn_height = bb_cache.ComputeLocalBound(pallet_prim).GetRange().GetSize()[2] * 1.1
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
print('pallet get size: ', bb_cache.ComputeLocalBound(pallet_prim).GetRange().GetSize())
^ also, in above code, does bb_cache.ComputeLocalBound(pallet_prim).GetRange().GetSize()
give me the bounding box of the pallet? For example, these are the numbers I got for pallet get size:
pallet get size: (1.213234950604253, 1.0028731312705617, 0.21111953263462624)
I was trying to use same to get the bounding box of the floor in the warehouse but I don’t know how to use a regular expression or better method to find the prim that belongs to the complete floor in the stage.
Please note that in the offline code, warehouse USD is my stage.