astuff / kvaser_interface

A Kvaser CAN interface ROS abstraction layer.
MIT License
83 stars 51 forks source link

Fix/slow response #45

Closed JWhitleyWork closed 5 years ago

JWhitleyWork commented 5 years ago

The current release of kvaser_interface suffers from very slow performance on reading and writing. The majority of this performance degradation comes from checking the on-bus status through the linuxcan API on every read and write. This PR removes the code to check the on-bus status with linuxcan every time, replacing it with a local status variable which is modified when the on-bus state changes. This does not fix the performance problem 100% but is a major improvement (approximately 200% reduction in latency).