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

Faster publishing Rate for Pointcloud to PCD(pcl_ros)

asked 2018-04-09 08:01:25 -0500

Baumboon gravatar image

updated 2018-04-09 08:02:19 -0500

Hello Guys,

i use ros kinetic with gazebo 7.0. I have a world with a turtlebot inside and i want to get pcd files from the /camera/depth/point topic. Now i found a method to get pcd files from the published pointcloud with:

rosrun pcl_ros pointcloud_to_pcd input:=/camera/depth/points

But i got only 1 file every second is there a way to speed it up ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-09 09:16:26 -0500

lucasw gravatar image

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/per...

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-04-09 08:01:25 -0500

Seen: 201 times

Last updated: Apr 09 '18