Ask Your Question

# How to match Point Cloud Map with Vector Map in Lanelet2 Format

Hello to everyone;

I want to match the point cloud data and the vector map data in RVIZ. However, they don't match. There are a huge gap between them in RVIZ. For example, the point cloud map is at x = 120, y = 80 in map frame while the vector map is at x = 77515, y = 11469 in also map frame. When I searched the reason of that at internet, I saw that the vector map is located in MGRS coordinate system while the point cloud map is located in arbitrary system. However, I didn't find any solution to match them automatically. Is there anyone having any idea?

Note: I matched them by using static_transform_publisher but it is not a method doing the matching in high accuracy. I want to use any other method doing this process automatically and in high accuracy.

Best regards.

edit retag close merge delete

## Comments

Please take a look at this question: #q379621 as I believe you may find your answer there.

( 2021-10-19 08:02:06 -0500 )edit

## 1 Answer

Sort by ยป oldest newest most voted

The problem you are asking about is one of the difficult issues in robotics: Localization. One of its sub-problems is to take noisy sensor data, and find the best match to a pre-existing map. This has been studied for decades, with no "best" reasonably-quick algorithm discovered for either the flat 2D case, or the 3D case you seem to be asking about. This brief answer should give you enough keywords to search on.

If you have a way to visualize & rescale the 3D data, and you only need to do it a few times, often a human can do this by trial and error far faster than an algorithm can.

more

## Comments

@MikeScheutzow, thanks you for your answer. I tried to project the Lanelet2 by using UTM projector and I added the required origin to the projector correctly.

lanelet::GPSPoint gps_point;
gps_point.lat = 39.72497048;
gps_point.lon = 33.36829990;
lanelet::Origin origin(gps_point);
lanelet::projection::UtmProjector projector(lanelet::Origin(gps_point), true, true);

lanelet::LaneletMapPtr map = lanelet::load(lanelet2_filename, projector, &errors);


This code semi-correctly aligned the HD map to the point cloud map. There is some transitional and rotational offset. However, I am sure that I set the origin correctly.

How can I solve the problem? I don't understand the reason of the problem. I am really sure the values for the origin.

( 2021-10-26 01:24:23 -0500 )edit

I guess I don't understand what you are trying to do. Usually the matching of two data sets is an Error Minimization Problem, but you seem to want to use a different approach.

( 2021-10-26 07:12:08 -0500 )edit

In fact, what I am trying is to match the vector map with point cloud map. While doing this, I used the UTM projector object offered by the lanelet class. And, I added the precisely correct origin data to the projector.

Normally, after adding this precise origin to the projector, and projecting the vector map with this projector, I would expect the matching process must be done except the rotation because I am sure the origin is in the correct place. However, when analyzing again these maps, I see that there is transitional offset between these maps. If there was only rotational difference between them, I would understand that I have to rotate these maps because I did the projection according to the only one point. However, in this situation, although I use correct origin data, there is offset. I don't understand the reason of being offset and I ...(more)

( 2021-10-27 00:40:37 -0500 )edit

## Your Answer

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

Add Answer

## Stats

Asked: 2021-10-19 05:14:47 -0500

Seen: 187 times

Last updated: Oct 20 '21