DexterousHands icon indicating copy to clipboard operation
DexterousHands copied to clipboard

[compute_observations bug] correctness of self.fingertip_another_pos

Open Bariona opened this issue 1 year ago • 0 comments

Dear authors,

In the shadow hand task's compute_observations() func (e.g. link), there is a code block written as:

self.fingertip_state = self.rigid_body_states[:, self.fingertip_handles][:, :, 0:13]
self.fingertip_pos = self.rigid_body_states[:, self.fingertip_handles][:, :, 0:3]
self.fingertip_another_state = self.rigid_body_states[:, self.fingertip_another_handles][:, :, 0:13]
self.fingertip_another_pos = self.rigid_body_states[:, self.fingertip_another_handles][:, :, 0:3]

I think fingertip_another_handles = fingertip_handles, which might lead to the incorrect observation (i.e., the self.fingertip_pos = self.fingertip_another_pos will always holds true)

The reason is that self.fingertip_another_handles and self.fingertip_handles 's definitions are:

self.fingertip_handles = [self.gym.find_asset_rigid_body_index(shadow_hand_asset, name) for name in self.fingertips]
self.fingertip_another_handles = [self.gym.find_asset_rigid_body_index(shadow_hand_another_asset, name) for name in self.a_fingertips]

I think here since their handles all get gym.from find_asset_rigid_body() and the asset is basically the same, self.fingertip_another_handles = self.fingertip_handles.

As I output the variables, my assumption holds. Could you give me some tips?

ps: I love your work very much!!

Bariona avatar Dec 11 '23 10:12 Bariona