aurora-opensource / xviz

A protocol for real-time transfer and visualization of autonomy data

Home Page:http://xviz.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Primitive markers and GEOGRAPHIC coordinate system

aharmat opened this issue · comments

I'm having a problem rendering primitive markers (e.g. circles) using the GEOGRAPHIC coordinate system. Here is an example:
Screenshot from 2022-11-14 11-25-47

The yellow robot moved in a smooth manner, but the circle markers showing the recent trajectory are anything but smooth. I tracked the root cause down to the fact that the marker's center field is encoded as a float (https://github.com/aurora-opensource/xviz/blob/master/xviz/v2/primitives.proto#L31), which causes the visible quantization artifacts due to the rounding of latitude and longitude coordinates.

If I manually change the center field to double, the problem is resolved. However, I'm guessing that I'm not the first person to encounter this, so I was wondering: What is the right approach for plotting primitive markers in a map view in streetscape? I tried to use the IDENTITY coordinate frame for this and thought I had success, but when comparing otherwise equivalent entities plotted in the GEOGRAPHIC and IDENTITY coordinate frames, there was a noticable discrepancy (see aurora-opensource/streetscape.gl#564).