Skip to content

Commit

Permalink
fix bug where articulation get net contact forces was oriented wrong …
Browse files Browse the repository at this point in the history
…despite having right shape
  • Loading branch information
StoneT2000 committed Mar 5, 2024
1 parent cefbf7a commit 17cd5a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mani_skill2/utils/structs/articulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,10 @@ def get_net_contact_forces(self, link_names: Union[List[str], Tuple[str]]):
query = self._net_contact_force_queries[tuple(link_names)]
self.px.gpu_query_contact_body_impulses(query)
return (
query.cuda_impulses.torch().clone().reshape(-1, len(link_names), 3)
query.cuda_impulses.torch()
.clone()
.reshape(len(link_names), -1, 3)
.transpose(1, 0)
/ self._scene.timestep
)
else:
Expand Down

0 comments on commit 17cd5a2

Please sign in to comment.