When I run the Isaac Sim offline_generation.py sometimes the random objects are spawn outside of the warehouse usd. How to fix this?

Sometimes when I run the offline_generation.py, the objects are spawn outside of the warehouse USD where it’s all black (seems outside the factory there is not roads etc). So, is there a way to enforce it such that the spawn objects are located inside the warehouse.usd and not elsewhere?

The offline_generation.py is located here:

(base) mona@ard-gpu-01:~/.local/share/ov/pkg/isaac_sim-2022.2.0$ ls standalone_examples/replicator/offline_generation.py 
-rw-r--r-- 1 mona mona 21K Feb  2 21:33 standalone_examples/replicator/offline_generation.py

When spawning the forklift_prim limits are given which should make sure they are in the bounds of the warehouse:

position=(random.uniform(-20, -2), random.uniform(-1, 3), 0)

The rest of the randomizations are relative to this prim.

Can you provide which camera is generating black images?

How do you find the numbers

(-20, -2)
(-1, 3)

by Python code using a stage USD? here warehouse.usd?

Here’s an example

^ half of the stuffs are spawn outside the warehouse in black section.

also this is what I had from offline_generation.py code

    # Spawn a new forklift at a random pose
    forklift_prim = prims.create_prim(
        position=(random.uniform(-50, -4), random.uniform(-1, 3), 0),
        orientation=euler_angles_to_quat([0, 0, random.uniform(0, math.pi)]),

Which Isaac Sim version are you using? Have you modified the script, it does not seem to be running the original values.

Here’s what I have

Would you please be able to share the original offline_generation.py for this version that is located in:


Thank you

could you please also help me with this inquiry?

How do you find the numbers

(-20, -2)
(-1, 3)

via Python Script?

You can for example use the bounding box snippet from the tutorial to calculate the bounds coordinate of the warehouse or of the floor. You can also manually look up the values in the editor by moving entities and read out their locations.

1 Like

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