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

wiimote cpu load [closed]

asked 2011-05-08 22:11:00 -0500

gazkune gravatar image

updated 2014-01-28 17:09:39 -0500

ngrennan gravatar image

Hi all!

I am experiencing a weird behavior in wiimote_node. When I launch it and subscribe to the /joy topic, the CPU load of the node goes up to 140%! I run the node in an Intel Core2 Duo, where each processor is 1.8 GHz. It seems that those CPU loads are not justified, but I saw in the code that the publishing rate is 100 Hz. Although I changed that frequency to 10 Hz the node keeps on consuming the same CPU. Does anybody have a clue about it?

Thanks in advance!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by mmwise
close date 2011-06-09 07:55:40

Comments

That seems really weird. How are you measuring the CPU usage of the node (e.g. top)? Does it use the same amount when you aren't subscribed to /joy? What about subscribing to one of the other topics output by the node (/imu for example)?
Eric Perko gravatar image Eric Perko  ( 2011-05-09 10:32:07 -0500 )edit
I measure the CPU usage with top. The usage doesn't change with subscriptions. Even without subscriptions, usage is always around 140%. I did the same test in my laptop (Intel Core i5) with a new diamondback installation and I get a usage of 113%
gazkune gravatar image gazkune  ( 2011-05-09 18:36:12 -0500 )edit
I'm in china currently, I will look into this problem when I get back and see if I can reproduce this problem. I filed a ticket here for myself: https://code.ros.org/trac/ros-pkg/ticket/4948
mmwise gravatar image mmwise  ( 2011-05-09 18:43:52 -0500 )edit
I see the CPU load and am on it!
mmwise gravatar image mmwise  ( 2011-06-07 12:12:47 -0500 )edit
I also tested the wiimote node on a Atom-based FitPC2 and noticed it maxed out the CPU completely. Good to see it adressed :)
Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2011-06-08 18:39:44 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2011-06-08 12:03:39 -0500

mmwise gravatar image

updated 2011-06-08 12:10:10 -0500

I checked into trunk a fix that reduced the CPU from 114% to 9%

r37137: https://code.ros.org/gf/project/ros-pkg/scmsvn/?action=browse&path=/stacks/joystick_drivers/trunk/wiimote/nodes/wiimote_node.py&view=markup&revision=37137

try it out and tell me how it goes..

edit flag offensive delete link more

Comments

Seems to work well! I didn't see any CPU load bigger than 9% during execution of wiimote_node.py. Thanks!
gazkune gravatar image gazkune  ( 2011-06-09 00:50:55 -0500 )edit

Question Tools

Stats

Asked: 2011-05-08 22:11:00 -0500

Seen: 328 times

Last updated: Jun 08 '11