motional / nuplan-devkit

The devkit of the nuPlan dataset.
https://www.nuplan.org
Other
636 stars 126 forks source link

Why default tracker (LQR) uses the entire trajectory(8s) to determine 1s ahead reference velocity and curvature? #350

Open cfcv opened 10 months ago

cfcv commented 10 months ago

Hello,

Checking a little bit deeper the TwoStage controller code, I observed that the LQRTracker is using the entire trajectory to compute the reference values even though it's look ahead time is just 1s.

It is using least squares in the entire trajectory horizon(8s) to compute acceleration profile which is them used to compute the velocity profile and this latter used to query the reference velocity which is provided to the LQR logic, i.e. Changing points at the end of the horizon (let's say changing a point at 6s) also changes behavior in the short term horizon (as reference velocity provided to the controller wouldn't be the same) even if the controller lookahed is 1s. Same logic for the lateral controller with the curvate profile.

https://github.com/motional/nuplan-devkit/blob/cd3fd8d3d0c4d390fcb74d05fd56f92d9e0c366b/nuplan/planning/simulation/controller/tracker/tracker_utils.py#L90)

Given this context, I am curious to understand the reason behind this choice of using least squares to compute acceleration profile and curvature rate profile using the entire 8s trajectory horizon, is this a default procedure for LQR or it was chosen intentionally? Should long term poses influence short term behavior in closed loop?

Thanks in advance :)