Rotating a rigid body

How can I set a Cube rotation through my python extension? I naively believed this would be a simple task. but the documentation on this (transformation modification) is none existing.

I came across a couple of forum questions on this:
1.

The solution here is outdated. dc.set_rigid_body_pose expects a omni.isaac.dynamic_control._dynamic_control.Transform object.

the solution here is more recent but is incomplete.
AttributeError: ‘omni.isaac.dynamic_control._dynamic_control.Dynami’ object has no attribute ‘Tansform’”

Help please,
Thank you.

Hi,
well yeah this is actually not an easy task… I am not familiar with the Isaac scripts that could help, I can help you do that through USD eventually.
But since IsaacSim is using Fabric before I can help I need more information. Are you trying to change the rotation before simulation starts or during simulation? Also thats transformation of a rigid body correct?
Regards,
Ales

@AlesBorovicka I am trying to rotate a prim in my stage that has a rigidbody component at runtime (not before I press play).
So a rigidbody cannot be manipulated from script (not translated either)? only the USD can be modified?
Also, what is Fabric?

Thank you

Yes, it can be manipulated through several ways, but it all depends how the application is setup, where the transformations live.
Since you are in IsaacSim, you have a way to change the transformations via TensorAPI. I am not familiar with that API, but there should be API like this:
https://docs.omniverse.nvidia.com/py/isaacsim/source/extensions/omni.isaac.core/docs/index.html#omni.isaac.core.prims.RigidPrimView.set_world_poses
Through this API you can directly change the rigid body pose.

If you dont want to use the tensor API for some reason, you need to know where the data live.
By default simulation output (transformation/velocities) are stored back to USD. Hence if you would need to change the transformation you need to change the transformation of the USD prim. Change to the USD prim will trigger update for the rigid body internally.
Same happens if the output is Fabric - this is fast path to store the transformation, velocities. If enabled (omni.physx.fabric extension is enabled), then you would have to change Fabric transformation in order to get that change to physx.
Regards,
Ales