Is it possible to know the lon/lat coordinates of the origin points of the maps, in order to make a conversion between the ego_pose coordinates and GPS ones?
Lon/Lat of origin points
At the moment all I can offer you is the lat/lon coordinate of the map origin:
Given the fact that the map unit is 1m you could then approximate lat/lon.
Hi,
Is the map frame of reference aligned with the UTM coordinate axis (i.e. is there any rotation from map to UTM coordinates or just mere translation)? Will be helpful in converting ego to GPS coordinates
The coordinate frame is aligned and the units are meters.
However, there may be some minor local deformations in the map.
Hello, I tried to align four maps in nuscene with openstreetmap, using the latitude and longitude origin of the four maps to map the osm map to the coordinate system of the four maps, and found that the three maps of Singapore are well aligned, while the one of Boston keeps having an offset, as in the image below. I tried to manually adjust the origin and found that there also seems to be a scale scaling, is there a problem with Boston’s origin data?
Here is the code I used for the coordinate conversion:
# read osm file
sd_map = gpd.read_file('osm/boston-seaport.shp')
name = 'boston-seaport'
proj = 3857 # nuscenes/map_expansion/map_api.py:line59
sd_map = sd_map.to_crs(proj)
# ref:https://github.com/nutonomy/nuscenes-devkit/issues/144#issuecomment-505377023
map_origin_df = pd.DataFrame(
{'City': ['boston-seaport', 'singapore-onenorth', 'singapore-hollandvillage', 'singapore-queenstown'],
'Latitude': [42.336849169438615, 1.2882100868743724, 1.2993652317780957, 1.2782562240223188],
'Longitude': [-71.05785369873047, 103.78475189208984, 103.78217697143555, 103.76741409301758]})
map_origin_gdf = gpd.GeoDataFrame(
map_origin_df, geometry=gpd.points_from_xy(map_origin_df.Longitude, map_origin_df.Latitude), crs=4326)
print(map_origin_gdf.head())
map_origin_gdf = map_origin_gdf.to_crs(proj) # coordinates convert to nuScenes's crs
# to shapely MultiLine
sd_map = MultiLineString(list(sd_map.geometry))
# to nuScenes map
origin = (map_origin_gdf.geometry[0].x, map_origin_gdf.geometry[0].y)
matrix = [1.0, 0.0, 0.0, 1.0, -origin[0], -origin[1]]
new_sd_map = affine_transform(sd_map, matrix) # osm map we want in nuscenes coordinates