diff --git a/src/systems/odometry_publisher/OdometryPublisher.cc b/src/systems/odometry_publisher/OdometryPublisher.cc index 49d22a3604..3ceff4e423 100644 --- a/src/systems/odometry_publisher/OdometryPublisher.cc +++ b/src/systems/odometry_publisher/OdometryPublisher.cc @@ -229,7 +229,8 @@ void OdometryPublisher::Configure(const Entity &_entity, odomTopicValid); } - std::string odomCovTopicValid {transport::TopicUtils::AsValidTopic(odomCovTopic)}; + std::string odomCovTopicValid { + transport::TopicUtils::AsValidTopic(odomCovTopic)}; if (odomCovTopicValid.empty()) { ignerr << "Failed to generate odom topic [" @@ -467,8 +468,7 @@ void OdometryPublisherPrivate::UpdateOdometry( mutable_covariance()->add_data(gn2); msg_covariance.mutable_twist_with_covariance()-> mutable_covariance()->add_data(gn2); - } - else { + } else { msg_covariance.mutable_pose_with_covariance()-> mutable_covariance()->add_data(0); msg_covariance.mutable_twist_with_covariance()-> diff --git a/test/integration/odometry_publisher.cc b/test/integration/odometry_publisher.cc index 949356a488..c3b1455090 100644 --- a/test/integration/odometry_publisher.cc +++ b/test/integration/odometry_publisher.cc @@ -486,8 +486,8 @@ class OdometryPublisherTest int n = odomLinVels.size(); // Calculate the means. - double linVelSumX = 0, linVelSumY = 0, linVelSumZ = 0; - double angVelSumX = 0, angVelSumY = 0, angVelSumZ = 0; + double linVelSumX = 0, linVelSumY = 0, linVelSumZ = 0; + double angVelSumX = 0, angVelSumY = 0, angVelSumZ = 0; for (int i = 0; i < n; i++) { linVelSumX += odomLinVels[i].X(); linVelSumY += odomLinVels[i].Y(); @@ -508,8 +508,8 @@ class OdometryPublisherTest EXPECT_NEAR(angVelSumZ/n, 0, 0.3); // Calculate the variation (sigma^2). - double linVelSqSumX = 0, linVelSqSumY = 0, linVelSqSumZ = 0; - double angVelSqSumX = 0, angVelSqSumY = 0, angVelSqSumZ = 0; + double linVelSqSumX = 0, linVelSqSumY = 0, linVelSqSumZ = 0; + double angVelSqSumX = 0, angVelSqSumY = 0, angVelSqSumZ = 0; for (int i = 0; i < n; i++) { linVelSqSumX += std::pow(odomLinVels[i].X() - linVelSumX/n, 2); linVelSqSumY += std::pow(odomLinVels[i].Y() - linVelSumY/n, 2);