Hello,
I have a very simple question, but couldn’t figure out for myself, since I am not very good at coding tbh.
Is there a possibility to execute a defined function every time the replicator generates a new scene/after taking the pictures. I want to read out the bounding box of my bin and do other stuff, but when I just write it like this it won’t work. The bounding box will only get read out at the beginning of my code execution, but not every time the scene gets generated new. Same if I put the code sniplet in my “bin_place” rep. function.
Hello Jen, yes I also use this for my writer, but I need to use the coordinates of my bounding box to drop parts only inbetween my corners, since I want to simulate a bin-picking scenario with parts falling into a bin and delete parts outside before taking the images. Since I change the rotation and position of my bin slightly with every iteration I can’t use global coordinates, that’s why I want to use the bbox of my object every iteration.
Currently, replicator does not support adding relative locations using omnigraph for moving targets. E.g. randomizing the location of objects relative to another object. As I understood, this is something you wanted to achieve.
You can, however, use Isaac Sim / USD API for this. You can use rep.orhecstrator.step() to manually generate the randomizations and after each step you can read out the location and bounding boxes of your assets, and move them around.