ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rospy publishers using tons of CPU

asked 2018-04-27 14:14:17 -0500

I have a node with a number of subscribers and publishers in it. Most of them have no problem, but 2 in particular running at 100hz are taking up about 15% of an i7 CPU set with a queue_size of 10.

When the application runs with just the publish line commented out, it drops 15%. I've never seen anything like this in C++ and wasn't sure if there was some quirk in python needed to address high rate topics.

Any thoughts?

edit retag flag offensive close merge delete

Comments

It's hard to comment on this without seeing your code, but I've mostly used rospy and haven't run into this.

jayess gravatar image jayess  ( 2018-04-27 15:08:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-27 15:32:36 -0500

I found when I changed the 100hz topics to having a queue_size of None, the CPU immediately dropped to the 15% less, if all other topics are also None, no real difference, appears to only be an issue for the high rate ones.

I need to look into the ramifications of it but seems like a plausible fix.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2018-04-27 14:14:17 -0500

Seen: 468 times

Last updated: Apr 27 '18