hustvl / VAD

[ICCV 2023] VAD: Vectorized Scene Representation for Efficient Autonomous Driving

Home Page:https://arxiv.org/abs/2303.12077

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue regarding the calculation of ego_lcf_feat

tangtaogo opened this issue · comments

Thanks for your great work!
According to your code, velocity is calculated based on the ego's coordinates in the global frame (

ego_lcf_feat[:2] = np.array([ego_vx, ego_vy]) #can_bus[13:15]
), so I understand that velocity is in the global coordinate system.

However, acceleration is obtained from can_bus data (

ego_lcf_feat[2:4] = can_bus[7:9]
), and according to https://github.com/nutonomy/nuscenes-devkit/blob/master/python-sdk/nuscenes/can_bus/README.md, can_bus data is in the ego's coordinate system.

I would like to ask why the coordinates are inconsistent. Could it be that my understanding is incorrect?

ego_v is the absolute velocity of the ego vehicle, which is the same under the global coordinate system or the ego coordinate system:

ego_v = np.linalg.norm(ego_pos[:2] - ego_pos_prev[:2]) / 0.5

and the x, y in ego_vx and ego_vy do not mean the axis of the global coordinate system, but the lateral and longitudinal velocity of the ego vehicle, which is calculated here:
ego_vx, ego_vy = ego_v * math.cos(ego_yaw + np.pi/2), ego_v * math.sin(ego_yaw + np.pi/2)

Oh, got it! Thanks for your patient explanation!