while the other sensory work (2d bbox, semseg, instance…) 3d bounding boxes are fixed at the first instance of the mesh not updating if the mesh change shape or whatever during an animation!
Do you have any additional info to provide such as logs, steps to reproduce the issue, etc.? I am not able to reproduce this issue on the production version of Isaac Sim 2022.1.1 using the path-points animation sample.
Yes sure, I’ll send it privately.
I tested more during the weekend and the problem seems to happen with animations exported from blender as MeshCashes and not if it’s a skeletal animation.
Another thing I’ve noticed is that sometimes bboxes are not generated if the loaded usd has references and those already have semantic informations. Right-click + reload reference sometimes help.
I tested both with 2021 and 2022.
Ok, using this code
import numpy as np from pxr import Gf, Sdf, UsdGeom, Usd, UsdPhysics, UsdLux, PhysxSchema stage = omni.usd.get_context().get_stage() for prim in stage.Traverse(): if "points" in prim.GetPropertyNames() and "body" in str(prim.GetPath()).lower(): points = UsdGeom.PointBased(prim) #points_in_mesh = points.ComputePointsAtTime(370, Usd.TimeCode(370)) #points_in_mesh = np.array(points_in_mesh) print(len(points_in_mesh)) print(dir(points)) # bound = bbox_cache.ComputeWorldBound(prim) bound = points.ComputeWorldBound(377, "default") print(bound) print(dir(bound)) for j in range(8): print(bound.ComputeAlignedBox().GetCorner(j)) print("----")
I was able to get the bounding box correctly.
However, it is much bigger than using trimesh library.
E.g. this code gives
(4.881373786694413, -2.801933228035446, 0.009911092929542065) (5.67206310136791, -2.801933228035446, 0.009911092929542065) (4.881373786694413, -1.9818935824353812, 0.009911092929542065) (5.67206310136791, -1.9818935824353812, 0.009911092929542065) (4.881373786694413, -2.801933228035446, 1.751508116722107) (5.67206310136791, -2.801933228035446, 1.751508116722107) (4.881373786694413, -1.9818935824353812, 1.751508116722107) (5.67206310136791, -1.9818935824353812, 1.751508116722107)
Which correspond to
While trimesh (using either points computed within omniverse, see commented code, or points computed using SMPL — code is as follow
# points as computed above # init_rot is the initial rotation of the body # global rot and init_tf are to account for the world transform points = points @ init_rot.T @ global_rot.T + init_tf mesh = trimesh.PointClound(points) bbox = mesh.bounding_box.vertices
[ 5.05927677, -2.72282249, 0.00991109], [ 5.05927677, -2.72282249, 1.75150806], [ 5.05927677, -2.01956608, 0.00991109], [ 5.05927677, -2.01956608, 1.75150806], [ 5.4809856 , -2.72282249, 0.00991109], [ 5.4809856 , -2.72282249, 1.75150806], [ 5.4809856 , -2.01956608, 0.00991109], [ 5.4809856 , -2.01956608, 1.75150806]
Which correspond to
camera is ORTHOGRAPHIC
boxes center are circa at the computed point.
Good luck everyone
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.