Tsinghua-MARS-Lab / ViP3D

MIT License
133 stars 19 forks source link

Why compare to Point(0.0, 30.0) in ego coordinate to filter lane points in the get_pred_lanes function? #14

Closed sean-wade closed 10 months ago

sean-wade commented 10 months ago

In dataset.py (line:479, https://github.com/Tsinghua-MARS-Lab/ViP3D/blob/c4a60b01a4b5d68289c1958d2e6935ed73d76964/plugin/vip3d/dataset.py#L478C74-L478C74)

I don't know why calculate the distance between (0.0, visible_y)?

lane = np.array([point for point in lane if get_dis_point2point(point, (0.0, visible_y)) < max_dis])

GentleSmile commented 10 months ago

Because (0.0, visible_y) is at a distance of visible_y meters in front of the ego vehicle. It aims to focus more area in front of the ego vehicle than the area in the back.

sean-wade commented 10 months ago

Because (0.0, visible_y) is at a distance of visible_y meters in front of the ego vehicle. It aims to focus more area in front of the ego vehicle than the area in the back.

But I saw the lane point is normalized before calculate the distance: lane = normalizer(lane) Isn't the new lane point is under ego coordinate? And the y is on the left of ego-vehicle?

GentleSmile commented 10 months ago

It seems that the normalizer does not normalize the direction of the ego vehicle (link, the angle is constant). visible_y should be set to 0.

sean-wade commented 10 months ago

It seems that the normalizer does not normalize the direction of the ego vehicle (link, the angle is constant). visible_y should be set to 0.

So maybe we should use line:452 :

yaw = quaternion_yaw(Quaternion(sample_annotation['rotation']))

instead of using the constant 90.

And the visible_y set to 0?

Maybe set the base point to (30, 0) instead of (0, 30)?

GentleSmile commented 10 months ago

Yes, base point should be (0, 0) or (30, 0). The normalizer should be yaw = Quaternion(cur_e2g_r).yaw_pitch_roll[0] normalizer = utils.Normalizer(agent_x, agent_y, -yaw)

sean-wade commented 10 months ago

Yes, base point should be (0, 0) or (30, 0). The normalizer should be yaw = Quaternion(cur_e2g_r).yaw_pitch_roll[0] normalizer = utils.Normalizer(agent_x, agent_y, -yaw)

OK, thanks a lot!