mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
OdometryIcp: fixed local scan map transform. Other minor changes.
This commit is contained in:
+2
-2
@@ -600,12 +600,12 @@ void OdometryROS::processData(const SensorData & data, const ros::Time & stamp)
|
||||
sensor_msgs::PointCloud2 cloudMsg;
|
||||
if(info.localScanMap.hasNormals())
|
||||
{
|
||||
pcl::PointCloud<pcl::PointNormal>::Ptr cloud = util3d::laserScanToPointCloudNormal(info.localScanMap);
|
||||
pcl::PointCloud<pcl::PointNormal>::Ptr cloud = util3d::laserScanToPointCloudNormal(info.localScanMap, info.localScanMap.localTransform());
|
||||
pcl::toROSMsg(*cloud, cloudMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud = util3d::laserScanToPointCloud(info.localScanMap);
|
||||
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud = util3d::laserScanToPointCloud(info.localScanMap, info.localScanMap.localTransform());
|
||||
pcl::toROSMsg(*cloud, cloudMsg);
|
||||
}
|
||||
|
||||
|
||||
@@ -275,10 +275,6 @@ private:
|
||||
pclScan = util3d::downsample(pclScan, scanDownsamplingStep_);
|
||||
maxLaserScans /= scanDownsamplingStep_;
|
||||
}
|
||||
if(!pclScan->is_dense)
|
||||
{
|
||||
pclScan = util3d::removeNaNNormalsFromPointCloud(pclScan);
|
||||
}
|
||||
scan = util3d::laserScanFromPointCloud(*pclScan);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user