I need to know if I can get acceleration data from an IMU at 500Hz via USB.
I've been going through the code that the manufacturer provides and trying to improve it. Right now I cannot go faster than 166Hz. Things I've tried:
Switched from streaming mode to polling. The reason is that in streaming mode the SDK of the manufacturer uses the ioctl library to know if there is new data to be read. The faster I would go was 10Hz. In polling mode, every N milliseconds data gets read from the port using a standard read command. I went from 10Hz to 166Hz, that is, for N=6. But with N<6 I get no improvement. 166Hz is a ceiling right now.
Increased the process priority. This has no effect at all. Maybe because I'm only running the browser and the code I'm working on?
Yes, I know linux is not a real time system. At the end of the day I'll have to live with that. I may use xenomai later on the code. But right now I need to know how fast I can go. Not theoretically, but in a real application. Any ideas about how to increase the performance?
EDIT: This are the timestamps of the time I get the data, in millisencods. Note the bursts.
1449258970519 1449258970519 1449258970525 1449258970531 1449258970531 1449258970543 1449258970543 1449258970543 1449258970549 1449258970555 1449258970555 1449258970562 1449258970567 1449258970567 1449258970573 1449258970579 1449258970579 1449258970585
EDIT: The amount of data that I have to transfer is very small... say at most 16 floats, plus some headers. I can safely assume 128 bytes is enough. So 128x1000 is still A LOT less than the 480 Mpbs that USB 2 offers.