"boundingBox2DTight" is empty in Replicator "Online Generation" example

Hi, I’m working through the Replicator “Online Generation” example but I’m getting an error because the “boundingBox2DTight” groundtruth value is empty:

example:
https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/tutorial_replicator_online_generation.html

This line generates an error (because of empty gt_bbox):
bboxes = torch.tensor(gt_bbox[[“x_min”, “y_min”, “x_max”, “y_max”]].tolist())

I’ve output the “rgb” groundtruth to an image and it looks ok to me (i.e. there should be bounding boxes).

Trying to figure out what’s wrong but any help would be appreciated

Thanks

Correction, the failure line is:

areas = (bboxes[:, 2] - bboxes[:, 0]) * (bboxes[:, 3] - bboxes[:, 1])

because bboxes tensor is “tensor()”

Here is an example of the “rgb” groundtruth which results in empty bounding boxes:

I’ve also tried

verify_sensor_init=True
wait_for_sensor_data=2

in self.sd_helper.get_groundtruth

For anyone stumbling onto this - I have a fix.

I added:

sd_helper.initialize(sensor_names=sensor_names, viewport=viewport)

Which is what is done in

standalone_examples/replicator/visualize_groundtruth.py

And that solved the issue for me.

2 Likes