pyrobosim.utils.polygon.box_to_coords
- pyrobosim.utils.polygon.box_to_coords(dims, origin=[0, 0], ang=0)
Converts box dimensions and origin to a Shapely compatible list of coordinate tuples.
- Parameters:
dims ((float, float)) – The box dimensions (width, height).
origin ((float, float), optional) – The box (x,y) origin
ang (float, optional) – The angle to rotate the box, in radians.
- Returns:
A list of 2D coordinate representing the polygon.
- Return type:
list[(float, float)]
Example:
coords = box_to_coords(dims=[2.5, 2.5], origin=[1, 2], ang=0.5)