Is it possible to throttle the callback on a topic subscription? #936
-
Hi, Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @PierreSachot does the message filter meet your requirement? You can find the example https://github.com/RobotWebTools/rclnodejs/blob/develop/example/subscription-content-filter-example.js
Yes, the |
Beta Was this translation helpful? Give feedback.
-
Hi @minggangw, 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: |
Beta Was this translation helpful? Give feedback.
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(); }