Publishing 3D centroid and min-max values
Hey everyone,
I'm using
pcl::compute3DCentroid (*cloud_cluster, centroid);
pcl::getMinMax3D (*cloud_cluster, min, max);
to create box markers for cloud clusters using the euclidean cluster extraction. Additionally I wanna publish the values of the cluster centroid and the min and max values of each cluster, but can't figure out what message type to use (and how).
Essentially I can't figure out how the publisher would look like. I want a rostopic with simple (float?) values, so I can use those values to make calculations afterwards.
Thanks in advance everyone!
You want to publish data with
rostopic pub
or you want to publish the value of yourcentroid
? Sincecompute3DCentroid
assign only a value to centroid[0] to centroid[2] (x,y and z) you can use a geometry_msgs/Point.But if you want to have the centroid values and the min and max in the same message you can create a custom message like that :
thanks a ton!