## For instruction on writing tutorials ## http://www.ros.org/wiki/WritingTutorials #################################### ##FILL ME IN #################################### ## for a custom note with links: ## note = ## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links ## note.0= ## descriptive title for the tutorial ## title = Filter Nodelets ## multi-line description to be displayed in search ## description = Descriptions of many filter nodelets ## the next tutorial description (optional) ## next = ## links to next tutorial (optional) ## next.0.link= ## next.1.link= ## what level user is this tutorial for ## level= BeginnerCategory ## keywords = #################################### <> == Users == === Extract Indices === The `ExtractIndices` nodelet wraps the [[https://pointclouds.org/documentation/classpcl_1_1_extract_indices.html|pcl::ExtractIndices]] filter (also see [[https://pcl.readthedocs.io/projects/tutorials/en/latest/extract_indices.html#extract-indices|tutorial]]). The following [[dynamic_reconfigure]] parameters are used: {{{ #!clearsilver CS/NodeAPI # Autogenerated param section. Do not hand edit. param { group.0 { name=Dynamically Reconfigurable Parameters desc=See the [[dynamic_reconfigure]] package for details on dynamically reconfigurable parameters. 0.name= ~negative 0.default= False 0.type= bool 0.desc=Extract indices or the negative (all-indices) } } # End of autogenerated section. You may edit below. }}} === PassThrough === The `PassThrough` nodelet wraps the [[https://pointclouds.org/documentation/classpcl_1_1_pass_through.html|pcl::PassThrough]] filter (also see [[https://pcl.readthedocs.io/projects/tutorials/en/latest/passthrough.html|PassThrough tutorial]]). The following [[dynamic_reconfigure]] parameters are used: {{{ #!clearsilver CS/NodeAPI # Autogenerated param section. Do not hand edit. param { group.0 { name=Dynamically Reconfigurable Parameters desc=See the [[dynamic_reconfigure]] package for details on dynamically reconfigurable parameters. 0.name= ~filter_field_name 0.default= z 0.type= str 0.desc=The field name used for filtering 1.name= ~filter_limit_min 1.default= 0.0 1.type= double 1.desc=The minimum allowed field value a point will be considered from Range: -1000.0 to 1000.0 2.name= ~filter_limit_max 2.default= 1.0 2.type= double 2.desc=The maximum allowed field value a point will be considered from Range: -1000.0 to 1000.0 3.name= ~filter_limit_negative 3.default= False 3.type= bool 3.desc=Set to true if we want to return the data outside [filter_limit_min; filter_limit_max]. 4.name= ~input_frame 4.default= 4.type= str 4.desc=The input TF frame the data should be transformed into before processing, if input.header.frame_id is different. 5.name= ~output_frame 5.default= 5.type= str 5.desc=The output TF frame the data should be transformed into after processing, if input.header.frame_id is different. } } # End of autogenerated section. You may edit below. }}} === ProjectInliers === The `ProjectInliers` nodelet wraps the [[https://pointclouds.org/documentation/classpcl_1_1_project_inliers.html|pcl::ProjectInliers]] filter (also see [[https://pcl.readthedocs.io/projects/tutorials/en/latest/project_inliers.html|Projection tutorial]]). === RadiusOutlierRemoval === The `RadiusOutlierRemoval` nodelet wraps the [[https://pointclouds.org/documentation/classpcl_1_1_radius_outlier_removal.html|pcl::RadiusOutlierRemoval]] filter (also see [[https://pcl.readthedocs.io/projects/tutorials/en/latest/remove_outliers.html|Outlier removal tutorial]]). === StatisticalOutlierRemoval === The `StatisticalOutlierRemoval` nodelet wraps the [[https://pointclouds.org/documentation/classpcl_1_1_statistical_outlier_removal.html|pcl::StatisticalOutlierRemoval]] filter (also see [[https://pcl.readthedocs.io/projects/tutorials/en/latest/statistical_outlier.html|Statistical outlier removal tutorial]]). The following [[dynamic_reconfigure]] parameters are used: {{{ #!clearsilver CS/NodeAPI # Autogenerated param section. Do not hand edit. param { group.0 { name=Dynamically Reconfigurable Parameters desc=See the [[dynamic_reconfigure]] package for details on dynamically reconfigurable parameters. 0.name= ~mean_k 0.default= 2 0.type= int 0.desc=The number of points (k) to use for mean distance estimation Range: 2 to 100 1.name= ~stddev 1.default= 0.0 1.type= double 1.desc=The standard deviation multiplier threshold. All points outside the mean +- sigma * std_mul will be considered outliers. Range: 0.0 to 5.0 2.name= ~negative 2.default= False 2.type= bool 2.desc=Set whether the inliers should be returned (true) or the outliers (false) } } # End of autogenerated section. You may edit below. }}} === VoxelGrid === The `VoxelGrid` nodelet wraps the [[https://pointclouds.org/documentation/classpcl_1_1_voxel_grid.html|pcl::VoxelGrid]] filter (also see [[https://pcl.readthedocs.io/projects/tutorials/en/latest/voxel_grid.html|Downsampling tutorial]]). The following [[dynamic_reconfigure]] parameters are used: {{{ #!clearsilver CS/NodeAPI # Autogenerated param section. Do not hand edit. param { group.0 { name=Dynamically Reconfigurable Parameters desc=See the [[dynamic_reconfigure]] package for details on dynamically reconfigurable parameters. 0.name= ~leaf_size 0.default= 0.01 0.type= double 0.desc=The size of a leaf (on x,y,z) used for downsampling. Range: 0.0 to 1.0 1.name= ~filter_field_name 1.default= z 1.type= str 1.desc=The field name used for filtering 2.name= ~filter_limit_min 2.default= 0.0 2.type= double 2.desc=The minimum allowed field value a point will be considered from Range: -1000.0 to 1000.0 3.name= ~filter_limit_max 3.default= 1.0 3.type= double 3.desc=The maximum allowed field value a point will be considered from Range: -1000.0 to 1000.0 4.name= ~filter_limit_negative 4.default= False 4.type= bool 4.desc=Set to true if we want to return the data outside [filter_limit_min; filter_limit_max]. 5.name= ~input_frame 5.default= 5.type= str 5.desc=The input TF frame the data should be transformed into before processing, if input.header.frame_id is different. 6.name= ~output_frame 6.default= 6.type= str 6.desc=The output TF frame the data should be transformed into after processing, if input.header.frame_id is different. } } # End of autogenerated section. You may edit below. }}} === CropBox === The `CropBox` nodelet wraps the [[https://pointclouds.org/documentation/classpcl_1_1_crop_box.html|pcl::CropBox]] filter. The following [[dynamic_reconfigure]] parameters are used: {{{ #!clearsilver CS/NodeAPI # Autogenerated param section. Do not hand edit. param { group.0 { name=Dynamically Reconfigurable Parameters 0.name= ~min_x 0.default= -1.0 0.type= double 0.desc=The minimum allowed x value a point will be considered from. Range: -1000.0 to 1000.0 1.name= ~max_x 1.default= 1.0 1.type= double 1.desc=The maximum allowed x value a point will be considered from. Range: -1000.0 to 1000.0 2.name= ~min_y 2.default= -1.0 2.type= double 2.desc=The minimum allowed y value a point will be considered from. Range: -1000.0 to 1000.0 3.name= ~max_y 3.default= 1.0 3.type= double 3.desc=The maximum allowed y value a point will be considered from. Range: -1000.0 to 1000.0 4.name= ~min_z 4.default= -1.0 4.type= double 4.desc=The minimum allowed z value a point will be considered from. Range: -1000.0 to 1000.0 5.name= ~max_z 5.default= 1.0 5.type= double 5.desc=The maximum allowed z value a point will be considered from. Range: -1000.0 to 1000.0 6.name= ~keep_organized 6.default= False 6.type= bool 6.desc=If true, the pointcloud shape (width, height) will be retained and filtered-out points will be set to nan. If false, pointcloud is reshaped to height 1 and filtered-out points are removed. Please not this is broken in Melodic and the pointcloud is always unorganized. In Noetic, it works correctly. 7.name= ~negative 7.default= False 7.type= bool 7.desc=Set to true if we want to return the data outside the limiting box. If false, data inside the box are returned. 8.name= ~input_frame 8.default= 8.type= str 8.desc=The input TF frame the data should be transformed into before processing, if input.header.frame_id is different. 9.name= ~output_frame 9.default= 9.type= str 9.desc=The output TF frame the data should be transformed into after processing, if input.header.frame_id is different. } } # End of autogenerated section. You may edit below. }}} == Developers == All [[pcl_ros]] nodelet filters inherit from `pcl_ros::Filter`, which requires that any class inheriting from it implement the following interface: * `child_init()`, `filter()`, `onInit()` and `config_callback()` are all virtual and can be overridden * `filter (PointCloud2 &output)` is pure abstract and must be implemented * if `child_init (ros::NodeHandle &nh, bool &has_service)` is implemented, and `has_service` is set to '''true''', the `Filter` base class `dynamic_reconfigure` service will not be created === Common ROS parameters === The following ROS parameters are usually read on startup for any [[pcl_ros]] nodelet. * '''max_queue_size''', ''int'' : defines the maximum queue size the ROS subscribers and publishers in the nodelet should use (see [[http://www.ros.org/doc/api/roscpp/html/classros_1_1NodeHandle.html#a0b8398fd50b8f7b3cc44f642252e4fea|ros::NodeHandle::subscribe]] for more information). * '''use_indices''', ''bool'' : usually indicates whether the nodelet should listen for incoming data on '''~indices'''. This data represents a subset of point indices (`pcl::PointIndices` message) that should be used from the input dataset. * '''approximate_sync''', ''bool'' : indicates whether the input topics that the nodelet listens to, should synchronize with an `ApproximateTimeSynchronizer` (their `header.stamp` can differ) or an `ExactTimeSynchronizer` (their `header.stamp` must be identical) === Input/Output topics === The following list of ROS topics are used by all [[pcl_ros]] filters: * '''input''', in, [[sensor_msgs/PointCloud2]] : input point cloud data to filter. * '''indices''', in, [[pcl/PointIndices]] : input point cloud data indices to use from '''input'''. * '''output''', out, [[sensor_msgs/PointCloud2]] : the resultant filtered point cloud data.