Skip to content

Commit

Permalink
Merge pull request #183 from YilingQiao/yiling/241220_speed
Browse files Browse the repository at this point in the history
save computation for multi-contact
  • Loading branch information
YilingQiao authored Dec 21, 2024
2 parents 2ab7753 + 716c472 commit 7ef0fec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions genesis/engine/solvers/rigid/collider_decomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,9 +991,14 @@ def _func_mpr(self, i_ga, i_gb, i_b):
i_gb, i_ga = i_ga, i_gb

is_plane = self._solver.geoms_info[i_ga].type == gs.GEOM_TYPE.PLANE

i_la = self._solver.geoms_info[i_ga].link_idx
i_lb = self._solver.geoms_info[i_gb].link_idx
is_self_pair = self._solver.links_info.root_idx[i_la] == self._solver.links_info.root_idx[i_lb]
multi_contact = (
self._solver.geoms_info[i_ga].type != gs.GEOM_TYPE.SPHERE
and self._solver.geoms_info[i_gb].type != gs.GEOM_TYPE.SPHERE
and not is_self_pair
)
if is_plane:
self._func_plane_contact(i_ga, i_gb, multi_contact, i_b)
Expand Down

0 comments on commit 7ef0fec

Please sign in to comment.