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

Revision history [back]

I tried generating point clouds of 1000 points at 80 Hz but it looks like pointcloud_to_pcd could only save 30-40 frames a second:

$ stat -c "%y %s %n" *
...
2018-04-09 07:04:02.406205381 -0700 35180 1523282642399897.pcd
2018-04-09 07:04:02.410205381 -0700 35180 1523282642412034.pcd
2018-04-09 07:04:02.422205381 -0700 35180 1523282642424180.pcd
2018-04-09 07:04:02.462205382 -0700 35180 1523282642460516.pcd
2018-04-09 07:04:02.502205383 -0700 35180 1523282642496593.pcd
2018-04-09 07:04:02.542205386 -0700 35180 1523282642533060.pcd
2018-04-09 07:04:02.582205386 -0700 35180 1523282642574317.pcd
2018-04-09 07:04:02.622205387 -0700 35180 1523282642610482.pcd
2018-04-09 07:04:02.662205388 -0700 35180 1523282642659214.pcd
2018-04-09 07:04:02.702205389 -0700 35180 1523282642695245.pcd
2018-04-09 07:04:02.706205389 -0700 35180 1523282642707375.pcd
2018-04-09 07:04:02.718205390 -0700 35180 1523282642719512.pcd
2018-04-09 07:04:02.758205391 -0700 35180 1523282642755734.pcd
2018-04-09 07:04:02.798205391 -0700 35180 1523282642791982.pcd
2018-04-09 07:04:02.838205393 -0700 35180 1523282642828074.pcd
2018-04-09 07:04:02.878205394 -0700 35180 1523282642876456.pcd
2018-04-09 07:04:02.918205395 -0700 35180 1523282642912616.pcd
2018-04-09 07:04:02.926205395 -0700 35180 1523282642924680.pcd
2018-04-09 07:04:02.938205395 -0700 35180 1523282642936768.pcd
2018-04-09 07:04:02.974205396 -0700 35180 1523282642973042.pcd
2018-04-09 07:04:03.014205399 -0700 35180 1523282643009226.pcd
2018-04-09 07:04:03.054205399 -0700 35180 1523282643045587.pcd
2018-04-09 07:04:03.094205400 -0700 35180 1523282643093921.pcd
2018-04-09 07:04:03.134205400 -0700 35180 1523282643130270.pcd
2018-04-09 07:04:03.142205401 -0700 35180 1523282643142333.pcd
2018-04-09 07:04:03.154205401 -0700 35180 1523282643154349.pcd
2018-04-09 07:04:03.190205401 -0700 35180 1523282643178410.pcd
2018-04-09 07:04:03.230205402 -0700 35180 1523282643226847.pcd
2018-04-09 07:04:03.270205403 -0700 35180 1523282643263148.pcd
2018-04-09 07:04:03.274205403 -0700 35180 1523282643275285.pcd
2018-04-09 07:04:03.286205403 -0700 35180 1523282643287440.pcd
2018-04-09 07:04:03.326205404 -0700 35180 1523282643323484.pcd

It was only taking 8% of a cpu core.

You could create an issue on https://github.com/ros-perception/perception_pcl/issues

One thing that stands out in the code is that the queue_size is only 1 so the first thing to try is increasing that. You could try to fix it yourself (and pull request to merge the changes back in).

Your 1Hz saving rate seems especially bad though, so it's possible something else is wrong. You should look at rostopic hz for your point cloud topic, and use top or similar to see how much cpu is getting used, and note the size of your clouds.