IsaacLab icon indicating copy to clipboard operation
IsaacLab copied to clipboard

[Bug Report] Acceleration and Linear velocities of `Physx` off for small masses and with contact solver

Open pascal-roth opened this issue 1 year ago • 2 comments

Describe the bug

The measured accelerations and velocities given by the Physx RigidBodyAPI do not seem reasonable in two cases:

  • when a rigid body with a small mass is used.
  • when a sphere is kept at a constant velocity (set every physx step)

The error occurred during the development of the IMU sensor #619

Steps to reproduce

Added a test with a RigidBodyView on a robot's base and the imu_link and did the hand computation of the respective transformation. To reproduce run the test test_offset_calculation here .

Added a test with a cube and sphere on a GroundPlane which sets their velocities at every time step. While the cube velocities and accelerations stay approximately constant, the accelerations of the cube first decrease and then start to increase again. To reproduce run the test test_constant_velocity here.

System Info

  • Commit: 1b8e2c0efbb61e4a5bb77e14bc3bd04fad12b633
  • Isaac Sim Version: 4.1.0-rc.7+4.1.14801.71533b68.gl
  • OS: Ubuntu 20.04
  • GPU: RTX 4090
  • CUDA: 12.2
  • GPU Driver: 535.183.01

Checklist

  • [ ] I have checked that there is no similar issue in the repo (required)
  • [ ] I have checked that the issue is not in running Isaac Sim itself and is related to the repo

Acceptance Criteria

  • [ ] Expected behavior in the test is achieved

pascal-roth avatar Aug 13 '24 12:08 pascal-roth

@Mayankm96 for viz

pascal-roth avatar Aug 13 '24 12:08 pascal-roth

@Dhoeller19, this is currently blocking the IMU MR. @preist-nvidia, any advice here?

Mayankm96 avatar Aug 13 '24 22:08 Mayankm96

Pierre will have a look and let you know.

preist-nvidia avatar Aug 15 '24 17:08 preist-nvidia

@pascal-roth - we found a bug with the acceleration compute in PhysX when the velocity setters are used on CPU and GPU. Internally we finite difference the velocities over the time step for rigid bodies and the pre-sim velocity buffer was not updated when using the getters, so the values were incorrect for the first step after the set.

The fix will make it into the next Isaac update.

The small mass case for which @Mayankm96 helped with a repro we are still investigating.

preist-nvidia avatar Aug 30 '24 07:08 preist-nvidia

@preist-nvidia thanks for the update

pascal-roth avatar Aug 30 '24 08:08 pascal-roth