ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You are filling the box incorrectly, if you look at boundingBox , you need to give pose (position) that will be the centre point of box, and dimensions that will be the length, width and height of box.

It should look like following:

box.pose.position.x = (max_x + min_x)  / 2;
box.pose.position.y = (max_y + min_y)  / 2;
box.pose.position.z = (max_z + min_z)  / 2;
box.dimensions.x = (max_x - min_x);
box.dimensions.y = (max_y - min_y);
box.dimensions.z = (max_z - min_z);

This should solve it.