Skip to content

Commit

Permalink
Fix codecheck (#887)
Browse files Browse the repository at this point in the history
Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>
  • Loading branch information
2 people authored and chapulina committed Jul 23, 2021
1 parent 4bfe48e commit 23e1680
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/systems/diff_drive/DiffDrive.cc
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,7 @@ void DiffDrivePrivate::UpdateOdometry(const ignition::gazebo::UpdateInfo &_info,

// Construct the Pose_V/tf message and publish it.
msgs::Pose_V tfMsg;
ignition::msgs::Pose *tfMsgPose = nullptr;
tfMsgPose = tfMsg.add_pose();
ignition::msgs::Pose *tfMsgPose = tfMsg.add_pose();
tfMsgPose->mutable_header()->CopyFrom(*msg.mutable_header());
tfMsgPose->mutable_position()->CopyFrom(msg.mutable_pose()->position());
tfMsgPose->mutable_orientation()->CopyFrom(msg.mutable_pose()->orientation());
Expand Down
3 changes: 3 additions & 0 deletions test/integration/diff_drive_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ TEST_P(DiffDriveTest, OdomCustomFrameId)

int sleep = 0;
int maxSleep = 30;
// cppcheck-suppress knownConditionTrueFalse
for (; odomPosesCount < 5 && sleep < maxSleep; ++sleep)
{
std::this_thread::sleep_for(std::chrono::milliseconds(100));
Expand Down Expand Up @@ -498,6 +499,7 @@ TEST_P(DiffDriveTest, Pose_VFrameId)

int sleep = 0;
int maxSleep = 30;
// cppcheck-suppress knownConditionTrueFalse
for (; odomPosesCount < 5 && sleep < maxSleep; ++sleep)
{
std::this_thread::sleep_for(std::chrono::milliseconds(100));
Expand Down Expand Up @@ -557,6 +559,7 @@ TEST_P(DiffDriveTest, Pose_VCustomFrameId)

int sleep = 0;
int maxSleep = 30;
// cppcheck-suppress knownConditionTrueFalse
for (; odomPosesCount < 5 && sleep < maxSleep; ++sleep)
{
std::this_thread::sleep_for(std::chrono::milliseconds(100));
Expand Down

0 comments on commit 23e1680

Please sign in to comment.