mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
Export: exporting with intensity for laser scans
This commit is contained in:
@@ -234,12 +234,12 @@ pcl::PointCloud<pcl::PointXYZ>::Ptr RTABMAP_EXP laserScanToPointCloud(const Lase
|
||||
// For laserScan without normals, normals are set to null.
|
||||
pcl::PointCloud<pcl::PointNormal>::Ptr RTABMAP_EXP laserScanToPointCloudNormal(const LaserScan & laserScan, const Transform & transform = Transform());
|
||||
// For laserScan without rgb, rgb is set to default r,g,b parameters.
|
||||
pcl::PointCloud<pcl::PointXYZRGB>::Ptr RTABMAP_EXP laserScanToPointCloudRGB(const LaserScan & laserScan, const Transform & transform = Transform(), unsigned char r = 255, unsigned char g = 255, unsigned char b = 255);
|
||||
pcl::PointCloud<pcl::PointXYZRGB>::Ptr RTABMAP_EXP laserScanToPointCloudRGB(const LaserScan & laserScan, const Transform & transform = Transform(), unsigned char r = 100, unsigned char g = 100, unsigned char b = 100);
|
||||
// For laserScan without intensity, intensity is set to intensity parameter.
|
||||
pcl::PointCloud<pcl::PointXYZI>::Ptr RTABMAP_EXP laserScanToPointCloudI(const LaserScan & laserScan, const Transform & transform = Transform(), float intensity = 0.0f);
|
||||
// For laserScan without rgb, rgb is set to default r,g,b parameters.
|
||||
// For laserScan without normals, normals are set to null.
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr RTABMAP_EXP laserScanToPointCloudRGBNormal(const LaserScan & laserScan, const Transform & transform = Transform(), unsigned char r = 255, unsigned char g = 255, unsigned char b = 255);
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr RTABMAP_EXP laserScanToPointCloudRGBNormal(const LaserScan & laserScan, const Transform & transform = Transform(), unsigned char r = 100, unsigned char g = 100, unsigned char b = 100);
|
||||
// For laserScan without intensity, intensity is set to default intensity parameter.
|
||||
// For laserScan without normals, normals are set to null.
|
||||
pcl::PointCloud<pcl::PointXYZINormal>::Ptr RTABMAP_EXP laserScanToPointCloudINormal(const LaserScan & laserScan, const Transform & transform = Transform(), float intensity = 0.0f);
|
||||
@@ -249,7 +249,7 @@ pcl::PointXYZ RTABMAP_EXP laserScanToPoint(const LaserScan & laserScan, int inde
|
||||
// For laserScan without normals, normals are set to null.
|
||||
pcl::PointNormal RTABMAP_EXP laserScanToPointNormal(const LaserScan & laserScan, int index);
|
||||
// For laserScan without rgb, rgb is set to default r,g,b parameters.
|
||||
pcl::PointXYZRGB RTABMAP_EXP laserScanToPointRGB(const LaserScan & laserScan, int index, unsigned char r = 255, unsigned char g = 255, unsigned char b = 255);
|
||||
pcl::PointXYZRGB RTABMAP_EXP laserScanToPointRGB(const LaserScan & laserScan, int index, unsigned char r = 100, unsigned char g = 100, unsigned char b = 100);
|
||||
// For laserScan without intensity, intensity is set to intensity parameter.
|
||||
pcl::PointXYZI RTABMAP_EXP laserScanToPointI(const LaserScan & laserScan, int index, float intensity);
|
||||
// For laserScan without rgb, rgb is set to default r,g,b parameters.
|
||||
|
||||
@@ -316,12 +316,16 @@ pcl::PointCloud<pcl::PointXYZ>::Ptr RTABMAP_EXP removeNaNFromPointCloud(
|
||||
const pcl::PointCloud<pcl::PointXYZ>::Ptr & cloud);
|
||||
pcl::PointCloud<pcl::PointXYZRGB>::Ptr RTABMAP_EXP removeNaNFromPointCloud(
|
||||
const pcl::PointCloud<pcl::PointXYZRGB>::Ptr & cloud);
|
||||
pcl::PointCloud<pcl::PointXYZI>::Ptr RTABMAP_EXP removeNaNFromPointCloud(
|
||||
const pcl::PointCloud<pcl::PointXYZI>::Ptr & cloud);
|
||||
|
||||
|
||||
pcl::PointCloud<pcl::PointNormal>::Ptr RTABMAP_EXP removeNaNNormalsFromPointCloud(
|
||||
const pcl::PointCloud<pcl::PointNormal>::Ptr & cloud);
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr RTABMAP_EXP removeNaNNormalsFromPointCloud(
|
||||
const pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr & cloud);
|
||||
pcl::PointCloud<pcl::PointXYZINormal>::Ptr RTABMAP_EXP removeNaNNormalsFromPointCloud(
|
||||
const pcl::PointCloud<pcl::PointXYZINormal>::Ptr & cloud);
|
||||
|
||||
/**
|
||||
* For convenience.
|
||||
|
||||
@@ -2485,6 +2485,12 @@ pcl::PointXYZRGB laserScanToPointRGB(const LaserScan & laserScan, int index, uns
|
||||
output.g = (unsigned char)((ptrInt[indexRGB] >> 8) & 0xFF);
|
||||
output.r = (unsigned char)((ptrInt[indexRGB] >> 16) & 0xFF);
|
||||
}
|
||||
else if(laserScan.hasIntensity())
|
||||
{
|
||||
// based on Velodyne/SICK specification of intensity 0-100
|
||||
int indexIntensity = laserScan.getIntensityOffset();
|
||||
output.b = output.g = output.r = (unsigned char)ptr[indexIntensity];
|
||||
}
|
||||
else
|
||||
{
|
||||
output.r = r;
|
||||
@@ -2539,6 +2545,12 @@ pcl::PointXYZRGBNormal laserScanToPointRGBNormal(const LaserScan & laserScan, in
|
||||
output.g = (unsigned char)((ptrInt[indexRGB] >> 8) & 0xFF);
|
||||
output.r = (unsigned char)((ptrInt[indexRGB] >> 16) & 0xFF);
|
||||
}
|
||||
else if(laserScan.hasIntensity())
|
||||
{
|
||||
// based on Velodyne/SICK specification of intensity 0-100
|
||||
int indexIntensity = laserScan.getIntensityOffset();
|
||||
output.b = output.g = output.r = (unsigned char)ptr[indexIntensity];
|
||||
}
|
||||
else
|
||||
{
|
||||
output.r = r;
|
||||
|
||||
@@ -792,6 +792,10 @@ pcl::PointCloud<pcl::PointXYZRGB>::Ptr removeNaNFromPointCloud(const pcl::PointC
|
||||
{
|
||||
return removeNaNFromPointCloudImpl<pcl::PointXYZRGB>(cloud);
|
||||
}
|
||||
pcl::PointCloud<pcl::PointXYZI>::Ptr removeNaNFromPointCloud(const pcl::PointCloud<pcl::PointXYZI>::Ptr & cloud)
|
||||
{
|
||||
return removeNaNFromPointCloudImpl<pcl::PointXYZI>(cloud);
|
||||
}
|
||||
|
||||
template<typename PointT>
|
||||
typename pcl::PointCloud<PointT>::Ptr removeNaNNormalsFromPointCloudImpl(
|
||||
@@ -812,6 +816,11 @@ pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr removeNaNNormalsFromPointCloud(
|
||||
{
|
||||
return removeNaNNormalsFromPointCloudImpl<pcl::PointXYZRGBNormal>(cloud);
|
||||
}
|
||||
pcl::PointCloud<pcl::PointXYZINormal>::Ptr removeNaNNormalsFromPointCloud(
|
||||
const pcl::PointCloud<pcl::PointXYZINormal>::Ptr & cloud)
|
||||
{
|
||||
return removeNaNNormalsFromPointCloudImpl<pcl::PointXYZINormal>(cloud);
|
||||
}
|
||||
|
||||
|
||||
pcl::IndicesPtr radiusFiltering(const pcl::PointCloud<pcl::PointXYZ>::Ptr & cloud, float radiusSearch, int minNeighborsInRadius)
|
||||
|
||||
Reference in New Issue
Block a user