optical_flow: Invalidate previous frame on error

This commit is contained in:
sfalexrog
2019-02-07 00:24:59 +03:00
parent 8f332d8d53
commit 032f49eaa0

View File

@@ -176,6 +176,8 @@ private:
flow_.integrated_ygyro = flow_gyro_fcu.vector.y;
flow_.integrated_zgyro = flow_gyro_fcu.vector.z;
} catch (const tf2::TransformException& e) {
// Invalidate previous frame
prev_.release();
return;
}
}