Collision Detection
- class discopygal.geometry_utils.collision_detection.ObjectCollisionDetection(obstaclces, robot)
A class object that handles collision detection of a single object with obstacles. The collision detector builds a CGAL arrangement representing the scene and allows to (quickly) query the arrangement for collisions.
- Parameters:
- build_cspace()
Build the Cspace arrangement
- clean_redundant_halfedges(arr)
Given an arrangement, clear any halfedge that its both incident faces are nonfree.
- Parameters:
arr (
Arrangement_2
) – arrangement to clean
- expanded_obstacle_arrangement(obstacle)
Given a robot shape and the current obstacle, generate an arrangement that contains the (single) expanded obstacle
- Parameters:
obstacle (
Obstacle
) – obstacle to expand- Returns:
arrangement with expanded obstacle
- Return type:
- discopygal.geometry_utils.collision_detection.collide_disc_with_disc(center1, r1, center2, r2)
Collide (center ,r) disc with (center ,r) disc
- discopygal.geometry_utils.collision_detection.collide_disc_with_polygon(center, r, polygon)
Collide (center ,r) disc with CGAL polygon
- discopygal.geometry_utils.collision_detection.collide_disc_with_rod(center, r, x, y, a, length)
Collide (center, r) disc with (x, y, a, length) rod
- discopygal.geometry_utils.collision_detection.collide_two_robots(robot1, edge1, robot2, edge2)
Get two robots and an edge of their movement, and check if at any point during their movement they intersect