waymo-open-dataset icon indicating copy to clipboard operation
waymo-open-dataset copied to clipboard

HD Map Lane Gabs

Open St3ff3nBusch opened this issue 11 months ago • 3 comments

Hi, I am using the Waymo dataset to evaluate the map accuracy, I noticed gaps inside the map. I extracted the maps center lines and vehicle trajectories by iterating the scenarios with the following code:

dataset = tf.data.TFRecordDataset(os.path.join(FILEPATH,file), compression_type='')
proto_string = dataset[0].numpy()
s = scenario_pb2.Scenario()
s.ParseFromString(proto_string)
trajectories=[]
for t in  s.tracks:
           if(t.object_type!= 1):
               continue
           pts=[]
           for i in range(len(t.states)):
               p=t.states[i]
               if p.valid:
                   ti=-1
                   if i<len(s.timestamps_seconds):
                       ti=s.timestamps_seconds[i]
                   pts.append((ti,p.center_x,p.center_y,p.center_z,p.length,p.width,p.height,p.heading))
           if(len(pts)>1):
               pts=np.asarray(pts)
               if np.linalg.norm(pts[0,1:3]-pts[-1,1:3])<3:##filter standing vehicles
                   continue
           trajectories.append(pts)
    lanes=[]
    for m in s.map_features :
           pts=[]
           for p in m.lane.polyline:
               pts.append((p.x,p.y,p.z))
           if len(pts)>0:
               lanes.append(pts)

Did I extract the lanes wrongly or are their gabs within the map? The following images show these gabs for the scene 5dd6e5a18d4a8bde (uncompressed/scenario/training_20s), lanes in blue and moving vehicle trajectories in red.

waymo_total waymo_zoomed Regards Steffen

St3ff3nBusch avatar Mar 05 '24 13:03 St3ff3nBusch

We will take a look at this scenario.

scott-ettinger avatar Mar 18 '24 19:03 scott-ettinger

Thanks for bringing this issue to our attention.

In this case, the lanes you are referring to are not vehicle lanes. They are bike lanes but they are labeled as TYPE_UNDEFINED. It is incorrect on our part to publish these as TYPE_UNDEFINED. Bike lanes are not guaranteed to be continuous. Notice that the discontinuous lanes are very close to the road edges. It appears that the vehicles in those lanes are parked (or parking). These are likely old lane markings that should not be in the map.

We will look into how common this issue is within the data (we believe this should be rare). I think for now a valid strategy is to ignore any lanes of TYPE_UNDEFINED.

scott-ettinger avatar Mar 18 '24 20:03 scott-ettinger

I would also point you to this function in the open dataset code base to plot the map data. It can be used with both the motion and perception data and provides a 3D interactive view of the map data.

scott-ettinger avatar Mar 18 '24 20:03 scott-ettinger