Skip to content

Commit

Permalink
Unify one type of CollisionCheckError
Browse files Browse the repository at this point in the history
  • Loading branch information
yck011522 committed Aug 8, 2024
1 parent 3360137 commit 3e229fd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/compas_fab/backends/pybullet/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import os
import sys
import tempfile
from itertools import combinations

import compas
from compas.geometry import Frame
Expand All @@ -16,8 +15,6 @@
from compas_robots.model import MeshDescriptor
from compas_robots import ToolModel

import compas_fab
from compas_fab.backends import CollisionCheckInCollisionError
from compas_fab.backends import CollisionCheckError
from compas_fab.backends.interfaces.client import ClientInterface

Expand Down Expand Up @@ -503,8 +500,8 @@ def _check_collision(self, body_1_id, body_1_name, body_2_id, body_2_name, link_
kwargs = {key: value for key, value in kwargs.items() if value is not None}
pts = pybullet.getClosestPoints(**kwargs)
if pts:
# LOG.warning("Collision between '{}' and '{}'".format(body_1_name, body_2_name))
raise CollisionCheckInCollisionError(body_1_name, body_2_name)
message = "Collision between '{}' and '{}'".format(body_1_name, body_2_name)
raise CollisionCheckError(message)

# --------------------------------
# Functions related to puids
Expand Down

0 comments on commit 3e229fd

Please sign in to comment.