metadriverse / metadrive

MetaDrive: Open-source driving simulator
https://metadriverse.github.io/metadrive/
Apache License 2.0
797 stars 112 forks source link

Set max curve radius in BIG_BLOCK_SEQUENCE #671

Open mimi89999 opened 8 months ago

mimi89999 commented 8 months ago

Hello, I noticed that the curves generated by BIG_BLOCK_SEQUENCE are very tight. Would it be possible to set the maximum curve radius?

QuanyiLi commented 8 months ago

We didn't expose that API. The Curve block has a class parameter PARAMETER_SPACE specifying which space the parameters should be sampled. You can check its configuration at metadrive/component/pg_space/BlockParameterSpace.

mimi89999 commented 8 months ago

Is there any better way to generate a map then? Neither the MapGenerateMethod.PG_MAP_FILE type nor the map json file aren't really documented.

QuanyiLi commented 8 months ago

Ideally, there should be something like a map editor. But we don't have it yet even if our backend supporters various map generation. The most user-friendly APIs are the ScenarioMap and ScenarioBlock which allow constructing a map from a list of map features including lane center lines/solid lines/dashed lines/crosswalks/sidewalks and so on. It has been used to construct the Waymo Map, nuScenes map, SUMO map, and OpenDrive map before. So it has a good compatibility. Or you can refer to the multi-agent environments where the maps are generated by combining several blocks manually.