Position, Velocities, and Accelerations in Isaac

Hey all,

I am trying to port the uuv_gazebo_plugins from Gazebo to Isaac. These plugins allow to simulate ROVs, and USVs in Gazebo, and I’d like to do the same in Isaac. I ported all the code from c++ to python, and I need to write some function to do the following:

  • get position and orientation
  • get velocities
  • get accelerations

The first question I have is how do I access the state of an object properly? i.e. is there a right way of doing that?

If I understood correctly the way Isaac works, we 3 ways of getting position/orientation information.

  • from pixar’s USD we can get the object position, and orientation. But for a reason it always complains about expired handles when called multiple times when the simulation is running. I also find the information provided by this confusing as the scale must be applied on top of the transform.
prim = stage.GetPrimAtPath(prims[-1])
xform = UsdGeom.Xformable(prim)
transform = prim.GetAttribute('xformOp:transform')
print(transform.ExtractTranslation())
  • from PhysX we can use get_rigidbody_transformation that returns the position and orientation as quaternions. The documentation to the Physx python bindings with Isaac seems to be locally hosted only so I cannot provide any links.
  • And we can also use get_rigid_body_pose from the dynamic_control_ extension to get the same information.

Which method is recommended?

My next question is, is there a way of acquiring the velocity of a rigid_body using USD or Physx python bindings?

The dynamic_control_ extension provides these functions, but I could not find a way to do it using Physx, or USD:

Finally I wanted to know, if possible, how to get accelerations. This information is computed by the simulator, so It should be available somewhere.

Ideally, I would like to avoid using the dynamic_control_ extension as its apply_body_force method does not work well (or I do not know how to make it work), and I have to use the Physx method instead. Having both Physx and dynamic_control_ means I have to manage 3 interfaces to pull information from the rigid_body which is inconvenient.

Thanks in advance,

Best,

Antoine

Hi @antoine.richard, in addition to the position and velocities which were already provided in the DC API before, you could get the acceleration by using the new IMU Sensor API that was just released with Isaac SIM 2021.2.0. The IMU Sensor Readings provide both velocities and accelerations

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

Hi @antoine.richard!
Were you able to implement correctly the Gazebo plugin? I’m trying to implement something like this. Could you give a help?
Thanks