Isaac Sim Version
5.0.0
Operating System
Windows 11
GPU Information
- Model: 5090
- Driver Version:
Topic Description
Hi everyone,
I’m currently developing an extension that automatically generates a warehouse based on a floor plan. Part of this setup includes a pallet storage system designed to hold approximately 8,000 pallets.
While creating the storage structure itself is quite fast, populating it by adding each pallet as a reference takes a very long time. Currently, I’m creating an individual reference for each pallet, and the process seems to be a bottleneck.
Here’s a relevant excerpt of my code:
def position_elements_in_racks(elements_path, element_matrix, layout_element):
stage = get_context().get_stage()
# Load root palette asset
palett_root_prim = load_element(layout_element['pallet']['asset_path'], layout_element['pallet']['asset_name'])
print(f" 📊 Processing {len(element_matrix)} elements...")
for i, row in enumerate(element_matrix):
if i % 100 == 0 and i > 0:
print(f" Processed {i}/{len(element_matrix)} elements")
rack_id = int(row[0])
palett_id = int(row[1])
object_type = int(row[2])
rack_rot = row[3]
rack_pos = row[4:7]
element_pos = row[7:10]
element_position = element_pos + rack_pos
element_prim_path = f"{elements_path}/element_{rack_id}_{palett_id}"
new_prim = stage.DefinePrim(element_prim_path)
new_prim.GetReferences().AddInternalReference(palett_root_prim.GetPrimPath())
position_prim(new_prim, element_position, (0, 0, rack_rot-90))
The data is stored in a numpy array, where each entry contains IDs, position coordinates, and a type identifier. The type field enables me to place different pallet variants, not just a single type everywhere.
My assumption is that sequentially adding all these prim references is what makes this process so slow.
Is there a way to significantly speed this up, perhaps with some kind of parallelization or batch operation? Has anyone dealt with a similar situation or has optimization tips?
Any suggestions or advice would be greatly appreciated!
Best regards,
Axel