Skip to content

Workflow to convert an OSM file from OpenStreetMap into a .pcd file, lanelet2 file and a 3D Model suitable for Autoware and AWSIM.

Notifications You must be signed in to change notification settings

zubxxr/AV-Map-Creation-Workflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AV Map Creation Workflow for Autonomous Vehicle Simulations

Best Paper Award - GEOProcessing 2025

Publication and Recognition

This repository supports the paper:

Zubair Islam, Ahmaad Ansari, George Daoud, Mohamed El-Darieby
A Workflow for Map Creation in Autonomous Vehicle Simulations
GEOProcessing 2025 — Awarded Best Paper
Read the full paper

Best Paper Award – GEOProcessing 2025

---

Overview

This repository outlines a simulator-agnostic workflow to create maps for Autonomous Vehicle (AV) simulation testing. It enables the generation of:

  • 3D Mesh Models
  • Point Cloud Data (PCD)
  • Lanelet2 Maps

These outputs are compatible with Autoware and AWSIM, facilitating both virtual AV testing and future real-world deployment. The workflow was designed to address the lack of easily reproducible, parking-lot-sized maps for AVP (Autonomous Valet Parking) research.

Demonstrations have been provided below for each part. This Google Drive also contains all the demonstrations.

Motivation

At the time of this project's development, AWSIM and Autoware only included a single city-scale map, which lacked critical low-speed elements like parking lots. Moreover, existing documentation for map creation was often outdated or platform-dependent (e.g., CARLA, LGSVL).

To address this:

  • Created a custom parking lot map of Ontario Tech University's SIRC campus.
  • Designed a lightweight workflow that avoids heavy simulation dependencies like CARLA.
  • Used open-source, low-resource tools to make the pipeline accessible.

Architecture

Full Workflow Diagram

image

Automated Mapping via Docker

image


Table of Contents

  1. Complete Workflow: Step-by-Step Guide
  2. Workflow Success Demonstration
  3. Related Publication and References
  4. Localization Instability
  5. Limitations

Complete Workflow: Step-by-Step Guide

Each step is supported with visuals and references to the paper and demo videos.

Step 1: Clone the Repository and Set Up the Project Structure

cd ~/
git clone https://github.com/zubxxr/AV-Map-Creation-Workflow
cd AV-Map-Creation-Workflow
mkdir map_files
cd map_files

Step 2: Download the OSM File

Demonstration

Use OpenStreetMap to export your desired location as an OSM file.

  1. Open OpenStreetMap and search for the location you want to create a map for.

  2. Click Export in the top header, then select Manually select a different area on the left side.
    image

  3. Resize the selection area as needed.
    image

  4. Click Export on the left side to download the OSM file. A file named map.osm will be saved in your Downloads folder.

  5. Move the map.osm file into the directory you created earlier:

    mv ~/Downloads/map.osm ~/AV-Map-Creation-Workflow/map_files

Step 3: Generate OBJ Files and PCD Files

This step converts your .osm file into:

  • A Point Cloud Data (PCD) file
  • A 3D Model, consisting of .obj, .mtl, and .png texture files
  1. Navigate to your project workspace:

    cd ~/AV-Map-Creation-Workflow
  2. Create an empty .pcd file. This prevents the Docker container from mistaking the path for a folder:

    touch ~/AV-Map-Creation-Workflow/map_files/pointcloud_map.pcd
  3. Pull the automated Docker container:

    docker pull zubxxr/osm-3d-pcd-pipeline:latest
  4. Run the Docker container to generate the files:

    docker run --rm -it -e QT_QPA_PLATFORM=offscreen \
    -v $(pwd)/map_files/map.osm:/app/map.osm \
    -v $(pwd)/map_files/3D_Model:/app/3D_Model \
    -v $(pwd)/map_files/pointcloud_map.pcd:/app/pointcloud_map.pcd \
    zubxxr/osm-3d-pcd-pipeline /bin/bash
  5. Verify that the output files were generated correctly:

    ls ~/AV-Map-Creation-Workflow/map_files
    ls ~/AV-Map-Creation-Workflow/map_files/3D_Model

    image

  6. Fix file and folder permissions (so you can open/edit them normally):

    sudo chown -R $USER:$USER ~/AV-Map-Creation-Workflow/map_files/3D_Model

Step 4: Create Lanelet2 Map

Demonstration

Tools Required

