Publishing Pointcloud2 Centroid to be able to be able to draw bounding box
Hello everyone, so i am working with localization using pcl library and i am having trouble using this library as i am not good in c++, my problem is that i have an existing topic which publishes a pointcloud named "/ti_mmwave/radar_scan_pcl_0' i want to subscribe to this topic and get the centroid of this point cloud to be able to draw a bounding box on this pointcloud
anyone can help me with this i have searched on the internet but can't find anything that tells me how to subscribe to existing pointcloud and retrieve centroid all the problems on the internet are using pcd files and not doing this in real time