From 407fbc8bf9b8aedce8c301779bffae071a19c44f Mon Sep 17 00:00:00 2001 From: fixposition-support Date: Wed, 28 Aug 2024 17:11:56 +0200 Subject: [PATCH] Fixed invalid TF check (#66) * Fixed invalid TF check * Improved syntaxis --------- Co-authored-by: Facundo Garcia --- fixposition_driver_lib/src/messages/fpa/tf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixposition_driver_lib/src/messages/fpa/tf.cpp b/fixposition_driver_lib/src/messages/fpa/tf.cpp index 7e0d46c..d0bb1e2 100644 --- a/fixposition_driver_lib/src/messages/fpa/tf.cpp +++ b/fixposition_driver_lib/src/messages/fpa/tf.cpp @@ -68,7 +68,7 @@ void FP_TF::ConvertFromTokens(const std::vector& tokens) { tokens.at(orientation_y_idx), tokens.at(orientation_z_idx)); // Check if TF is valid - if (!tf.rotation.vec().isZero() && !(tf.rotation.w() == 0)) valid_tf = true; + valid_tf = !(tf.rotation.w() == 0 && tf.rotation.vec().isZero()); } } // namespace fixposition