-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Huge CPU Load for simulated tactile data #2
Comments
Sure. I welcome a PR. I suggest having a period member, defaulting to 1000µs, which can be changed via a setter method. |
Here are results of the PR #3
even with a low-latency kernel, the basic time functions, (and also more recent std::chrono::high_resolution_clock) do not give good timing due to usleep (also tested nanosleep) not being ideal. example this code
produces
ROS rate is usually better but this would mean one should place the timing at the node side and out of the lib. |
In #4 I implemented |
Thanks a lot for providing a clean solution that I am not capable of doing (really). Even more I do not understand some choices, but maybe I make remarks in a review if you want me to do one (because I am currently assigned the PR not asked for review as last time)
did not try in GloveGUI, only gloveConsole was tried. |
@guihomework, I would very much appreciate your review. However, if you don't have time for it, don't worry. |
We noticed that
gloveConsole
has no rate limit when started with the-d
option (random data output) which makes it publish at highest possible frame rate leading to huge and useless CPU load.One can either implement a rate limit (using timestamps) in the Random Input Class as done in FileInput which is more generic, or add a rate limit only for ROS publishers.
Being able to set the rate would be extra, otherwise 1 kHz default setting would be sufficient (similar to our default gloves).
@rhaschke What do you think ?
The text was updated successfully, but these errors were encountered: