Skip to content

Is it possible to throttle the callback on a topic subscription? #936

Closed Answered by PierreSachot
PierreSachot asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @minggangw,
Thanks a lot for your answer, you made me found the solution. I tried to filter on the timestamp which is in my topic header, but it does not work.

My solution was to set the HMI ros node frequency at a lower level in order to reduce the entire processing.

Here is the solution (inside the node creation:
const rate = YOUR_NODE.createRate(YOUR_DESIRED_FREQUENCY); while(true) { rate.sleep(); node.spin_once(); }

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@minggangw
Comment options

Answer selected by PierreSachot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants