diff --git a/src/ypspur_ros.cpp b/src/ypspur_ros.cpp index 417a69f..07fb522 100644 --- a/src/ypspur_ros.cpp +++ b/src/ypspur_ros.cpp @@ -1032,9 +1032,10 @@ class YpspurRosNode joint.header.stamp = ros::Time(t); } - if (!avoid_publishing_duplicated_joints_ || (joint.header.stamp > previous_joint_stamp_)) + if (!avoid_publishing_duplicated_joints_ || (joint.header.stamp > previous_joints_stamp_)) { pubs_["joint"].publish(joint); + previous_joints_stamp_ = joint.header.stamp; }