pyrobosim.utils.polygon.convhull_to_rectangle
- pyrobosim.utils.polygon.convhull_to_rectangle(points: ndarray) tuple[Pose, list[float], ndarray]
Find the smallest bounding rectangle for a set of points. Returns a set of points representing the corners of the bounding box.
- Parameters:
points – an Nx2 matrix of convex hull XY coordinates
- Returns:
A tuple of rectangle origin pose, XY dimensions, and the rectangle points.