0
$\begingroup$

Rosanswers logo

Description: I create a pcd file by lidar slam, and create a lanelet2 hd map by Autoware online map tool(i double checked my MGRS cooridinate, and i do followed the instruction in lanelet2 provider located in AutowareAuto in map edit part), Then i can run simulation planning and mpc control only rely lanelet2 map and simulation node, seems the map is working and everything working fine now . Then i want to geo-align pcd map and lanelet2 map in rviz just like AVP demo, then i picked a cooridinate(WGS84) in some online map (i double checked the coordinate about latitude/longitude/altitude ), then provide this cooridinate 'param yaml ' for lanelet2 provider and Map publisher node, THEN i launch rviz2, BUT !! THE lanelet2 Marker is not located in MAP origin LIKE AVP DEMO, AND the PCD(viz_ndt_map which published by map publisher) located in map origin.

THE Lanelet2 Marker is 90000m(y), -3000(x)m FAR AWAY from pointcloud map(located in map's frame origin) , anybody can give some clue ?

************** Solution ***************

The lanelet2 is base on an Rough approximation MGRS coordinate, what you should do:

1: transform your MGRS (you uesed to create lanelet2 map) to wgs84 (mgrs_latitude, mgrs_longitude)

2: get real WGS84 coordinate for your map origin (wgs84_latitude, wgs84_longitude)

3: calcuated offset value: offset_latitude = mgrs_latitude - wgs84_latitude, offset_longitude = mgrs_longitude - wgs84_longitude;

4: fill param file for lanelet2_map_provider

pcd map and lanelet2 map are in same coordinate in map frame !

Node: the reason about this is when we createing lanlet2 map, we use Rough approximation MGRS coordinate, but it not real coordinate, since it already wiried in xxx.osm file, we can't modified it, then when we use an real wgs84 coordinate as it's UTM origin, there will generate a huge gap between lanelet2 map and it origin(wgs84 coorinate), but when you add an offset , we change the wgs84 origin to it's creating origin( BUT IT'S STILL NOT TRUE ORIGIN), there is no gap between this two cooridinate.


Originally posted by utopia_david on ROS Answers with karma: 11 on 2021-12-03

Post score: 1


Original comments

Comment by Mike Scheutzow on 2021-12-04:
Please copy/paste your solution into the answer field, and click the checkmark if you want to.

Comment by utopia_david on 2022-01-30:
OK~~~~~~~~~

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi

The answer you provided in the post unfortunately did not work for me. However I found a simpler way to resolve this issue.

You simply need to get MGRS of your location for example for lat, lon: 50.86095, 11.71346 the MGRS is: 32U PB 90956 37870

Then you put the MGRS square: 32U PB in the map in Vector Map Builder and set in the map config file lat, lon of the origin of that MGRS in this example that would be: 50.54338, 10.41134

And set the offset for lat, lon in lanelet2_map_provider.param.yaml to 0.0

Hope it is helpfull for anyone having thiss isue in the future


Originally posted by TopRamen with karma: 36 on 2022-01-10

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.