提交 182a3d24 编写于 作者: C Calvin Miao 提交者: Kecheng Xu

Common: fixed some checks in vehicle state

上级 d10836d2
......@@ -127,10 +127,17 @@ bool VehicleStateProvider::ConstructExceptLinearVelocity(
vehicle_state_.set_linear_acceleration(
localization.pose().linear_acceleration_vrf().y());
} else {
CHECK(localization.pose().has_angular_velocity());
if (!localization.pose().has_angular_velocity()) {
AERROR << "localization.pose() has no angular velocity.";
return false;
}
vehicle_state_.set_angular_velocity(
localization.pose().angular_velocity().z());
CHECK(localization.pose().has_linear_acceleration());
if (!localization.pose().has_linear_acceleration()) {
AERROR << "localization.pose() has no linear acceleration.";
return false;
}
vehicle_state_.set_linear_acceleration(
localization.pose().linear_acceleration().y());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册