-
Notifications
You must be signed in to change notification settings - Fork 367
High CPU load due to joint state broadcaster #1409
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
Comments
Strange. To narrow that down, I'd comment the different publishers in the update() method and see if the publishers or the |
I highly doubt that it is caused due to the handles. In a synchronous system, mutexes shouldn't do anything. So, as @christophfroehlich suggested try to check with the publishers and see. |
This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups. |
Sorry for my very late feedback. I will therefore close this issue. |
We are currently having issues with this broadcaster too. In our case I think simple due to the sheer amount of state interfaces our setup has: ~550. After a brief look, the broadcaster could use some optimization. There a lot of map lookups on the |
Thank you @jordan-palacios |
Describe the bug
I am currently looking into the issue why our ros2control node is consuming 100% cpu load.
For testing purposes I disabled all loaded controllers one by one. As expected the cpu drops a bit for each controller. But for the joint state broadcaster this was rather extreme. I see a change in cpu load for node of ~15-20%.
This is not the case for other controllers that publish messages at the same rate of 500Hz.
We have a rather large amount of joints in our system: 34.
Expected behavior
I would expect that such a simple controller shouldn't consume that much cpu power.
Environment (please complete the following information):
Additional context
When taking a look at the code I would guess at the moment three places that could result in a higher cpu load:
map_interface_to_joint_state_
-> but unordered_map should be fast enoughThe text was updated successfully, but these errors were encountered: