Ask Your Question

How to align point cloud map and vector map or kml map

asked 2021-06-04 17:18:03 -0500

yougeyxt gravatar image

updated 2021-06-04 21:11:06 -0500

Hi all,

I would like to build a vector map (or kml map) to use in Autoware 1.13 + Open Planner 2.0. Currently, I have a opendrive format map (.xodr) and a point cloud map (generated using NDT mapping and I have its origin location lat, lon).

To convert the opendrive format map into vector map (or .kml map for open planner), I followed these steps:

  1. use ASSURE v0.6 tool @Hatem build to convert opendrive map (.xodr) to lanelet2 map (.osm) and Open Planner kml map (.kml). When loading the opendrive map, I choose UTM projection and used the lat, lon from the opendrive geoReference information (in the header of .xodr file). Here noted that this lat, lon is not the same as the point cloud origin map lat, lon (I also tried using the origin lat, lon but the results also not aligned).

  2. use the tool provided by Autoware to convert the lanelet2 map generated in the first step to the vector map. Here I set the lat, lon using the origin of the point cloud map. The detailed command I use is the one in the above tool :

rosrun lanelet_aisan_converter lanelet2aisan _map_file:=<path to="" lanelet="" map=""> _origin_lat:=<latitude of="" origin="" for="" xyz="" projection=""> _origin_lon:=<longitude of="" origin="" for="" xyz="" projection=""> _save_dir:=<optional: path="" to="" save="" dir="">

However, the point cloud map and vector map are not aligned with each other (with offset and also rotation).

Any comments and suggestions are appreciated. Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-06-07 01:46:43 -0500

Hatem gravatar image

updated 2021-06-07 02:03:59 -0500


I added a new function in the assure mapping tool to enable translating the road network map. No rotation supported.

fixing alignment issue if not trivial, specially if you have a rotation offset. I suggest you rebuild your open drive on top of the the point cloud.

or when start collecting data from point cloud you start from the origin or at least orientation as the OpenDRIVE map.

You also can transform the point cloud itself, have a look at this code.


edit flag offensive delete link more


Hi Hatem,

  1. Could you please explain a little bit what "at least orientation as the OpenDRIVE map. " means? Since I previously thought the point cloud map contains purely local information and has no orientation information included. Then how to determine/modify the orientation when collecting data?

  2. In my understanding (please correct my if I am wrong), the open drive map contains the real-world road heading (direction) information and I wish to keep it for the downstream application considerations. Then, I should rotate the point cloud map rather than modify the open drive map, is that correct? I will look into the code you provide. Thanks!

Best regards, Xintao

yougeyxt gravatar image yougeyxt  ( 2021-06-07 09:55:34 -0500 )edit
  1. The orientation I am talking about, it is not a component in each point in the map, rather it is the relative orientation to the origin (north, east, west, south). you can rotate any map in the 3D space around any point in 3 direction (yaw, pitch, roll)

The if both pointcloud and opendrive maps has same origin, then this is easy just rotate one of them around that origin with the negative of the angle error. If not, then you need to translate both to one common origin (one exact location in both maps) , then after translate you can try to find the rotation angle (yaw) .

  1. All depends on which you had first (pointcloud or opendrive) , you need to use one to create the other one so you have one reference map and inherently one origin.


Hatem gravatar image Hatem  ( 2021-06-08 00:41:17 -0500 )edit

Hi Hatem,

Thanks for your reply!

For those who have the same question: I use the pcl-tool Hatem mentioned to rotate and translate the point cloud map to tackle the issue.

yougeyxt gravatar image yougeyxt  ( 2021-06-08 21:44:07 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-06-04 17:18:03 -0500

Seen: 298 times

Last updated: Jun 07 '21