mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Added util3d::segmentObstaclesFromGround() method, templated some PCL methods (new rtabmap/core/impl/util3d.hpp)
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1921 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -166,17 +166,17 @@ void LoopClosureViewer::updateView(const Transform & transform)
|
||||
sA_->getDepthFx(), sA_->getDepthFy(),
|
||||
decimation);
|
||||
}
|
||||
|
||||
|
||||
cloudA = util3d::removeNaNFromPointCloud<pcl::PointXYZRGB>(cloudA);
|
||||
|
||||
if(maxDepth>0.0)
|
||||
{
|
||||
{
|
||||
cloudA = util3d::passThrough<pcl::PointXYZRGB>(cloudA, "z", 0, maxDepth);
|
||||
}
|
||||
if(samples>0 && (int)cloudA->size() > samples)
|
||||
{
|
||||
{
|
||||
cloudA = util3d::sampling<pcl::PointXYZRGB>(cloudA, samples);
|
||||
}
|
||||
}
|
||||
cloudA = util3d::transformPointCloud<pcl::PointXYZRGB>(cloudA, sA_->getLocalTransform());
|
||||
|
||||
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloudB;
|
||||
@@ -198,23 +198,23 @@ void LoopClosureViewer::updateView(const Transform & transform)
|
||||
sB_->getDepthFx(), sB_->getDepthFy(),
|
||||
decimation);
|
||||
}
|
||||
|
||||
|
||||
cloudB = util3d::removeNaNFromPointCloud<pcl::PointXYZRGB>(cloudB);
|
||||
|
||||
if(maxDepth>0.0)
|
||||
{
|
||||
{
|
||||
cloudB = util3d::passThrough<pcl::PointXYZRGB>(cloudB, "z", 0, maxDepth);
|
||||
}
|
||||
if(samples>0 && (int)cloudB->size() > samples)
|
||||
{
|
||||
{
|
||||
cloudB = util3d::sampling<pcl::PointXYZRGB>(cloudB, samples);
|
||||
}
|
||||
}
|
||||
cloudB = util3d::transformPointCloud<pcl::PointXYZRGB>(cloudB, t*sB_->getLocalTransform());
|
||||
|
||||
//cloud 2d
|
||||
pcl::PointCloud<pcl::PointXYZ>::Ptr scanA, scanB;
|
||||
scanA = util3d::depth2DToPointCloud(depth2dA);
|
||||
scanB = util3d::depth2DToPointCloud(depth2dB);
|
||||
scanB = util3d::depth2DToPointCloud(depth2dB);
|
||||
scanB = util3d::transformPointCloud<pcl::PointXYZ>(scanB, t);
|
||||
|
||||
ui_->label_idA->setText(QString("[%1 (%2) -> %3 (%4)]").arg(sB_->id()).arg(cloudB->size()).arg(sA_->id()).arg(cloudA->size()));
|
||||
|
||||
Reference in New Issue
Block a user