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
[x] 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.
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.
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
Checklist
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.