0

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.

curiouscupcake
  • 1,157
  • 13
  • 28
  • Are boxes axis-aligned? – MBo Sep 07 '22 at 15:32
  • I assume pose and velocity are constant? – Reinhard Männer Sep 07 '22 at 15:34
  • @ReinhardMänner yes – curiouscupcake Sep 07 '22 at 16:47
  • Look at this approach (works for 3d too): https://stackoverflow.com/questions/37120222/2d-moving-object-collision/37122292#37122292 – MBo Sep 07 '22 at 17:02
  • @MBo I must revise my answer, the bounding boxes don't have to be axis-aligned (that why the boxes carry information about pose) – curiouscupcake Sep 07 '22 at 18:07
  • In this case you can consider using of Separating Axis Theorem. [Example of application to inverse problem](https://stackoverflow.com/questions/71785354/resolve-colliding-rotated-rectangles-by-moving-along-vector/71786919#71786919) - taking moment of separation – MBo Sep 07 '22 at 18:18
  • first I would start with simple time and position of collision estimation (handling shapes as points and finding when they closer than their sum of radiuses) see [Collision detection between 2 "linearly" moving objects in WGS84](https://stackoverflow.com/a/41123777/2521214) just ignore the WGS84 stuff. and then find the "real" intersection point on both shapes after that fit the time to precision you need – Spektre Sep 08 '22 at 07:31

1 Answers1

0

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.