提交 e7dbf281 编写于 作者: L Liangliang Zhang 提交者: Dong Li

Planning: only estimate current vehicle state if the time difference is small. (#1410)

上级 9c76508a
......@@ -209,7 +209,12 @@ void Planning::RunOnce() {
VehicleStateProvider::instance()->vehicle_state();
// estimate (x, y) at current timestamp
if (FLAGS_estimate_current_vehicle_state) {
// This estimate is only valid if the current time and vehicle state timestamp
// differs only a small amount (20ms). When the different is too large, the
// estimation is invalid.
DCHECK_GT(start_timestamp, vehicle_state.timestamp());
if (FLAGS_estimate_current_vehicle_state &&
start_timestamp - vehicle_state.timestamp() < 0.020) {
auto future_xy = VehicleStateProvider::instance()->EstimateFuturePosition(
start_timestamp - vehicle_state.timestamp());
vehicle_state.set_x(future_xy.x());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册