kentsommer / obstacle_detection

Detection stack using PCL and ROS.
5 stars 1 forks source link

Throttle processing #3

Open bit-pirate opened 9 years ago

bit-pirate commented 9 years ago

Currently, this node processes every pointcloud immediatly (spin()).

I suggest to support throttling the processing down, by specifying how often updates should be processed (spinOnce() + sleep). In this case we should lower the point cloud subscriber's buffer to one, to make sure we only process the latest point cloud.

Btw, I'm suggesting this, because this processing here max'es out a complete core on my Core i7.

kentsommer commented 9 years ago

I agree, at the time I didn't run very precise performance metrics on it, but using up a full core is unacceptable. I'll have ROS setup and running in the next day, so if this hasn't been added yet I'll work on it.

bit-pirate commented 9 years ago

Commit https://github.com/kentsommer/obstacle_detection/commit/57cf54bafc8e4eec0550ef60550b14569157a98d adds the spinOnce, but we should be using a ROS paramater for setting the spin rate. Will close this issue, once I have this implemented.