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
34namespace 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
void add(const armem::LaserScanStamped &scan)
simox::math::InterpolatingTimeQueue< simox::math::PoseStamped > RobotPoseQueue
LaserScanAggregator(const SensorPoseMap &sensorPoses, const RobotPoseQueue &robotPoseQueue, float minRange)
const PointCloud::Ptr & pointCloud() const
std::unordered_map< std::string, Eigen::Isometry3f > SensorPoseMap
pcl::PointCloud< Point > PointCloud
This file offers overloads of toIce() and fromIce() functions for STL container types.
detail::RangeFilter< PointT, std::greater< float > > MinRangeFilter
Definition pcl_filter.h:79