Skip to content

[Proposal] Change Imu accelerations to physx.tensor.api instead of finite difference #1294

Closed

Description

@jtigue-bdai

Proposal

Investigate the use of physx.tensor.api for body acceleration calculations in IMU sensor using Using Isaac Sim 4.2. Previous versions of the accelerations had some bugs with regard to accuracy.

Motivation

Currently the IMU sensor utilizes a finite difference model for acceleration. This produces significant noise when in contact/noisy-velocity and is dependent on sample rate.

Alternatives

Leave current implementation.

Additional context

In order to provide the accelerations in the correct frame they will need to be moved to the link frame because they are provided at the center of mass (COM) frame. Code to do this is shown below:
NOTE: currently the physx API generates errors when using small masses, will switch back to it once fixed

# obtain the acceleration of the link COM
lin_acc_w, ang_acc_w = self._view.get_accelerations()[env_ids].split([3, 3], dim=-1)
# # if an offset is present or the COM does not agree with the link origin, the linear acceleration has to
# # be transformed taking the angular velocity and acceleration into account
lin_acc_w += torch.cross(ang_acc_w, math_utils.quat_rotate(quat_w, self._offset_pos_b[env_ids] - self._com_pos_b[env_ids]), dim=-1) + torch.cross(
    ang_vel_w, torch.cross(ang_vel_w, math_utils.quat_rotate(quat_w, self._offset_pos_b[env_ids] - self._com_pos_b[env_ids]), dim=-1), dim=-1
)

Checklist

  • I have checked that there is no similar issue in the repo (required)

Acceptance Criteria

Add the criteria for which this task is considered done. If not known at issue creation time, you can add this once the issue is assigned.

  • accelerations pass current tests

Activity

  1. added
    enhancement
    dev team
    on Oct 23, 2024
  2. self-assigned this
    on Oct 23, 2024
  3. jtigue-bdai commented on Oct 25, 2024

    @jtigue-bdai
    CollaboratorAuthor
    • using the get_accelerations from the rigid_body_view does not allow users to set velocities and have acceleration calculate from changes in velocity (i.e. test_constant_acceleration does not pass because acceleration always measures zero - gravity)
    • test_single_dof_pendulum does not pass but it is due to tests that look at comparisons between offsef sensor deffintions. The pendulum analytical checks are within tolerances
    • test_offset_calculation does not pass - indicating the use of small inertia frames with fixed joints for the imu are a problem.
  4. yufengsjtu commented on Dec 30, 2024

    @yufengsjtu
    Contributor

    img_v3_02i2_24517432-dc21-42de-b07f-a88edd0d53fg
    Hi, i mounted an imu sensor on a static cube placed on the ground, collected some data and plotted the data shown above. I found that the imu has deviations in both linear acceleration and angular velocity. is this caused by finite difference or other reasons? or is it just a noise term? The data were obtained as follows:
    dnv5L8TdEv

  5. jtigue-bdai commented on Jan 2, 2025

    @jtigue-bdai
    CollaboratorAuthor

    The deviations of in linear accelerations for x and y directions are floating point errors (see scale 1e-6). The deviation in Z is due to the added gravity offset. That can be changed in configuration. The angular velocity is also floating point errors.

  6. jtigue-bdai commented on Jan 6, 2025

    @jtigue-bdai
    CollaboratorAuthor

    Issue 1618 has shown some issues with acceleration if articulations are using IdealPDActuators (and inherited versions) instead of ImplicitActuators

  7. limymy commented on Sep 11, 2025

    @limymy

    Hello, could you please provide an update on the progress of this issue? After the release of Isaac Sim 5.0, does the problem caused by the PhysX API still exist?

  8. AntoineRichard commented on Aug 28, 2026

    @AntoineRichard
    Collaborator

    Hi @jtigue-bdai, revisiting this one — thanks for the detailed writeup, it aged well.

    We re-measured RigidBodyView.get_accelerations() on current Isaac Sim (6.0.1): with a constant applied force, the solver-reported acceleration matches F/m to within 0.005% for masses from 1 kg down to 1 µg. The small-mass inaccuracy that originally forced the finite-difference implementation is no longer present.

    Based on that, #7416 switches the PhysX IMU to solver-reported accelerations (with the α×r + ω×(ω×r) transport terms for the sensor offset), and does the same for the OvPhysX backend where the solver exposes the equivalent binding. Beyond accuracy, this removes the finite-difference artifacts: the reading no longer depends on the sensor update period, is valid from the first update, and velocity writes (resets/teleports) no longer produce spurious acceleration spikes.

    @limymy this also answers your question — after #7416 the reported acceleration is the solver's, not a numerical derivative, so the behavior you observed with larger update periods goes away.

    We'll close this once #7416 merges.

    🤖 This response was drafted with AI assistance and reviewed by the Isaac Lab team.

  9. StafaH commented on Sep 24, 2026

    @StafaH
    Collaborator

    The following issue is now fixed on develop and release 3.0, it was fixed by #7614 and #7416.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

dev teamenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions