Get Position of Primitive

Hi everyone!

Is it possible to get current position of primitive? Now I can only get translation

Hi,

If you are working with Python, you can use the Isaac Dynamic Control binding.
In particular, the method get_rigid_body_pose which returns a Transform object with the position p (in meters) and the rotation r as quaternion

This small code can be help:

from omni.isaac.dynamic_control import _dynamic_control

dc=_dynamic_control.acquire_dynamic_control_interface()

object=dc.get_rigid_body("/Stage/bin/SmallKLT")
object_pose=dc.get_rigid_body_pose(object)

print("position:", object_pose.p)
print("rotation:", object_pose.r)

It gets the pose of the bin from an opened scenario (e.g. /Isaac/Samples/Leonardo/Stage/ur10_bin_filling.usd). You can try the code just writing in the Script Editor tab (Window > Script Editor), running the simulation and executing the script (Script Editor > Command > Execute)

Note: The position of the bin in the Details tab is the position of the primitive before running the simulation (in a floating state slightly off the ground)