pointcloud_to_laserscan multiple threads and cpu usage

asked 2016-06-30 13:52:05 -0500

tiagoraulp gravatar image

I am using the pointcloud_to_laserscan node, with concurrency level 0. The node is running in the Pepper robot, with an Atom E3845, quad core processor at 1.91 GHz.

The node is using 100% of the cpu and cannot keep up with the input point cloud at 10 Hz, with the output being published at less than 1 Hz.

If I use top to follow the process and the multiple threads, I see 16 entries for the pointcloud_to_laserscan node. But only the first two use around 35% of the cpu, with the 3rd and 4th entries using around 10%, and almost no processing for all the other threads.

If I changed the concurrency level to 1, there are multiple threads, but only one doing all the processing, at almost 100% cpu usage. The output rate in this mode is almost the same.

In the end the multi-thread mode is using more or less the same amount of CPU time as 1 thread only. Why doesn't it use 100% of the cpu in each thread in the multi-threading mode?

edit retag flag offensive close merge delete