Compute time to collision of two moving bounding boxes

Viewed 40

Given two 2-dimensional bounding boxes. Each bounding box have a different pose and velocity.

Assume the velocity of both objects stay constant, I am interested in the time point when they collide, if such a time point exists.

1 Answers

Shrink one of the boxes to a point and that the same time inflate the other accordingly. The shape that you obtain is the so-called Minkowski sum of the two boxes. It will be an octagon.

enter image description here

Then consider the difference of the speeds, which gives you a relative displacement vector. Now the problem reduces to finding the intersection between the half-line from the point and the octagon, which is relatively easy.

Related