mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-06 09:47:46 +08:00
Increased minimum rtabmap version to 0.20.7. Updated OdomInfo msg with localScanMapFormat (fixed intensity channel wrongly converted to rgb). rtabmap.launch: Show in rviz filtered scan from odometry if icp_odometry is true. rtabmapviz: fixed hanging shutdown after a ctr-c. OdometryROS: can now publish local scan map with intensity channel. icp_odometry: fixed intensity ignored if voxel size is set.
This commit is contained in:
+11
-1
@@ -823,11 +823,21 @@ void OdometryROS::processData(const SensorData & data, const ros::Time & stamp,
|
||||
if(odomLocalScanMap_.getNumSubscribers() && !info.localScanMap.isEmpty())
|
||||
{
|
||||
sensor_msgs::PointCloud2 cloudMsg;
|
||||
if(info.localScanMap.hasNormals())
|
||||
if(info.localScanMap.hasNormals() && info.localScanMap.hasIntensity())
|
||||
{
|
||||
pcl::PointCloud<pcl::PointXYZINormal>::Ptr cloud = util3d::laserScanToPointCloudINormal(info.localScanMap, info.localScanMap.localTransform());
|
||||
pcl::toROSMsg(*cloud, cloudMsg);
|
||||
}
|
||||
else if(info.localScanMap.hasNormals())
|
||||
{
|
||||
pcl::PointCloud<pcl::PointNormal>::Ptr cloud = util3d::laserScanToPointCloudNormal(info.localScanMap, info.localScanMap.localTransform());
|
||||
pcl::toROSMsg(*cloud, cloudMsg);
|
||||
}
|
||||
else if(info.localScanMap.hasIntensity())
|
||||
{
|
||||
pcl::PointCloud<pcl::PointXYZI>::Ptr cloud = util3d::laserScanToPointCloudI(info.localScanMap, info.localScanMap.localTransform());
|
||||
pcl::toROSMsg(*cloud, cloudMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud = util3d::laserScanToPointCloud(info.localScanMap, info.localScanMap.localTransform());
|
||||
|
||||
Reference in New Issue
Block a user