Custom Map Configuration
September 3, 2024 ยท View on GitHub
Environment Setup
- Set up the Python environment for MapTR and LimSim.
- Install the
nuscenes-devkitPython package and modify the map_api.py file. Replace the existing map_api.py located atminiconda3/envs/[env_name]/lib/python3.8/site-packages/nuscenes/map_expansion/map_api.pywith the map_api.py provided in this directory. - Install
SUMOon your system.
Workflow
- Select a map area from OpenStreetMap:
Once completed, the SUMO main interface will open. After confirming that everything is correct, you can close the interface. A folder named with the format yyyy-mm-dd-hh-mm-ss should now appear in the networkFiles/ directory where you ran the command. Navigate to this folder and extract the osm.net.xml.gz file to obtain the osm.net.xml file. Rename the folder to location name, such ascd ./TrafficManager/networkFiles/ $SUMO_HOME/tools/osmWebWizard.pylocation.
2. Generate traffic flow information: Navigate to the folder and generate the traffic flow data.
cd ./TrafficManager/networkFiles/location
$SUMO_HOME/tools/randomTrips.py -n osm.net.xml.gz -e 300 -r osm.rou.xml -p 0.5
3. Convert the XML file to the NuScenes map data format and save it as a JSON file:
# under DriveArena root dir
python ./TrafficManager/xml_explain2HD.py --map_name location --root_dir ./TrafficManager/networkFiles
4. Modify the configuration and run: Update the relevant fields in the config.yaml file:
map:
name: 'location' #'boston-seaport'
Run the code:
# under DriveArena root folder
python ./TrafficManager/sim_manager.py