huawei-noah / SMARTS

Scalable Multi-Agent RL Training School for Autonomous Driving
MIT License
909 stars 184 forks source link

export RoadMaps to Sumo format #1439

Open sah-huawei opened 2 years ago

sah-huawei commented 2 years ago

Since SUMO supports lots of different options/complexity for defining traffic, but our SumoTrafficSimulation class only support SUMO road-networks, it would be useful to be able to convert scenarios with OpenDrive or Waymo RoadMap objects to the SUMO road-network format.

This shouldn't be as hard as the last time we considered this now that we have the ability to natively handle these formats. That is, we handle most of the necessary complexity in loading these into RoadMap objects. So ideally, we could add some sort of export() method to the WaymoMap and OpenDriveRoadNetwork classes which takes a path and serializes the data structure into xml in a specified map.net.xml file.

While we're at it, we can also add an option to the waymo_utility script to support exporting a Waymo scenario with a SUMO map file.

This will allow users who want the more complex traffic simulation capabilities provided by SUMO to quickly create maps for it if they already have scenarios with maps in other formats.

sah-huawei commented 2 years ago

Work here is ongoing in the road_map_export branch. (Just making a note here since it's been tabled for a bit, but quite a bit of progress was already made on that branch.)