ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

lanelet2 map and pcd map didn't match in map frame

asked 2021-12-03 10:09:44 -0500

utopia_david gravatar image

updated 2021-12-04 01:42:20 -0500

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.

edit retag flag offensive close merge delete

Comments

Please copy/paste your solution into the answer field, and click the checkmark if you want to.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-12-04 08:49:40 -0500 )edit

OK~~~~~~~~~

utopia_david gravatar image utopia_david  ( 2022-01-30 08:24:47 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-01-10 10:44:58 -0500

TopRamen gravatar image

updated 2022-01-10 10:46:50 -0500

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

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-12-03 10:09:44 -0500

Seen: 495 times

Last updated: Jan 10 '22