waymo-open-dataset
waymo-open-dataset copied to clipboard
Waymo open motion dataset can't convert roadgraph_samples/type=18 to a crosswalk polygon, just some short lines
I use the fellowing method to convert data:
roadgraph_xyz = decoded_example['roadgraph_samples/xyz'].numpy()
roadgraph_dir = decoded_example['roadgraph_samples/dir'].numpy()
roadgraph_valid = decoded_example['roadgraph_samples/valid'].numpy()
roadgraph_valid_xyz = roadgraph_xyz[np.squeeze(roadgraph_valid>0, axis=-1)]
roadgraph_valid_dir = roadgraph_dir[np.squeeze(roadgraph_valid>0, axis=-1)]
roadgraph_valid_start_xyz = roadgraph_valid_xyz
roadgraph_valid_end_xyz = roadgraph_valid_xyz + 0.5 * roadgraph_valid_dir
than I plot. roadgraph_valid_start_xyz to roadgraph_valid_end_xyz, this method works for polyline objects such as lanecenter or laneboundary, but for crosswalk, there are just some short lines, not a polygon. not as described.
The polygons are not sampled at 0.5 meters as the lane centers and boundaries are. To plot them you need to connect the individual points within the polygon rather than offsetting by 0.5 toward the direction vector. We realize this is a bit inconsistent. We plan to open source the conversion code from Scenario protos to tf.Examples in our next release such that users can customize the sample spacing of road elements to their application.
solve it, thanks very much
solve it, thanks very much
Hi,
Can I ask how do you solve it? In my case, the polygons are not closed... After checking the directions for the last point of the polygon, they are zeros...
solve it, thanks very much
Hi,
Can I ask how do you solve it? In my case, the polygons are not closed... After checking the directions for the last point of the polygon, they are zeros...
just use id to gather points from same polygon and connect the last point with the first one, is will be closed.
Thanks so much!