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

pcl ExtractIndices nodelet

asked 2015-07-06 10:24:21 -0500

thebyohazard gravatar image

updated 2015-07-28 16:57:59 -0500

I am using the perception_pcl nodelets. I have a point cloud being fed to a SACSegmentation nodelet. That nodelet works fine and I am able to see the output at the expected 30Hz.

However, when I feed the inliers from the segmenter and the original point cloud into a pcl/ExtractIndices nodelet, I get no output, or perhaps one frame randomly every 1 - 2 minutes.

This appears to be caused by some recent update as it has worked before and still works on another, unupdated computer. Has there been a change of this node or the way to use it or should I file a ticket?

EDIT: I dug a little deeper and found out the cause of my problem. The extractIndices filter uses a Synchronize message filter with an exact timestamp policy to match the input point cloud and the indices found by the segmenter. The segmenter is NOT producing an inlier message with the same timestamp as the original pointcloud on my updated computers. Therefore, the extractIndices callback never gets called. The original point cloud has a stamp that is more precise than the indices.

For example, the pointcloud will have a stamp of

secs: 1438114448
nsecs: 434060100

while the indices will have

secs: 1438114448
nsecs: 434060000

So the segmentation nodelet loses precision when it reads the input point cloud. Not so in my unchanged computer. I noticed the segmenter uses a pointcloud rather than a pointcloud2, but I still can't find the place where things changed to cause my error. Anybody know where the change was?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2015-10-29 14:31:41 -0500

MahdiehNejati gravatar image

updated 2015-10-29 14:33:32 -0500

I had the same issue and setting the approximate_sync param to true fixed it for me:

<!-- Extract Inlier points -->
<node pkg="nodelet" type="nodelet" name="extract_plane" args="load pcl/ExtractIndices pcl_manager" output="screen">
  <remap from="~input" to="/voxel_grid/output"/>
  <remap from="~indices" to="/sac_plane/inliers"/>
  <rosparam>
    negative: true
    approximate_sync: true
</rosparam>
</node>

Hope this helps you too!

edit flag offensive delete link more
0

answered 2016-02-19 14:27:19 -0500

thebyohazard gravatar image

@MahdiehNejati's answer is probably good enough for most cases.

However, if you want an exact match...

The problem is that the pcl nodelets are still subscribing to PointCloud topics instead of PointCloud2 topics, which has a less precise timestamp. This timestamp then gets propagated.

I filed a bug report here.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2015-07-06 10:24:21 -0500

Seen: 992 times

Last updated: Feb 19 '16