MCPcopy Create free account
hub / github.com/RoboCodeX-source/RoboCodeX_code / is_collision

Function is_collision

instruct_to_policy/scripts/src/env/utils.py:97–104  ·  view source on GitHub ↗
(bbox1, bbox2)

Source from the content-addressed store, hash-verified

95
96
97def is_collision(bbox1, bbox2):
98 # Check for overlap in x, y, and z axes
99 overlap_x = not (bbox1[0] > bbox2[3] or bbox1[3] < bbox2[0])
100 overlap_y = not (bbox1[1] > bbox2[4] or bbox1[4] < bbox2[1])
101 overlap_z = not (bbox1[2] > bbox2[5] or bbox1[5] < bbox2[2])
102
103 # If overlap in all three axes, then the bounding boxes collide
104 return overlap_x and overlap_y and overlap_z
105
106def calculate_place_position(object_bbox, receptacle_bbox, obstacle_bbox_list, max_tries=100, extra_elevation=0.1):
107 """

Callers 2

parse_place_poseMethod · 0.90
calculate_place_positionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected