Skip to content

Commit

Permalink
Merge pull request #367 from fi6/main
Browse files Browse the repository at this point in the history
fix: Incompatible xformOpOrder
  • Loading branch information
balakumar-s authored Nov 17, 2024
2 parents a1c1106 + e08f404 commit 18e9ebd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/curobo/util/usd_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,16 @@ def set_prim_translate(prim, translation):
def set_prim_transform(
prim, pose: List[float], scale: List[float] = [1, 1, 1], use_float: bool = False
):
if not prim.GetAttribute("xformOp:translate").IsValid():
UsdGeom.Xformable(prim).AddTranslateOp(UsdGeom.XformOp.PrecisionFloat)

if prim.GetAttribute("xformOp:orient").IsValid():
if isinstance(prim.GetAttribute("xformOp:orient").Get(), Gf.Quatf):
use_float = True
else:
UsdGeom.Xformable(prim).AddOrientOp(UsdGeom.XformOp.PrecisionFloat)
use_float = True

if not prim.GetAttribute("xformOp:translate").IsValid():
UsdGeom.Xformable(prim).AddTranslateOp(UsdGeom.XformOp.PrecisionFloat)
if not prim.GetAttribute("xformOp:scale").IsValid():
UsdGeom.Xformable(prim).AddScaleOp(UsdGeom.XformOp.PrecisionFloat)
quat = pose[3:]
Expand Down

0 comments on commit 18e9ebd

Please sign in to comment.