autocore-ai / MapToolbox

Plugins to make Autoware vector maps in Unity
GNU Lesser General Public License v3.0
252 stars 98 forks source link

Lat Lon in Lanelet2 #57

Closed gnykumar closed 3 years ago

gnykumar commented 3 years ago

Hi Team / @MoeLang ,

I am learning and exploring a lot from this tool while utilizing vector map and lanelet2 map. Thanks for the tool.

I seen autoware lanelet loader and visualizer at autoware lanelet2 along with sample lanelet2 map. There is lat lon values in map but from the map I am generating from MapToolbox doesn't have lat lon, I can see that there is no reference to provide that while or after annotating. To use the Lanelet2 lib for path planning, lat lon would be required, If someone helps me to get lat lon from MapToolbox based annotated lanelet2 map It will be great.

Thanks in Advance

For your information, I found another tool called assure mapping tool using which we can add projection information but map is getting changed a lot which is again not usable.

kuzen commented 3 years ago

Hi! You can refer to this pull request #63.

gnykumar commented 3 years ago

HI @kuzen ,

I tried your Modification for JOSM from https://github.com/GDUT-IIDCC/MapToolbox

But I am getting the below error for saving the Lanelet2 map

unity_save_error

kuzen commented 3 years ago

HI @kuzen ,

I tried your Modification for JOSM from https://github.com/GDUT-IIDCC/MapToolbox

But I am getting the below error for saving the Lanelet2 map

unity_save_error

Did you replace these files? And remember to restart Unity.

MapToolbox/Runtime/PCL/Geographic.dll
MapToolbox/Runtime/PCL/GeographicWarpper.dll
gnykumar commented 3 years ago

Hi @kuzen , Those files are already there in your repo. I will pulled it newly and tried. But it is closing the application at Runtime upon clicking saving. unity_save_error_2

kuzen commented 3 years ago

Hi @gnykumar.

  1. What coordinate system is the point in PCD (MRGS or UTM)? This modified version is suitable for pcd in MGRS coordinate. If you need to generate lanelet2 for pcd in UTM coordinates, you can modify line 113 in Node.cs.
  2. Please confirm that your mgrs_code is correct.
gnykumar commented 3 years ago

@kuzen Ok Thanks, I Understood. And Currently, Map is not in MRGS or UTM. It is in local coordinates starting position will be origin. But How to get PCD Map in MGRS Coordinate system. Long back we tried for UTM but face an issue in floating-point precision. Where in higher values, the PCD map was getting sparsed in points in the map.

Is there is any standard way that I can add MRGS coordinate to PCD?

We uses NDT, LIOSAM, LEGO LOAM for building PCD Map.

And for UTM coordinates, in Node.cs line 113, What should I change to get it.

kuzen commented 3 years ago

@gnykumar Just move the coordinate point. (x+x0, y+y0) example (https://www.earthpoint.us/Convert.aspx): point in UTM: 49Q 712345.12mE 2567890.34mN point in MGRS: 49QGF12345126789034 point in PCD: 12345.12 67890.34 mgrs_code: 49QGF

gnykumar commented 3 years ago

Thanks @kuzen