Ask Your Question
0

point cloud "box" filtering

asked 2011-05-31 01:33:25 -0500

Ugo gravatar image

I just wanted to know if a package doing a "box" filtering already exists. I'd just like to limit the field of view of the Kinect, by removing everything that's not in a given box. I googled a bit and couldn't find an already implemented solution.

If it doesn't exist, I guess I can create a node and use the passthrough filter, but I thought it would already be implemented.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2011-05-31 03:21:20 -0500

Ugo gravatar image

updated 2011-05-31 20:23:52 -0500

Ok, I finally found the answer: I just needed to start a passthrough nodelet with the correct parameters. Here is a working launch file.

<launch>

  <group ns="/pcl_filters">
    <!-- PCL Manager -->
    <node pkg="nodelet" type="nodelet" name="box_filter_pcl_manager" args="manager" output="screen"/>

    <!-- Run a passthrough filter to delimit in x direction -->
    <node pkg="nodelet" type="nodelet" name="psx" args="load pcl/PassThrough box_filter_pcl_manager" output="screen">
      <remap from="~input" to="/camera/depth/points" />
      <rosparam>
        filter_field_name: x
        filter_limit_min: -.8
        filter_limit_max: 0.5
      </rosparam>
    </node>

    <!-- Run a passthrough filter to delimit in y direction -->
    <node pkg="nodelet" type="nodelet" name="psy" args="load pcl/PassThrough box_filter_pcl_manager" output="screen">
      <remap from="~input" to="psx/output" />
      <rosparam>
        filter_field_name: y
        filter_limit_min: -1.
        filter_limit_max: .3
      </rosparam>
    </node>

    <!-- Run a passthrough filter to delimit in z direction -->
    <node pkg="nodelet" type="nodelet" name="psz" args="load pcl/PassThrough box_filter_pcl_manager" output="screen">
      <remap from="~input" to="psy/output" />
      <rosparam>
        filter_field_name: z
        filter_limit_min: 0.0
        filter_limit_max: 2.0
      </rosparam>
    </node>
  </group>
</launch>
edit flag offensive delete link more

Comments

Don't the later rosparam blocks overwrite the earlier ones?
Eric Perko gravatar imageEric Perko ( 2011-05-31 04:14:35 -0500 )edit
Hm, to be honest I haven't really tested it, I just subscribed to the output point cloud and saw that I had a smaller point cloud. I'll have to check this.
Ugo gravatar imageUgo ( 2011-05-31 04:20:39 -0500 )edit
Ok, it didn't work with one filter, I just pasted Erik's solution here to have the answer directly accessible. Thanks.
Ugo gravatar imageUgo ( 2011-05-31 20:24:59 -0500 )edit
I think you mean @dejanpan's solution :)
Eric Perko gravatar imageEric Perko ( 2011-06-01 05:18:30 -0500 )edit
3

answered 2011-05-31 04:50:54 -0500

dejanpan gravatar image

updated 2011-06-28 03:14:26 -0500

dornhege gravatar image

Ugo, this is launch file I was using a while ago:

http://code.cs.tum.edu/indefero/index.php/p/mapping/source/tree/master/pcl_cloud_tools/launch/box_filter.launch .

The filtered cloud comes on psz/output topic. D.

edit flag offensive delete link more

Comments

Hmm... for some reason that link doesn't seem to want to linkify...
Eric Perko gravatar imageEric Perko ( 2011-05-31 05:04:59 -0500 )edit
Thanks for that. Do we really need the 3 passthrough filters? Isn't it a big overhead?
Ugo gravatar imageUgo ( 2011-05-31 05:05:48 -0500 )edit
Hmm, I did not really measure CPU usage to be honest. But yeah if your example works better I am happy to adopt it. D.
dejanpan gravatar imagedejanpan ( 2011-05-31 05:08:09 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-05-31 01:33:25 -0500

Seen: 1,648 times

Last updated: May 31 '11