isaac-sim/IsaacGymEnvs

Computation of Rotation Error is Incorrect?

Opened this issue · 0 comments

Hello,

The IsaacGymEnvs manipulation models compute rotation error and provides it as feedback to the obs_buf. I experimented with replacing that feedback with a constant rotation error command, (e.g. +90-degree roll), and upon exploring the code base, found that the computation of the rotation error command is backwards, causing a +90deg roll command, q = [ 0.7071068, 0, 0, 0.7071068 ], to produce a -90deg roll behavior. I observed the same inversion with pitch and yaw as well.

Is this intended?

If not, I believe the code should be changed from:

quat_mul(self.object_rot, quat_conjugate(self.goal_rot))

to:

quat_mul(self.goal_rot, quat_conjugate(self.object_rot))

The behavior is still good with this error, so I imagine this doesn't matter as long as the error is made through shadowhand.py, allegro_hand.py, and allegro_hand_dextreme.py. However, I plan to see how training performance is affected after fixing the error command computation, and can report back!

Thank you!