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

Revision history [back]

click to hide/show revision 1
initial version

Victor,

Thanks so much for the bug-fix and for cross-posting this to our Google Code issue tracker ( http://code.google.com/p/brown-ros-pkg/issues/detail?id=11 ). I've just incorporated this fix into our SVN version ( svn co https://brown-ros-pkg.googlecode.com/svn/trunk/experimental/rosbridge rosbridge ) and it will be available in the Electric and Diamondback binaries as soon as Willow refreshes their distribution (the packages will be labeled 0.0.19).

What your fix basically does is make the loop sensitive to the HZ parameter. Since the default HZ in your version is so low (200Hz) CPU usage drops dramatically. However, at the moment most of our users are expecting performance to favor throughput. I've thus changed the default HZ to 100000 (equivalent to 100 kHz) coincident with applying your fix. This will mean that if you want to cut down on CPU usage, you'll need to specify your own HZ as the default will do quite a bit of spinning.

One other thing I should mention is that the 100% usage is a bit misleading and you should always try to run rosbridge alongside your planned load. While select operations will dominate a CPU on an "empty" processor according to top, they are still blocking (as called in rosbridge) and present yield opportunities. The end result is that while rosbridge will take 100% of a CPU with no other load, it will not in general effect the performance of other applications very much (if at all). For example, when you run Gazebo (a CPU-bound process) on the same core, rosbridge will only take up ~1% of the proc according to top.

Thanks again for the patch!

_Trevor