RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
PCL to 3D LaserScan

Converts various PCL point cloud types into a unified LaserScan format. More...

Functions

LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointXYZ > &cloud, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointXYZ → (x, y, z) → LaserScan::kXYZ
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointXYZ > &cloud, const pcl::IndicesPtr &indices, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointXYZ → (x, y, z) → LaserScan::kXYZ
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointNormal > &cloud, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointNormal → (x, y, z, nx, ny, nz) → LaserScan::kXYZNormal
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointNormal > &cloud, const pcl::IndicesPtr &indices, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointNormal → (x, y, z, nx, ny, nz) → LaserScan::kXYZNormal
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointXYZ > &cloud, const pcl::PointCloud< pcl::Normal > &normals, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointNormal → (x, y, z, nx, ny, nz) → LaserScan::kXYZNormal
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointXYZRGB > &cloud, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointXYZRGB → (x, y, z, rgb) → LaserScan::kXYZRGB
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointXYZRGB > &cloud, const pcl::IndicesPtr &indices, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointXYZRGB → (x, y, z, rgb) → LaserScan::kXYZRGB
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointXYZI > &cloud, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointXYZI → (x, y, z, intensity) → LaserScan::kXYZI
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointXYZI > &cloud, const pcl::IndicesPtr &indices, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointXYZI → (x, y, z, intensity) → LaserScan::kXYZI
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< rtabmap::PointXYZIRT > &cloud, const Transform &transform=Transform(), bool filterNaNs=true)
 rtabmap::PointXYZIRT → (x, y, z, intensity, ring time) → LaserScan::kXYZIRT
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< rtabmap::PointXYZIRT > &cloud, const pcl::IndicesPtr &indices, const Transform &transform=Transform(), bool filterNaNs=true)
 rtabmap::PointXYZIRT → (x, y, z, intensity, ring time) → LaserScan::kXYZIRT
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointXYZRGB > &cloud, const pcl::PointCloud< pcl::Normal > &normals, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointXYZRGBNormal → (x, y, z, rgb, nx, ny, nz) → LaserScan::kXYZRGBNormal
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointXYZRGBNormal > &cloud, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointXYZRGBNormal → (x, y, z, rgb, nx, ny, nz) → LaserScan::kXYZRGBNormal
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointXYZRGBNormal > &cloud, const pcl::IndicesPtr &indices, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointXYZRGBNormal → (x, y, z, rgb, nx, ny, nz) → LaserScan::kXYZRGBNormal
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointXYZI > &cloud, const pcl::PointCloud< pcl::Normal > &normals, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointXYZINormal → (x, y, z, intensity, nx, ny, nz) → LaserScan::kXYZINormal
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointXYZINormal > &cloud, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointXYZINormal → (x, y, z, intensity, nx, ny, nz) → LaserScan::kXYZINormal
 
LaserScan RTABMAP_CORE_EXPORT rtabmap::util3d::laserScanFromPointCloud (const pcl::PointCloud< pcl::PointXYZINormal > &cloud, const pcl::IndicesPtr &indices, const Transform &transform=Transform(), bool filterNaNs=true)
 pcl::PointXYZINormal → (x, y, z, intensity, nx, ny, nz) → LaserScan::kXYZINormal
 
template<typename PointCloud2T >
LaserScan rtabmap::util3d::laserScanFromPointCloud (const PointCloud2T &cloud, bool filterNaNs=true, bool is2D=false, const Transform &transform=Transform())
 Convert pcl::PCLPointCloud2 to rtabmap::LaserScan with all supported fields (see rtabmap::LaserScan::Format)
 

Detailed Description

Converts various PCL point cloud types into a unified LaserScan format.

These functions extract laser scan data from 3D point clouds, optionally applying a transform and filtering invalid points. Depending on the input type, output data may include position (x, y, z), intensity, color, and/or surface normals.

Supported input types and corresponding output data:

Parameters
cloudThe input PCL point cloud.
indicesOptional subset of indices to use from the point cloud.
normalsOptional normal cloud if not included in point type.
transformOptional rigid body transform to apply to the points.
filterNaNsWhether to ignore invalid or NaN points.
Returns
A LaserScan object containing scan data in appropriate format.
See also
laserScan2dFromPointCloud() for 2D-only extraction.

Function Documentation

◆ laserScanFromPointCloud()

template<typename PointCloud2T >
LaserScan rtabmap::util3d::laserScanFromPointCloud ( const PointCloud2T &  cloud,
bool  filterNaNs,
bool  is2D,
const Transform transform 
)

Convert pcl::PCLPointCloud2 to rtabmap::LaserScan with all supported fields (see rtabmap::LaserScan::Format)

Definition at line 37 of file util3d.hpp.