Skip to content

Commit

Permalink
joint_features test: reduce console spam (#543)
Browse files Browse the repository at this point in the history
This sets console verbosity to zero when passing NaN
commands in the test to reduce console spam.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters authored Sep 20, 2023
1 parent 6a21a96 commit 80aaef1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/common_test/joint_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ TYPED_TEST(JointFeaturesTest, JointSetCommand)
// Check that invalid velocity commands don't cause collisions to fail
for (std::size_t i = 0; i < 1000; ++i)
{
// Silence console spam
gz::common::Console::SetVerbosity(0);
joint->SetForce(0, std::numeric_limits<double>::quiet_NaN());
gz::common::Console::SetVerbosity(4);
// expect the position of the pendulum to stay above ground
world->Step(output, state, input);
auto frameData = base_link->FrameDataRelativeToWorld();
Expand Down Expand Up @@ -178,7 +181,10 @@ TYPED_TEST(JointFeaturesTest, JointSetCommand)
// Check that invalid velocity commands don't cause collisions to fail
for (std::size_t i = 0; i < 1000; ++i)
{
// Silence console spam
gz::common::Console::SetVerbosity(0);
joint->SetVelocityCommand(0, std::numeric_limits<double>::quiet_NaN());
gz::common::Console::SetVerbosity(4);
// expect the position of the pendulum to stay above ground
world->Step(output, state, input);
auto frameData = base_link->FrameDataRelativeToWorld();
Expand Down

0 comments on commit 80aaef1

Please sign in to comment.