Skip to content

Commit fa83a4e

Browse files
Set precision in debug output
1 parent e34c025 commit fa83a4e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

joint_trajectory_controller/test/test_trajectory_controller_utils.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -708,9 +708,9 @@ class TrajectoryControllerTest : public ::testing::Test
708708
{
709709
EXPECT_TRUE(is_same_sign_or_zero(
710710
position.at(i) - pos_state_interfaces_[i].get_optional().value(), joint_vel_[i]))
711-
<< "test position point " << position.at(i) << ", position state is "
712-
<< pos_state_interfaces_[i].get_optional().value() << ", velocity command is "
713-
<< joint_vel_[i];
711+
<< std::fixed << std::setprecision(2) << "test position point " << position.at(i)
712+
<< ", position state is " << pos_state_interfaces_[i].get_optional().value()
713+
<< ", velocity command is " << joint_vel_[i];
714714
}
715715
}
716716
if (traj_controller_->has_effort_command_interface())
@@ -720,9 +720,9 @@ class TrajectoryControllerTest : public ::testing::Test
720720
EXPECT_TRUE(is_same_sign_or_zero(
721721
position.at(i) - pos_state_interfaces_[i].get_optional().value() + effort.at(i),
722722
joint_eff_[i]))
723-
<< "test position point " << position.at(i) << ", position state is "
724-
<< pos_state_interfaces_[i].get_optional().value() << ", effort command is "
725-
<< joint_eff_[i];
723+
<< std::fixed << std::setprecision(2) << "test position point " << position.at(i)
724+
<< ", position state is " << pos_state_interfaces_[i].get_optional().value()
725+
<< ", effort command is " << joint_eff_[i];
726726
}
727727
}
728728
}

0 commit comments

Comments
 (0)