Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Aditya <[email protected]>
  • Loading branch information
adityapande-1995 committed Mar 27, 2022
1 parent a2dc446 commit 752fdce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/systems/odometry_publisher/OdometryPublisher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 ["
Expand Down Expand Up @@ -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()->
Expand Down
8 changes: 4 additions & 4 deletions test/integration/odometry_publisher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down

0 comments on commit 752fdce

Please sign in to comment.