nuplan-devkit icon indicating copy to clipboard operation
nuplan-devkit copied to clipboard

function _project_from_global_to_ego_centric_ds seems wrong about the y-axis direction

Open Zigned opened this issue 1 year ago • 0 comments

Describe the bug

The function _project_from_global_to_ego_centric_ds in /nuplan/planning/simulation/planner/ml_planner/transform_utils.py seems wrong about the y-axis direction. This function is used to project value from the global xy frame to the ego centric ds frame (i.e., vehicle coordinate system, right?). However, the original code seems to assume left-handed coordinates: line 69, values_lat = values[:, :1] * np.sin(headings) - values[:, 1:2] * np.cos(headings) If I am right, the dynamic state in EgoState is in a right-handed frame. So, should this line be changed to the following? values_lat = - values[:, :1] * np.sin(headings) + values[:, 1:2] * np.cos(headings)

Zigned avatar Apr 01 '24 08:04 Zigned