Ask Your Question
0

ROS node consuming 100 % of CPU load . How ?

asked 2017-08-23 02:28:26 -0600

Prithvi Raj gravatar image

I am using ROS - Kinetic , and Ubuntu 16.04 OS . ROS - node uses a synchronizer for Three messages , to be subscribed from Three other ROS nodes .

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-23 02:38:13 -0600

gvdhoorn gravatar image

Please provide us with more information - in this case: a snippet that shows how you run your main loop.

Are you running your own while { ..; ros::spinOnce(); ..; } or are you using ros::spin()? If the former: be sure to add a ros::Rate::sleep() in there, or you basically have a busy-wait.

edit flag offensive delete link more

Comments

Thank You . It is resolved .

Prithvi Raj gravatar imagePrithvi Raj ( 2017-08-23 03:44:14 -0600 )edit

Can you tell us what the cause was? Did you have a busy-while-loop without a sleep?

gvdhoorn gravatar imagegvdhoorn ( 2017-08-23 03:46:23 -0600 )edit

Yes . I was using ros::spinOnce inside a while loop , without rate.sleep() .

Prithvi Raj gravatar imagePrithvi Raj ( 2017-08-23 07:08:25 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-08-23 02:28:26 -0600

Seen: 330 times

Last updated: Aug 23 '17