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.h>
51 
52 #include <sensor_msgs/LaserScan.h>
55 
56 #include <tf/transform_datatypes.h>
57 #include <tf/transform_listener.h>
58 
59 
60 namespace laser_filters
61 {
65 class LaserScanBoxFilter : public filters::FilterBase<sensor_msgs::LaserScan>
66 {
67  public:
69  bool configure();
70 
71  bool update(
72  const sensor_msgs::LaserScan& input_scan,
73  sensor_msgs::LaserScan& filtered_scan);
74 
75  private:
76  bool inBox(tf::Point &point);
77  std::string box_frame_;
79 
80  // tf listener to transform scans into the box_frame
82 
83  // defines two opposite corners of the box
87 };
88 
89 }
90 
91 
92 #endif /* box_filter.h */
LaserScanMaskFilter removes points on directions defined in a mask from a laser scan.
laser_geometry::LaserProjection projector_
Definition: box_filter.h:78
tf::TransformListener tf_
Definition: box_filter.h:81
bool inBox(tf::Point &point)
Definition: box_filter.cpp:201
This is a filter that removes points in a laser scan inside of a cartesian box.
Definition: box_filter.h:65
bool update(const sensor_msgs::LaserScan &input_scan, sensor_msgs::LaserScan &filtered_scan)
Definition: box_filter.cpp:105


laser_filters
Author(s): Tully Foote
autogenerated on Wed Jul 3 2019 19:33:47