aurora-opensource / streetscape.gl

Visualization framework for autonomy and robotics data encoded in XVIZ

Home Page:http://www.streetscape.gl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discrepancy between IDENTITY and GEOGRAPHIC coordinate systems

aharmat opened this issue · comments

I'm visualizing the pose of a vehicle and some circle markers near the vehicle using XViz and Streetscape, and am having problems with where these entities are drawn on a 3D map when using the IDENTITY coordinate system. The following illustrates the problem:
image

The yellow box is the vehicle, and the purple circle markers lie on the vehicle's recent trajectory. These are all drawn in the IDENTITY coordinate system, by setting a fixed map_origin on the /vehicle_pose stream, and then setting the position of the vehicle and circles as East and North meters from the map origin.

The light blue circle markers are based on the exact same data as the purple markers, except they have been converted to GEOGRAPHIC coordinates using GeographicLib::LocalCartesian, using the exact same map origin as above, before being sent out by XViz.

Clearly, there is a big difference between the light blue and purple circle markers; the light blue markers are correct, as corroborated by other geographic data, such as the path markers we have labeled beforehand (dark blue lines), and our personal knowledge of where the vehicle was located. This example is ~2 Km from the map origin; at closer distances, the error between the GEOGRAPHIC and IDENTITY markers is less pronounced.

My questions are:

  1. Am I using the IDENTITY coordinate system correctly?
  2. If so, what is causing the big discrepancy between the markers rendered in the two coordinate systems? My hunch is that it has something to do with Web Mercator projection, but I'm stumped beyond this.