Skip to content

Commit

Permalink
update joint_state_controller rate test to account for extra publishe…
Browse files Browse the repository at this point in the history
…d message
  • Loading branch information
Bryan authored and bmagyar committed Oct 27, 2023
1 parent ae501ec commit 67b0e72
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ TEST_F(JointStateControllerTest, publishOk)
// NOTE: Below we subtract the loop rate because the the published message gets picked up in the
// next iteration's spinOnce()
const ros::Duration real_test_duration = ros::Time::now() - start_time - loop_rate.expectedCycleTime();
rec_msgs_-=1; //joint_state_controller now publishes on first update(), leading to an extra message (ie. 11 message for 10 intervals)
const double real_pub_rate = static_cast<double>(rec_msgs_) / real_test_duration.toSec();

// The publish rate should be close to the nominal value
Expand Down

0 comments on commit 67b0e72

Please sign in to comment.