box_filter.h
Go to the documentation of this file.
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Robot Operating System code by the University of Osnabrück
5  * Copyright (c) 2015, University of Osnabrück
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above
13  * copyright notice, this list of conditions and the following
14  * disclaimer.
15  *
16  * 2. Redistributions in binary form must reproduce the above
17  * copyright notice, this list of conditions and the following
18  * disclaimer in the documentation and/or other materials provided
19  * with the distribution.
20  *
21  * 3. Neither the name of the copyright holder nor the names of its
22  * contributors may be used to endorse or promote products derived
23  * from this software without specific prior written permission.
24  *
25  *
26  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
30  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
33  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
35  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
36  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37  *
38  *
39  *
40  * box_filter.h
41  *
42  * author: Sebastian Pütz <spuetz@uni-osnabrueck.de>
43  */
44 
45 
46 
47 #ifndef BOXFILTER_H
48 #define BOXFILTER_H
49 
50 #include <filters/filter_base.hpp>
51 
52 #include <sensor_msgs/LaserScan.h>
55 
56 #include <tf/transform_datatypes.h>
57 #include <tf/transform_listener.h>
58 
59 #include <dynamic_reconfigure/server.h>
60 #include <laser_filters/BoxFilterConfig.h>
61 
62 
63 namespace laser_filters
64 {
68 class LaserScanBoxFilter : public filters::FilterBase<sensor_msgs::LaserScan>
69 {
70  public:
72  bool configure();
73 
74  bool update(
75  const sensor_msgs::LaserScan& input_scan,
76  sensor_msgs::LaserScan& filtered_scan);
77 
78  protected:
79  bool inBox(tf::Point &point);
80  std::string box_frame_;
82 
83  // tf listener to transform scans into the box_frame
85 
86  // defines two opposite corners of the box
90 
91  std::shared_ptr<dynamic_reconfigure::Server<BoxFilterConfig>> dyn_server_;
92  void reconfigureCB(BoxFilterConfig& config, uint32_t level);
93  boost::recursive_mutex own_mutex_;
94  BoxFilterConfig config_ = BoxFilterConfig::__getDefault__();
95 };
96 
97 }
98 
99 
100 #endif /* box_filter.h */
filters::FilterBase
laser_filters::LaserScanBoxFilter::config_
BoxFilterConfig config_
Definition: box_filter.h:94
laser_geometry::LaserProjection
laser_filters::LaserScanBoxFilter::LaserScanBoxFilter
LaserScanBoxFilter()
Definition: box_filter.cpp:48
laser_filters::LaserScanBoxFilter::own_mutex_
boost::recursive_mutex own_mutex_
Definition: box_filter.h:93
laser_filters::LaserScanBoxFilter::box_frame_
std::string box_frame_
Definition: box_filter.h:80
laser_filters::LaserScanBoxFilter::up_and_running_
bool up_and_running_
Definition: box_filter.h:89
laser_filters::LaserScanBoxFilter::update
bool update(const sensor_msgs::LaserScan &input_scan, sensor_msgs::LaserScan &filtered_scan)
Definition: box_filter.cpp:80
filter_base.hpp
laser_filters::LaserScanBoxFilter::reconfigureCB
void reconfigureCB(BoxFilterConfig &config, uint32_t level)
Definition: box_filter.cpp:183
laser_geometry.h
laser_filters::LaserScanBoxFilter
This is a filter that removes points in a laser scan inside of a cartesian box.
Definition: box_filter.h:68
tf::Point
tf::Vector3 Point
laser_filters::LaserScanBoxFilter::tf_
tf::TransformListener tf_
Definition: box_filter.h:84
laser_filters::LaserScanBoxFilter::dyn_server_
std::shared_ptr< dynamic_reconfigure::Server< BoxFilterConfig > > dyn_server_
Definition: box_filter.h:91
laser_filters::LaserScanBoxFilter::min_
tf::Point min_
Definition: box_filter.h:87
laser_filters::LaserScanBoxFilter::projector_
laser_geometry::LaserProjection projector_
Definition: box_filter.h:81
transform_listener.h
point_cloud_conversion.h
laser_filters::LaserScanBoxFilter::max_
tf::Point max_
Definition: box_filter.h:87
transform_datatypes.h
tf::TransformListener
laser_filters::LaserScanBoxFilter::invert_filter
bool invert_filter
Definition: box_filter.h:88
laser_filters::LaserScanBoxFilter::configure
bool configure()
Definition: box_filter.cpp:53
laser_filters
LaserScanMaskFilter removes points on directions defined in a mask from a laser scan.
Definition: angular_bounds_filter.h:43
laser_filters::LaserScanBoxFilter::inBox
bool inBox(tf::Point &point)
Definition: box_filter.cpp:176


laser_filters
Author(s): Tully Foote
autogenerated on Mon Apr 3 2023 02:51:57