OpenDriveLab / UniAD

[CVPR 2023 Best Paper Award] Planning-oriented Autonomous Driving
Apache License 2.0
3.39k stars 371 forks source link

question about the trajectories #143

Closed tangtaogo closed 11 months ago

tangtaogo commented 11 months ago

Thank you for your outstanding work! I have some questions about the visualization of trajectories.

  1. The first question is why the future_xy needs to be multiplied by the rotation of the box, not just by the center of the box. https://github.com/OpenDriveLab/UniAD/blob/3643c68f8305d1531057ef973df06c45a5de229b/tools/analysis_tools/visualize/render/bev_render.py#L53

  2. The second question is why the pred_traj needs to be multiplied by a 90 degree rotation, which is very confusing https://github.com/OpenDriveLab/UniAD/blob/3643c68f8305d1531057ef973df06c45a5de229b/tools/analysis_tools/visualize/render/bev_render.py#L109

Actually, the problem is that I am quite confused about the coordinate systems of these tasks (the bbox of det, the seg, the pred_traj, and the planning). Aren't they all in the Lidar coordinate system?

I greatly appreciate your assistance and eagerly await your response.

Yihanhu commented 11 months ago

Hi @tangtaogo , Yes, you are correct. bbox of det, the seg, and the planning are all in the Lidar coordinate system. The pred_traj is a bit tricky, it is in agent-centric coordinate but without rotation. 'future_xy_local' is in agent-centric frame, so it needs to offset the translation and rotation for visualization. For BEV rendering, due to the coordinate system used in rendering, we need to perform some rotations on the trajectory to align it with the dense BEV feature.

tangtaogo commented 11 months ago

Oh, got it! Thanks for your patient explanation!