Closed kunaltyagi closed 3 years ago
Thanks for the comment. That function calculates interval [in millisecond] between the latest and the second latest packets. The data packet coming from WHILL CR itself contains an one-byte "timestamp [in millisecond]" which is a circular counter with max value of 201.
Note: Why "201"? It is an implementation error in its firmware and will be fixed in the next release. (Both firmware and this ros_whill package.)
The values I've been observing have been more than 201 frequently, resulting in large positive time_diff_ms
(because negative signed difference becomes large unsigned value)
That behavior is actually unexpected. We are going to inspect CR's firmware to dig into the issue. Thank you very much for letting us know.
The time difference function is not straight forward to understand. Can you help me in understanding it better?