This tool is used to draw lanes, parking lots, and traffic markings on top of your point cloud.

  1. Import the .pcd file into Vector Map Builder:

    • Go to File > Import PCD > Browse, select the point cloud from Step 3, and click Import.
    • You should now see the point cloud in the editor. image
  2. Go to Create > Create Lanelet2Maps > Change Map Projector Info, and set the projector type to MGRS. image image

  3. To set the correct location, you’ll need the Grid Zone and 100,000-meter square values.

  4. Open your map.osm file and look for any line containing lat and lon attributes. image

  5. Copy any pair of lat and lon values and paste them into this MGRS converter.

  6. The values will look something like this:

    • Grid Zone: 17T
    • 100,000-meter square: PJ

    image image

  7. Enter those values into Vector Map Builder, click Update Map Projector Info, and confirm the popup. image

  8. Begin creating lanelets and any additional map elements such as:

    • Lanes
    • Parking spaces
    • Stop lines

    Resources to help:

Example map

image

Make sure the lanelet2 map is good by exporting it, reimporting it into VMB again, and making sure all the lanelets are correct and not broken. This can happen due to a bug. Next, load the map into Autoware PSIM and make sure all areas of the map are routable.

  1. Export the Lanelet2 map:

    • Go to File > Export Lanelet2Maps
    • Press OK on the popup
    • Click Download
  2. Move the exported .osm file into your project directory:

mv ~/Downloads/new_lanelet2_maps.osm ~/AV-Map-Creation-Workflow/map_files/

Step 5: Nullify Latitude/Longitude

  • Use the included Python script to avoid infinite map stretching in Autoware:
cd ~/AV-Map-Creation-Workflow
python3 remove_lat_lon.py map_files/new_lanelet2_maps.osm map_files/lanelet2_map.osm

Step 6: Import Files to Autoware

Demonstration

Tools Required

After completing the previous steps, your map_files/ directory should contain the following:

  • Point Cloud Map: pointcloud_map.pcd
  • 3D Model Assets:
    • map.obj
    • map.mtl
    • textures/ folder containing .png images
  • Lanelet2 Vector Map: lanelet2_map.osm

These files are now ready to be used with Autoware for simulation or real-world integration.

Example: Lanelet2 Map and Point Cloud Imported into Autoware

Importing Files into Autoware

Step 7: Import to AWSIM

  • Import .obj, .mtl, and .png files into Unity scene by dragging them in from the system file manager into the Assets window image

  • Drag the obj file into the scene and enable read/write permissions on the file image

  • Load and align the Lanelet2 file to synchronize with Autoware. Instructions

Example: Lanelet2 Map and 3D Model Imported into AWSIM

image

Parking lot and vehicles were added in manually.


Workflow Success Demonstration

Initialization in AWSIM and Autoware

image

Planning and Navigation

image

Arrival at Parking Spot

image


Localization Instability

In the case of localization instability, the map may need additional features to help localize. This can be done using a 3D mesh editing tool, such as Blender in this case.

The 3D mesh was loaded in to Blender after the workflow was used and trimmed to remove the unwanted features.

Raw 3D Mesh

image

Trimmed 3D Mesh

image

Next, planar, wall-like structures were then added around the perimeter of the map to provide additional geometry for LiDAR scan matching.

Added Perimeter Walls to Enhance LiDAR Scan Matching

image

The 3D mesh can then be exported again, and re-imported into the workflow to generate the PCD file required by Autoware. This simple yet effective adjustment significantly improved localization performance in previously sparse regions of the map.

Limitations

  • Large OSM maps are not supported:
    This workflow was designed and tested with relatively small OpenStreetMap (OSM) files. It does not currently scale well to large maps due to memory and processing constraints in the conversion and map-building stages. Attempting to process large .osm files may result in performance degradation or failure.

📌 Limitation identified in July 2025.

Troubleshooting

Feel free to open an Issue if there are any problems.

Entering the Container

To manually enter the container for debugging:

xhost +
docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $(pwd)/map_files/map.osm:/app/map.osm --entrypoint bash -it zubxxr/osm-3d-pcd-pipeline

Related Publication and References

This repository is based on the paper:

  • Zubair Islam, Ahmaad Ansari, George Daoud, Mohamed El-Darieby
    "A Workflow for Map Creation in Autonomous Vehicle Simulations", GEOProcessing 2025
    Read Paper

Cited Tools & Techniques:

  • OSM2World
  • CloudCompare
  • Point Cloud Library (PCL)
  • Vector Map Builder
  • Autoware Universe (2024.11)
  • AWSIM Labs

About

Workflow to convert an OSM file from OpenStreetMap into a .pcd file, lanelet2 file and a 3D Model suitable for Autoware and AWSIM.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published