提交 2acb77db 编写于 作者: Y Yajia Zhang 提交者: Jiangtao Hu

prediction: temp. fix for nan velocity from perception obstacles

上级 ffe89973
......@@ -491,12 +491,24 @@ void Obstacle::SetVelocity(const PerceptionObstacle& perception_obstacle,
if (perception_obstacle.has_velocity()) {
if (perception_obstacle.velocity().has_x()) {
velocity_x = perception_obstacle.velocity().x();
if (std::isnan(velocity_x)) {
AERROR << "found nan velocity x from perception obstacle";
velocity_x = 0.0;
}
}
if (perception_obstacle.velocity().has_y()) {
velocity_y = perception_obstacle.velocity().y();
if (std::isnan(velocity_y)) {
AERROR << "found nan velocity y from perception obstacle";
velocity_y = 0.0;
}
}
if (perception_obstacle.velocity().has_z()) {
velocity_z = perception_obstacle.velocity().z();
if (std::isnan(velocity_z)) {
AERROR << "found nan velocity z from perception obstacle";
velocity_z = 0.0;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册