Issue with set_world_pose/set_default_state in align_object_flange - Methods not supported by Prim

Hello everyone,

I am working on an extension script in Isaac Standalone (version 4.5.0) and I am trying to align my camera to the robot flange using the function align_object_flange. In this function, I calculate a new translation and rotation, to allign both flanges.

To update the transformation, I attempt to use the methods set_world_pose(pos, new_ori_quadt) and set_default_state(...) on my object. The relevant code snippet (lines 23–48 in extension.py) is as follows:

# adding rotation delta to current orientation
pos, ori = get_world_trans_rot(self.stage, obj.GetPrimPath())
ori_diff = prim_fixed_rotate * Gf.Quatd(prim_move_rotate).GetInverse()
new_ori_quadt = ori_diff * ori
      
# setting object orientation
obj.set_world_pose(pos, new_ori_quadt)  # Problematic line
obj.set_default_state(pos, self.backend_utils.convert_gf_quatd_to_array(new_ori_quadt))

The problem is that these methods are not applicable to my Prim objects – it appears that the Prims do not support this type which provides these functions. The following error is raised:

2025-07-24 06:49:25 [1,322,186ms] [Error] [carb.scripting-python.plugin] AttributeError: 'Prim' object has no attribute 'set_world_pose'

Does anyone have experience with this or any ideas on how to correctly apply the transformation data (position/rotation) in this context? How should I reformat the data (matrices, arrays, etc.) so that it is compatible with either the Command (e.g., TransformPrimCommand) or directly with the USD API methods? It is important that the position/rotation adjustment is performed relative to the parent xform.

Thank you for your help!

Hi @knebelka could you please show how obj is defined? According to the API documentation and the Isaac Sim codebase, set_world_pose is a function of class _SinglePrimWrapper. You can find it definition under exts/isaacsim.core.prims/isaacsim/core/prims/impl/_impl/single_prim_wrapper.py

Hi,
This is the code:


Here my Method align_object_flange is executed which arguments are:
def align_object_flange(self, obj, flange_object_fixed, flange_object_move):
So the object is self.robot_Camera

Thanks for sharing your code @knebelka! According to your implementation, your self.robot_Camera and other prims are USD prims which doesn’t have the function set_world_pose. Please try with other prims. For example, the RigidPrim has the function set_world_pose

Got it to work with that, thanks a lot! This is now the code for the alignment:

1 Like

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