RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
util3d_transforms.h
1/*
2Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in the
11 documentation and/or other materials provided with the distribution.
12 * Neither the name of the Universite de Sherbrooke nor the
13 names of its contributors may be used to endorse or promote products
14 derived from this software without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*/
27
28#ifndef UTIL3D_TRANSFORMS_H_
29#define UTIL3D_TRANSFORMS_H_
30
31#include <rtabmap/core/rtabmap_core_export.h>
32
33#include <pcl/point_cloud.h>
34#include <pcl/point_types.h>
35#include <pcl/pcl_base.h>
36#include <rtabmap/core/Transform.h>
37#include <rtabmap/core/LaserScan.h>
38
39namespace rtabmap
40{
41
42namespace util3d
43{
44
75LaserScan RTABMAP_CORE_EXPORT transformLaserScan(
76 const LaserScan & laserScan,
77 const Transform & transform);
78
93pcl::PointCloud<pcl::PointXYZ>::Ptr RTABMAP_CORE_EXPORT transformPointCloud(
94 const pcl::PointCloud<pcl::PointXYZ>::Ptr & cloud,
95 const Transform & transform);
97pcl::PointCloud<pcl::PointXYZI>::Ptr RTABMAP_CORE_EXPORT transformPointCloud(
98 const pcl::PointCloud<pcl::PointXYZI>::Ptr & cloud,
99 const Transform & transform);
101pcl::PointCloud<pcl::PointXYZRGB>::Ptr RTABMAP_CORE_EXPORT transformPointCloud(
102 const pcl::PointCloud<pcl::PointXYZRGB>::Ptr & cloud,
103 const Transform & transform);
105pcl::PointCloud<pcl::PointNormal>::Ptr RTABMAP_CORE_EXPORT transformPointCloud(
106 const pcl::PointCloud<pcl::PointNormal>::Ptr & cloud,
107 const Transform & transform);
109pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr RTABMAP_CORE_EXPORT transformPointCloud(
110 const pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr & cloud,
111 const Transform & transform);
113pcl::PointCloud<pcl::PointXYZINormal>::Ptr RTABMAP_CORE_EXPORT transformPointCloud(
114 const pcl::PointCloud<pcl::PointXYZINormal>::Ptr & cloud,
115 const Transform & transform);
116
118pcl::PointCloud<pcl::PointXYZ>::Ptr RTABMAP_CORE_EXPORT transformPointCloud(
119 const pcl::PointCloud<pcl::PointXYZ>::Ptr & cloud,
120 const pcl::IndicesPtr & indices,
121 const Transform & transform);
123pcl::PointCloud<pcl::PointXYZI>::Ptr RTABMAP_CORE_EXPORT transformPointCloud(
124 const pcl::PointCloud<pcl::PointXYZI>::Ptr & cloud,
125 const pcl::IndicesPtr & indices,
126 const Transform & transform);
128pcl::PointCloud<pcl::PointXYZRGB>::Ptr RTABMAP_CORE_EXPORT transformPointCloud(
129 const pcl::PointCloud<pcl::PointXYZRGB>::Ptr & cloud,
130 const pcl::IndicesPtr & indices,
131 const Transform & transform);
133pcl::PointCloud<pcl::PointNormal>::Ptr RTABMAP_CORE_EXPORT transformPointCloud(
134 const pcl::PointCloud<pcl::PointNormal>::Ptr & cloud,
135 const pcl::IndicesPtr & indices,
136 const Transform & transform);
138pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr RTABMAP_CORE_EXPORT transformPointCloud(
139 const pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr & cloud,
140 const pcl::IndicesPtr & indices,
141 const Transform & transform);
143pcl::PointCloud<pcl::PointXYZINormal>::Ptr RTABMAP_CORE_EXPORT transformPointCloud(
144 const pcl::PointCloud<pcl::PointXYZINormal>::Ptr & cloud,
145 const pcl::IndicesPtr & indices,
146 const Transform & transform);
161cv::Point3f RTABMAP_CORE_EXPORT transformPoint(
162 const cv::Point3f & pt,
163 const Transform & transform);
165cv::Point3d RTABMAP_CORE_EXPORT transformPoint(
166 const cv::Point3d & pt,
167 const Transform & transform);
169pcl::PointXYZ RTABMAP_CORE_EXPORT transformPoint(
170 const pcl::PointXYZ & pt,
171 const Transform & transform);
173pcl::PointXYZI RTABMAP_CORE_EXPORT transformPoint(
174 const pcl::PointXYZI & pt,
175 const Transform & transform);
177pcl::PointXYZRGB RTABMAP_CORE_EXPORT transformPoint(
178 const pcl::PointXYZRGB & pt,
179 const Transform & transform);
181pcl::PointNormal RTABMAP_CORE_EXPORT transformPoint(
182 const pcl::PointNormal & point,
183 const Transform & transform);
185pcl::PointXYZRGBNormal RTABMAP_CORE_EXPORT transformPoint(
186 const pcl::PointXYZRGBNormal & point,
187 const Transform & transform);
189pcl::PointXYZINormal RTABMAP_CORE_EXPORT transformPoint(
190 const pcl::PointXYZINormal & point,
191 const Transform & transform);
194} // namespace util3d
195} // namespace rtabmap
196
197#endif /* UTIL3D_TRANSFORMS_H_ */
Represents 2D or 3D laser scan data with support for multiple point data formats.
Definition LaserScan.h:46
Represents a 3D rigid body transformation (rotation + translation).
Definition Transform.h:53
cv::Point3f RTABMAP_CORE_EXPORT transformPoint(const cv::Point3f &pt, const Transform &transform)
Transforms cv::Point3f point type.
pcl::PointCloud< pcl::PointXYZ >::Ptr RTABMAP_CORE_EXPORT transformPointCloud(const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, const Transform &transform)
Transforms pcl::PointXYZ point cloud type.
LaserScan RTABMAP_CORE_EXPORT transformLaserScan(const LaserScan &laserScan, const Transform &transform)
Applies a 3D transform to all points (and normals if present) in a LaserScan.