apollo icon indicating copy to clipboard operation
apollo copied to clipboard

About preview control in LatController

Open schietau opened this issue 7 years ago • 1 comments

Hello, I have a question about the preview control in LatController of Apollo. In the function LatController::UpdateState(), for the calculation of preview point's error, the code is written as: for (int i = 0; i < preview_window_; ++i) { const double preview_time = ts_ * (i + 1); const auto preview_point = trajectory_analyzer_.QueryNearestPointByRelativeTime(preview_time); const auto matched_point = trajectory_analyzer_.QueryNearestPointByPosition( preview_point.path_point().x(), preview_point.path_point().y()); const double dx = preview_point.path_point().x() - matched_point.path_point().x(); const double dy =preview_point.path_point().y() - matched_point.path_point().y();

But it seems that the preview_point and matched_point are same. so what's the difference between this two points. Who can tell me, thanks very much!

schietau avatar Dec 17 '18 13:12 schietau

I have the same doubt, this will lead to matrix_state_(4, 0) until matrix_state_(matrix_size_-1, 0) all filled with 0, this makes no sense at all. Could anybody tell me any reference papers / books about this preview window? Thank you very much.

Freiheit1992 avatar Apr 30 '19 06:04 Freiheit1992