hustvl / VAD

[ICCV 2023] VAD: Vectorized Scene Representation for Efficient Autonomous Driving
https://arxiv.org/abs/2303.12077
Apache License 2.0
641 stars 63 forks source link

Issue regarding the calculation of ego_lcf_feat #32

Closed tangtaogo closed 11 months ago

tangtaogo commented 11 months ago

Thanks for your great work! According to your code, velocity is calculated based on the ego's coordinates in the global frame (https://github.com/hustvl/VAD/blob/1ede800a517653837faf78b5ec1c3b5fc3ec77b5/tools/data_converter/vad_nuscenes_converter.py#L508), so I understand that velocity is in the global coordinate system.

However, acceleration is obtained from can_bus data (https://github.com/hustvl/VAD/blob/1ede800a517653837faf78b5ec1c3b5fc3ec77b5/tools/data_converter/vad_nuscenes_converter.py#L509), 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?

rb93dett commented 11 months ago

ego_v is the absolute velocity of the ego vehicle, which is the same under the global coordinate system or the ego coordinate system: https://github.com/hustvl/VAD/blob/1ede800a517653837faf78b5ec1c3b5fc3ec77b5/tools/data_converter/vad_nuscenes_converter.py#L475 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: https://github.com/hustvl/VAD/blob/1ede800a517653837faf78b5ec1c3b5fc3ec77b5/tools/data_converter/vad_nuscenes_converter.py#L480

tangtaogo commented 11 months ago

Oh, got it! Thanks for your patient explanation!