"""Find what's colliding right at the plow pile-up point, and check Track_06's drive.""" import omni.usd from pxr import Usd, UsdGeom, UsdPhysics, PhysxSchema stage = omni.usd.get_context().get_stage() bbc = UsdGeom.BBoxCache(Usd.TimeCode.Default(), [UsdGeom.Tokens.default_, UsdGeom.Tokens.render]) print("=== everything with a collider near the plow (x -8.3..-7.0, y -0.6..0.9, z 1.7..2.6) ===") for p in stage.Traverse(): has_col = (p.HasAPI(UsdPhysics.CollisionAPI) or p.HasAPI(UsdPhysics.MeshCollisionAPI)) if not has_col: continue attr = p.GetAttribute("physics:collisionEnabled") enabled = attr.Get() if attr and attr.HasAuthoredValue() else True if not enabled: continue r = bbc.ComputeWorldBound(p).ComputeAlignedRange() if r.IsEmpty(): continue mn, mx = r.GetMin(), r.GetMax() if mx[0] < -8.3 or mn[0] > -7.0 or mx[1] < -0.6 or mn[1] > 0.9 or mx[2] < 1.7: continue approx = None if p.HasAPI(UsdPhysics.MeshCollisionAPI): a = p.GetAttribute("physics:approximation") approx = a.Get() if a else None print(f" {p.GetPath()} type={p.GetTypeName()} approx={approx}") print(f" x[{mn[0]:+.2f}..{mx[0]:+.2f}] y[{mn[1]:+.2f}..{mx[1]:+.2f}] z[{mn[2]:+.2f}..{mx[2]:+.2f}]") print("\n=== ConveyorTrack_06/Belt drive + friction ===") belt = stage.GetPrimAtPath("/World/ConveyorTrack_06/Belt") print(" applied schemas:", list(belt.GetAppliedSchemas())) sv = belt.GetAttribute("physxSurfaceVelocity:surfaceVelocity") print(" surfaceVelocity:", sv.Get() if sv else None) en = belt.GetAttribute("physxSurfaceVelocity:surfaceVelocityEnabled") print(" surfaceVelocityEnabled:", en.Get() if en else None) from pxr import UsdShade api = UsdShade.MaterialBindingAPI(belt) mat, rel = api.ComputeBoundMaterial(materialPurpose="physics") print(" physics material:", mat.GetPath() if mat else None) if mat: m = UsdPhysics.MaterialAPI(mat.GetPrim()) print(" static/dynamic friction:", m.GetStaticFrictionAttr().Get(), m.GetDynamicFrictionAttr().Get())