Get prim real-time velocities

Hi NVIDIA, @ltorabi and maybe @sdebnath

So I have been trying to query the linear and angular velocities of a prim using PhysicsSchema.VelocityAPI but they just return all zero, as shown in the video.

Could you tell how to fetch the accurate values in real-time?


Hi @Tadinu

You can use the get_rigid_body_linear_velocity and get_rigid_body_angular_velocity methods from DynamicControl… as detailed in the Inspect Physics extension located at /isaac-sim/_build/linux-x86_64/release/exts/omni.isaac.utils/omni/isaac/utils/scripts/ line 162 for example

Inspect Physics (green cube selected)

1 Like

If you want to use PhysicsSchema.VelocityAPI
you can enable the update to usd setting under the physics settings panel. This will have a performance cost however as there is more data being synchronized from physx to the usd stage.
Using the DynamicControl api mentioned above will be better as it will work regardless of that setting and connects to the internal physics data directly.

1 Like