Collision Avoidance Overview
OPTIMake provides direct support for collision avoidance constraints involving geometric shapes and occupancy grids. You can define collision avoidance inequality constraints directly through the modeling interface. The following types of collision avoidance inequality constraints are supported:
point_to_rectangle_inequality: Point-to-rectangle collision avoidance inequality constraintrectangle_to_rectangle_inequality: Rectangle-to-rectangle collision avoidance inequality constraintpoint_to_occupancy_map_inequality: Point-to-2D occupancy grid collision avoidance inequality constraintpoint_to_boundary_inequality: Point-to-boundary collision avoidance inequality constraint
Before use, you need to import the relevant interface:
from optimake.extension.collision_avoidance import *
Or import the entire extension directly:
from optimake.extension import *
Collision avoidance constraints are non-convex constraints. Depending on the initial guess settings, the solver may converge to different local optima.
OPTIMake does not require the initial guess to be a feasible solution satisfying the collision avoidance constraints, but when the initial guess has a clear avoidance mode, the solution's avoidance mode will generally be consistent with that of the initial guess. For example, in vehicle-to-vehicle collision avoidance, when the initial guess has vehicle A on the left side of vehicle B, the optimized trajectory of vehicle A will typically also be on the left side of vehicle B.
Conversely, when the avoidance mode is unclear, the solution's avoidance mode may be inconsistent with that of the initial guess, and may even cause the solver to fail to converge. For example, when the initial guesses of vehicle A and vehicle B overlap, the avoidance mode is unclear. The solution mode may end up on the left or right side of vehicle A and B, and may even cause the solver to fail to converge.