yarp
yarp copied to clipboard
Throttle error message on inconsistent encoder timestamps
As a follow-up to https://github.com/robotology/yarp/pull/2862, this patch throttles the error message printed whenever an inconsistency in encoder timestamps is detected. The "Encoder timestamps are not consistent! Data will not be published." is logged every few milliseconds and bloats the terminal. I'm using an arbitrary throttle of one second to mitigate this.
@randaz81 I think the nws_ros{.h,.cpp} files at src/devices/ControlBoardWrapper have been accidentally left out after https://github.com/robotology/yarp/pull/2845. Perhaps you want to delete them first, then I can rebase this patch accordingly. As a side note, the consistency check patch from https://github.com/robotology/yarp/pull/2841 was applied to both nws_yarp and nws_ros in the ControlBoardWrapper directory, but the latter was copied into a different location using a version prior to said changes.
As commented in https://github.com/robotology/yarp/pull/2862, I'm still considering other ways to treat (or perhaps disable) consistency checking due to my particular use case.