@@ -462,6 +462,7 @@ void PatchWorkpp<PointT>::estimate_ground(
462
462
unique_lock<recursive_mutex> lock (mutex_);
463
463
464
464
poly_list_.header .stamp = ros::Time::now ();
465
+ poly_list_.header .frame_id = cloud_in.header .frame_id ;
465
466
if (!poly_list_.polygons .empty ()) poly_list_.polygons .clear ();
466
467
if (!poly_list_.likelihood .empty ()) poly_list_.likelihood .clear ();
467
468
@@ -658,27 +659,27 @@ void PatchWorkpp<PointT>::estimate_ground(
658
659
sensor_msgs::PointCloud2 cloud_ROS;
659
660
pcl::toROSMsg (revert_pc_, cloud_ROS);
660
661
cloud_ROS.header .stamp = ros::Time::now ();
661
- cloud_ROS.header .frame_id = " map " ;
662
+ cloud_ROS.header .frame_id = cloud_in. header . frame_id ;
662
663
pub_revert_pc.publish (cloud_ROS);
663
664
664
665
pcl::toROSMsg (reject_pc_, cloud_ROS);
665
666
cloud_ROS.header .stamp = ros::Time::now ();
666
- cloud_ROS.header .frame_id = " map " ;
667
+ cloud_ROS.header .frame_id = cloud_in. header . frame_id ;
667
668
pub_reject_pc.publish (cloud_ROS);
668
669
669
670
pcl::toROSMsg (normals_, cloud_ROS);
670
671
cloud_ROS.header .stamp = ros::Time::now ();
671
- cloud_ROS.header .frame_id = " map " ;
672
+ cloud_ROS.header .frame_id = cloud_in. header . frame_id ;
672
673
pub_normal.publish (cloud_ROS);
673
674
674
675
pcl::toROSMsg (noise_pc_, cloud_ROS);
675
676
cloud_ROS.header .stamp = ros::Time::now ();
676
- cloud_ROS.header .frame_id = " map " ;
677
+ cloud_ROS.header .frame_id = cloud_in. header . frame_id ;
677
678
pub_noise.publish (cloud_ROS);
678
679
679
680
pcl::toROSMsg (vertical_pc_, cloud_ROS);
680
681
cloud_ROS.header .stamp = ros::Time::now ();
681
- cloud_ROS.header .frame_id = " map " ;
682
+ cloud_ROS.header .frame_id = cloud_in. header . frame_id ;
682
683
pub_vertical.publish (cloud_ROS);
683
684
}
684
685
0 commit comments