ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
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>
<node pkg="nodelet" type="nodelet" name="pcl_manager" args="manager" output="screen" />
<!-- Run a passthrough filter to clean NaNs -->
<node pkg="nodelet" type="nodelet" name="passthrough" args="load pcl/PassThrough pcl_manager" output="screen">
<remap from="~input" to="/camera/depth/points" />
<rosparam>
filter_field_name: x
filter_limit_min: 0.0
filter_limit_max: 1.5
filter_limit_negative: False
</rosparam>
<rosparam>
filter_field_name: y
filter_limit_min: 0.0
filter_limit_max: 1.5
filter_limit_negative: False
</rosparam>
<rosparam>
filter_field_name: z
filter_limit_min: 0.0
filter_limit_max: 1.5
filter_limit_negative: False
</rosparam>
</node>
</launch>
2 | No.2 Revision |
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="pcl_manager" name="box_filter_pcl_manager" args="manager" output="screen" />
output="screen"/>
<!-- Run a passthrough filter to clean NaNs delimit in x direction -->
<node pkg="nodelet" type="nodelet" name="passthrough" name="psx" args="load pcl/PassThrough pcl_manager" 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: 1.5
filter_limit_negative: False
2.0
</rosparam>
<rosparam>
filter_field_name: y
filter_limit_min: 0.0
filter_limit_max: 1.5
filter_limit_negative: False
</rosparam>
<rosparam>
filter_field_name: z
filter_limit_min: 0.0
filter_limit_max: 1.5
filter_limit_negative: False
</rosparam>
</node>
</group>
</launch>