Skip to content

Commit 67b0e72

Browse files
Bryanbmagyar
authored andcommitted
update joint_state_controller rate test to account for extra published message
1 parent ae501ec commit 67b0e72

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

joint_state_controller/test/joint_state_controller_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ TEST_F(JointStateControllerTest, publishOk)
133133
// NOTE: Below we subtract the loop rate because the the published message gets picked up in the
134134
// next iteration's spinOnce()
135135
const ros::Duration real_test_duration = ros::Time::now() - start_time - loop_rate.expectedCycleTime();
136+
rec_msgs_-=1; //joint_state_controller now publishes on first update(), leading to an extra message (ie. 11 message for 10 intervals)
136137
const double real_pub_rate = static_cast<double>(rec_msgs_) / real_test_duration.toSec();
137138

138139
// The publish rate should be close to the nominal value

0 commit comments

Comments
 (0)