LaserScanAggregator.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @author Fabian Reister ( fabian dot reister at kit dot edu )
17  * @date 2021
18  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19  * GNU General Public License
20  */
21 
22 #pragma once
23 
24 #include <unordered_map>
25 
26 #include <Eigen/Geometry>
27 
28 #include <pcl/point_cloud.h>
29 #include <pcl/point_types.h>
30 
33 
34 namespace armarx
35 {
36  namespace armem
37  {
38  struct LaserScanStamped;
39  }
40 
41  // struct LaserScanStamped;
42 
44  {
45  public:
46  using Point = pcl::PointXYZ;
47  using PointCloud = pcl::PointCloud<Point>;
48 
49  using SensorPoseMap = std::unordered_map<std::string, Eigen::Isometry3f>;
50  using RobotPoseQueue = simox::math::InterpolatingTimeQueue<simox::math::PoseStamped>;
51 
52  LaserScanAggregator(const SensorPoseMap& sensorPoses,
53  const RobotPoseQueue& robotPoseQueue,
54  float minRange);
55 
56  void add(const armem::LaserScanStamped& scan);
57  void add(const std::vector<armem::LaserScanStamped>& scans);
58 
59  const PointCloud::Ptr& pointCloud() const;
60 
61  private:
62  const SensorPoseMap sensorPoses;
63  const RobotPoseQueue robotPoseQueue;
64 
65  const MinRangeFilter<Point> rangeFilter;
66 
67  PointCloud::Ptr cloud;
68  };
69 } // namespace armarx
armarx::detail::RangeFilter
Definition: pcl_filter.h:55
InterpolatingTimeQueue.h
armarx::LaserScanAggregator::RobotPoseQueue
simox::math::InterpolatingTimeQueue< simox::math::PoseStamped > RobotPoseQueue
Definition: LaserScanAggregator.h:50
pcl_filter.h
armarx::armem
Definition: LegacyRobotStateMemoryAdapter.cpp:32
armarx::LaserScanAggregator::LaserScanAggregator
LaserScanAggregator(const SensorPoseMap &sensorPoses, const RobotPoseQueue &robotPoseQueue, float minRange)
Definition: LaserScanAggregator.cpp:23
armarx::LaserScanAggregator::add
void add(const armem::LaserScanStamped &scan)
Definition: LaserScanAggregator.cpp:35
Point
Definition: PointCloud.h:21
armarx::LaserScanAggregator::pointCloud
const PointCloud::Ptr & pointCloud() const
Definition: LaserScanAggregator.cpp:73
PointCloud
Definition: PointCloud.h:85
armarx::LaserScanAggregator
Definition: LaserScanAggregator.h:43
armarx::LaserScanAggregator::SensorPoseMap
std::unordered_map< std::string, Eigen::Isometry3f > SensorPoseMap
Definition: LaserScanAggregator.h:49
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27