ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

The problem is that the box you're creating to visualise this cluster assumes that the centroid of the cluster is exactly half way between the min and max values in each dimension. This is an invalid assumption, the centroid is the mean position of every point in the cloud.

If you want the box visual to simply show the extents of the cluster then you should set it's position to (min+max)/2 however this will not display the centroid.

I'd recommend using a line array marker instead so you can visualise the extents of the box as well as the centroid do describe the cluster more completely.