Replicator camera pose not updating using rep.modify.pose

I am currently trying to modify the pose of a replicator camera using rep.modify.pose but it doesn’t appear to be changing. I am checking the pose using the get_world_transform_xform function described in this example. Below is a minimal version of my code to replicate this issue. Thank you for the help in advance!

def get_world_transform_xform(prim: Usd.Prim):
    """
    Get the local transformation of a prim using Xformable.
    See https://openusd.org/release/api/class_usd_geom_xformable.html
    Args:
        prim: The prim to calculate the world transformation.
    Returns:
        A tuple of:
        - Translation vector.
        - Rotation quaternion, i.e. 3d vector plus angle.
        - Scale vector.
    """
    xform = UsdGeom.Xformable(prim)
    time = Usd.TimeCode.Default() # The time at which we compute the bounding box
    world_transform: Gf.Matrix4d = xform.ComputeLocalToWorldTransform(time)
    translation: Gf.Vec3d = world_transform.ExtractTranslation()
    rotation: Gf.Rotation = world_transform.ExtractRotation()
    scale: Gf.Vec3d = Gf.Vec3d(*(v.GetLength() for v in world_transform.ExtractRotationMatrix()))
    return translation, rotation, scale

cam = rep.create.camera(
    position=(10,10,10)
)  
rp_cam = rep.create.render_product(cam, (640, 480)) 
cam_prim = cam.get_output_prims()["prims"][0] 

print(get_world_transform_xform(cam_prim)) 

with cam: 
    rep.modify.pose(
        position = (1,2,3) 
    )

print(get_world_transform_xform(cam_prim))

Resolved this issue by stepping as suggested by ahaidu in this post. Below is the added line:

rep.orchestrator.step(delta_time=0.0, rt_subframes=10, pause_timeline=False)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.