fix: IS 4.5.0 -> 5.0.0 migration — USD metadata, DomeLight, scene reuse
- Fix USD metersPerUnit/upAxis for IS 5.0.0 (no longer auto-compensated) - Batch fix all Aligned_obj.usd, table, and art USD files with backups - Fix DomeLight rotation to Z-axis only (prevent tilted environment map) - Fix scene reuse across episodes (arena_file caching, task clearing, prim guard) - Add migration tools: scan_usd_metadata.py, fix_usd_metadata.py - Add migration guide: migerate/migerate.md - Add nvidia-curobo to .gitignore - Fix sort_the_rubbish config: obj_0 -> obj_1 (obj_0 does not exist) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,21 @@ class RigidObject(RigidPrim):
|
||||
self.base_prim_path = prim_path
|
||||
rigid_prim_path = os.path.join(self.base_prim_path, cfg["prim_path_child"])
|
||||
self.mesh_prim_path = str(get_prim_at_path(rigid_prim_path).GetChildren()[0].GetPrimPath())
|
||||
# [LOAD_DBG] Print xformOps right after create_prim, before physics
|
||||
try:
|
||||
from pxr import UsdGeom
|
||||
_xf = UsdGeom.Xformable(get_prim_at_path(rigid_prim_path))
|
||||
for _op in _xf.GetOrderedXformOps():
|
||||
print(f"[LOAD_DBG] {cfg_name} after_create_prim: {_op.GetName()} = {_op.Get()}", flush=True)
|
||||
_l2w = _xf.ComputeLocalToWorldTransform(0)
|
||||
print(f"[LOAD_DBG] {cfg_name} after_create_prim l2w=({_l2w[3][0]:.6f}, {_l2w[3][1]:.6f}, {_l2w[3][2]:.6f})", flush=True)
|
||||
# Also check the USD file's own metersPerUnit
|
||||
_ref_stage = get_prim_at_path(prim_path).GetStage()
|
||||
_mpu = UsdGeom.GetStageMetersPerUnit(_ref_stage)
|
||||
_up = UsdGeom.GetStageUpAxis(_ref_stage)
|
||||
print(f"[LOAD_DBG] {cfg_name} stage metersPerUnit={_mpu} upAxis={_up}", flush=True)
|
||||
except Exception as _e:
|
||||
print(f"[LOAD_DBG] {cfg_name} error: {_e}", flush=True)
|
||||
super().__init__(prim_path=rigid_prim_path, name=cfg["name"], *args, **kwargs)
|
||||
|
||||
def get_observations(self):
|
||||
|
||||
Reference in New Issue
Block a user