HighwayEnv
HighwayEnv copied to clipboard
Generate polygonal obstacle
Hi Mr.Leurent ! I want to enrich some parking scenarios like the pictures below ,but these scenarios require some polygonal obstacles as well an initial point(green rectangle) and an end point(red rectangle). Is there any interface that I can use to generate those polygonal obstacles ? Thanks !
Additionally, these obstacles are made of a set of given points (e.g. X = [1, 2, 3] Y = [4, 5, 6])
Hi, The codebase currently only supports rectangle objects, but it should be quite easy to add support for polygons, especially since:
- The rendering code can easily be replaced to draw polygons: https://github.com/eleurent/highway-env/blob/9e3649dfc53d253185705e62484b5595692ebbb2/highway_env/vehicle/graphics.py#L69
- The collision detection code already supports polygons: https://github.com/eleurent/highway-env/blob/9e3649dfc53d253185705e62484b5595692ebbb2/highway_env/utils.py#L174