Hello,
I am using replicator for synthetic data generation using Isaac Sim v4.2. I am having issues in generating bounding boxes for the labelled prims.
In the writer, I have enabled rgb, semantic segmentation, bounding box 3d, bounding box 2d loose and bounding box 2d tight. My assumption is the bounding boxes are automatically generated if enabled in writer. For example, when I enabled semantic segmentation then respective images are automatically generated. Below is the code snippet I have used:
# Initialize and attach writer
writer = rep.WriterRegistry.get("BasicWriter")
writer.initialize(
output_dir="_output",
rgb=True,
semantic_segmentation=True,
bounding_box_3d=True,
bounding_box_2d_loose=True,
bounding_box_2d_tight=True)
writer.attach([render_product])
writer.attach([render_product_static])
In addition to this, I have also added annotator registry as below:
camera_static = rep.create.camera(name="static_camera", position=(16, -27.5, 6.2), rotation=(60, 0, 90))
render_product_static = rep.create.render_product(camera_static, (1024, 1024))
bbox_2d_tight = rep.AnnotatorRegistry.get_annotator("bounding_box_2d_tight")
bbox_2d_tight.attach(render_product_static)
bbox_2d_loose = rep.AnnotatorRegistry.get_annotator("bounding_box_2d_loose")
bbox_2d_loose.attach(render_product_static)
bbox_3d = rep.AnnotatorRegistry.get_annotator("bounding_box_3d")
bbox_3d.attach(render_product_static)
But this too didn’t worked.
Being said, if I use Visualizer tool I can see the bounding boxes as shown below
While looking for similar issues, I came across a thread that has bounding box issues. I tried the code snippet of that thread which is confirmed as working by other commentators. However, that snippet is also not generating any bounding boxes.
This appears to be an issue with Isaac Sim v4.2.
How can I solve this issue?
Thanks in advance.